All of lore.kernel.org
 help / color / mirror / Atom feed
From: "D. Jansen" <d.g.jansen@googlemail.com>
To: "Ted Ts'o" <tytso@mit.edu>,
	"D. Jansen" <d.g.jansen@googlemail.com>,
	david@lang.hm, Oliver Neukum <oneukum@suse.de>,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	Dave Chinner <david@fromorbit.com>,
	njs@pobox.com, bart@samwel.tk
Subject: Re: [rfc] Ignore Fsync Calls in Laptop_Mode
Date: Tue, 31 May 2011 15:47:15 +0200	[thread overview]
Message-ID: <BANLkTim0pFS=Fs6ga2CV5LwOs2xxbh9svA@mail.gmail.com> (raw)
In-Reply-To: <20110531020300.GJ2890@dhcp-172-31-194-241.cam.corp.google.com>

On Tue, May 31, 2011 at 4:03 AM, Ted Ts'o <tytso@mit.edu> wrote:
> On Mon, May 30, 2011 at 11:24:03PM +0200, D. Jansen wrote:
>> > do you really have so many fsync's going on that the disk spins up so much
>> > that you would gain 10-20% battery life?
>>
>> Yes. Every autosave in LibreOffice triggers one. And I want autosave,
>> but I want them in memory, not on disk.
>
> What on *heck* good does an autosave to memory do?  Are you afraid
> your X server is going to go poof, or OpenOffice is going to crash on
> you?
Unfortunately, yes. This happens to me regularly, e.g. roughly every
10th resume. It's a poulsbo system. ;)
Another reason is a Java extension that makes it crash happy.
(Please don't tell me now that the real fix is to fix poulsbo...)

>I can't remember the last time this has happened to me.  It's
> typically a system crash or a power loss that causes me to lose an
> OpenOffice session.

Well, good for you! Power loss didn't ever occur to me on the other
hand, at least not on my netbook.

>> > and what makes you think the extra spin-ups from fsyncs will cause your hard
>> > drive to fail significantly earlier? (if you have a hard drive with a
>> > limited number of spin-up cycles, you probably don't want to use laptop mode
>> > at all)
>>
>> Experience, see above. Also, this is well described behavior. All hard
>> disks are only designed to last a certain number of head loads and
>> unloads. Spinning up and down even less.
>
> Modern laptop drives are designed for 600,000 to a million head loads
> and unloads.  Open Office by default autosaves once every 15 minutes.
> So if you leave your system running (on battery?!?) 24x7, with open
> office open all that time, even with HDD which is only rated for 600k
> load cycles, that's 4.5 years.

Yeah, exactly what I had thought -- enabling laptop mode for the first time.
After the hard disk started to show more read errors
and almost crashed so I had to exchange it, I reconsidered.
I wish specifications would be more in conformity with reality...
Good thing I watch my smart log and caught it in time to avoid data loss.
Though I do have a solid backup routine to avoid serious issues.

> And of course, normally such a system
> is powered all the time, and the hard drive shouldn't be spinning down
> if you're on the AC mains.

Well, I use my netbook on the go mostly. I guess we just have different habits.
>
> The real fix is that applications need to be fixed to be less
> write-happy.  Firefox example, used to request a transactional update
> to a sqllite database on every web click.  Laptop mode isn't the right
> place to fix this, since if you try to stop the writes from hitting
> the disk, you'll still end up burning memory that can't be released
> until the data is written to disk.  (...)

That is another fix that everybody can benefit from. And another
reason to provide barrier support for user space.
(We have a new trojan horse!)

  parent reply	other threads:[~2011-05-31 13:47 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-19 13:34 [rfc] Ignore Fsync Calls in Laptop_Mode Dennis Jansen
2011-05-19 13:43 ` Alan Cox
     [not found]   ` <BANLkTikFRwPY_qOQpPmCmNUJbBUsGcuGUw@mail.gmail.com>
     [not found]     ` <20110519153928.40521b93@lxorguk.ukuu.org.uk>
2011-05-19 15:01       ` D. Jansen
2011-05-19 15:02   ` D. Jansen
2011-05-20 15:34     ` Valdis.Kletnieks
2011-05-20  3:39 ` Dave Chinner
2011-05-20  6:01   ` D. Jansen
2011-05-22  0:48     ` Dave Chinner
2011-05-23  8:12       ` Oliver Neukum
2011-05-23 13:05         ` D. Jansen
2011-05-25  0:00         ` Dave Chinner
2011-05-25  6:50           ` Oliver Neukum
2011-05-26  7:01             ` D. Jansen
2011-05-26 10:49               ` Theodore Tso
     [not found]                 ` <BANLkTimNjt4=9v33Z9Nr12xa6GmyJ-Ue5A@mail.gmail.com>
2011-05-26 13:31                   ` Ted Ts'o
2011-05-26 16:05                     ` D. Jansen
2011-05-26 16:21                       ` Ted Ts'o
2011-05-27  7:12                         ` D. Jansen
2011-05-27 14:17                           ` Theodore Tso
2011-05-27 17:51                             ` david
2011-05-29 10:45                             ` D. Jansen
2011-05-30  1:53                               ` david
2011-05-30  7:13                                 ` Oliver Neukum
2011-05-30 12:55                                   ` Valdis.Kletnieks
2011-05-30 18:03                                     ` david
2011-05-30 13:55                                 ` D. Jansen
2011-05-30 18:02                                   ` david
2011-05-30 18:28                                     ` D. Jansen
2011-05-30 18:43                                       ` Valdis.Kletnieks
2011-05-30 19:54                                         ` D. Jansen
2011-05-30 18:45                                       ` david
2011-05-30 19:49                                         ` D. Jansen
2011-05-30 20:53                                           ` david
2011-05-30 21:24                                             ` D. Jansen
2011-05-30 22:41                                               ` david
2011-05-31  2:03                                               ` Ted Ts'o
2011-05-31  2:26                                                 ` david
2011-05-31 13:47                                                 ` D. Jansen [this message]
2011-05-31 18:23                                                   ` david
2011-05-31 18:37                                                     ` D. Jansen
2011-05-31 18:54                                                       ` david
2011-05-31 19:04                                                         ` D. Jansen
2011-06-02  7:42                                                 ` D. Jansen
2011-05-31  8:22                                               ` Valdis.Kletnieks
2011-05-30 22:10                                           ` Jesper Juhl
2011-05-31  6:48                                         ` Oliver Neukum
2011-05-26 19:31               ` Matthew Garrett
2011-05-27  7:22                 ` D. Jansen
2011-05-20 15:28 ` Valdis.Kletnieks
2011-05-20 16:40   ` D. Jansen
2011-05-20 22:03     ` torbenh
2011-05-21  8:23       ` D. Jansen
2011-05-23  8:22     ` Jesper Juhl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTim0pFS=Fs6ga2CV5LwOs2xxbh9svA@mail.gmail.com' \
    --to=d.g.jansen@googlemail.com \
    --cc=akpm@linux-foundation.org \
    --cc=bart@samwel.tk \
    --cc=david@fromorbit.com \
    --cc=david@lang.hm \
    --cc=linux-kernel@vger.kernel.org \
    --cc=njs@pobox.com \
    --cc=oneukum@suse.de \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.