lkml.org 
[lkml]   [2011]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [rfc] Ignore Fsync Calls in Laptop_Mode
    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!)
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2011-05-31 15:51    [W:0.025 / U:0.176 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site