Closed Bug 288078 Opened 20 years ago Closed 17 years ago

Flushing "popstate.dat" prevents harddisk from being spun down (e.g. by laptop-mode)

Categories

(SeaMonkey :: MailNews: Message Display, defect)

All
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: baldauf--2015--bugzilla.mozilla.org, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a5) Gecko/20041122
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a5) Gecko/20041122

Linux laptop-mode is a special linux kernel configuration to enable longer
battery life for laptop users by, amongst other things, setting the harddisk
spindown time to a small value (e.g. 30 seconds). For (1) harddisk lifetime, (2)
"good ambient noise" and (3) real energy savings, it is crucial that the
harddisk is not spun up and spun down all the time.

In a typical user scenario, a mozilla application (e.g. MailNews, maybe this
applies to Thunderbird, too) is the only application which makes the disks spin
up in laptop-mode by calling "flush()" on a "popstate.dat" file. This call is
made for every POP3 poll, even if there was no e-mail message to be downloaded
(so even in cases where saving some "POP3 state" probably makes no sense). Note
that calls to "open()", "write()" and "close()" typically let the disk be spun
down in laptop-mode, for a certain extended period of time (e.g.: 10 minutes or
the next really necessary spinup, whichever comes first).

Reproducible: Always

Steps to Reproduce:
1. Bring your linux laptop to "laptop-mode", for example by using
"laptop-mode-tools"
2. Open MailNews, with one POP3 poll to one configured account every minute.
3. Enable "/proc/sys/vm/block_dump" (e.g. by "echo 1 >/proc/sys/vm/block_dump")
and watch your system log (e.g. by "tail -f /var/log/messages") for further
clarification.
4. Do nothing and wait your system to calm down.
5. Listen to your harddisk to spin down.
6. After it has spun down, listen to it how long it takes for the harddisk to be
spun up again.
Actual Results:  
The "calm time" is less than a minute.
The time the harddisk is spun up is exactly the time mozilla MailNews wants to
flush "popstate.dat", as you can see by your system log.

Expected Results:  
The "calm time" should be about 10 minutes. MailNews should trigger disk spinup
at most if new e-mail messages arrive.

The guilty "flush()" calls is probably this one:
http://lxr.mozilla.org/mozilla/source/mailnews/local/src/nsPop3Protocol.cpp#429

Due to this behaviour, the energy savings using mozilla MailNews are probably
actually negative, because regular spinups and spindowns may cost more energy
than just letting the harddisk be spun down. Additionally, the harddisk wearout
is greater, destroying precious harddisks of mozilla MailNews users more early
than it could.
As a suggestion, one should at least be able to configure MailNews by
"about:config" to not call "flush()" at all.

More sophisticated solutions should reduce "flush()" calls to cases where
"popstate.dat" actually contains any valuable state.
Assignee: sspitzer → mail
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → EXPIRED
This bug contributes to hard disk wear down.
Status: RESOLVED → UNCONFIRMED
Resolution: EXPIRED → ---
(In reply to comment #4)
> This bug contributes to hard disk wear down.
> 

Maybe it does, but 2½ years have gone by without any activity (of any kind) on this bug, which is about 4 times more than what triggered comment #2 by Gerv's bot. Is anyone still experiencing this bug on a recent build? (I can't test it, I don't have a laptop).

If no one speaks up, I guess this bug can be resolved WORKSFORME.
No reply to comment #5 in more than two weeks. Resolving INCOMPLETE.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago17 years ago
Resolution: --- → INCOMPLETE
Component: MailNews: Notification → MailNews: Message Display
QA Contact: search
You need to log in before you can comment on or make changes to this bug.