lkml.org 
[lkml]   [2004]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Is there a way to keep the 2.6 kjournald from writing to idle disks? (to allow spin-downs)
    bill davidsen wrote:
    > In article <20040125205219.GE26600@luna.mooo.com>,
    > Micha Feigin <michf@post.tau.ac.il> wrote:
    >
    > | There are two things to do. First you should mount the disk with the
    > | noatime option.
    >
    > Hopefully on an idle system there isn't any access, so there isn't any
    > atime impact. It would be nice if the atime write was very lazy, as in
    > only when the file is closed or something. Like an atimeonclose option.

    > | The other thing is ext3 which is updating its journal every 5
    > | seconds. I was told that laptop-mode was imported into 2.6 by now (I
    > | think that it is in the main stream). Check the kernel docs there
    > | should be some mount option to state the dirty time for the ext3
    > | journal. The method changed since 2.4 so I don't remember the 2.6
    > | option since I don't use it yet, sorry.
    >
    > Someone will have to explain that one, in a normal mount I would not
    > expect an idle system to be doing anything on the filesystems.

    Anything that reads anything from a filesystem updates the atime, I
    guess, even though the read data comes from the cache. This means that
    pages are dirtied, and they need to be written back. The atime is part
    of the filesystem metadata, so that might explain metadata journaling
    activity. AFAICS your system is not truly idle w.r.t the disk in
    question. Mount it with noatime and see if you can spin it down when you
    know it should really be idle. (You can use hdparm -y on it to spin it
    down by hand, so you don't have to wait for the hardware timer.) If it
    still spins up without atime, you know it isn't really idle, so you need
    to find out what app is accessing the disk. A look at the output of
    "lsof" can be enlightening. If that doesn't help, you can try to use
    laptop mode's block_dump functionality (without enabling laptop mode
    itself!) to see which process is reading/writing which block.

    Laptop mode is not in 2.6 mainstream yet, it can be found in the -mm
    series. After you're done using block_dump you can get rid of laptop
    mode again: you don't need the actual mode, the spun-down times it gets
    you are way too short for your needs. Furthermore it's indiscriminate
    w.r.t disks, so it would have an undesired effect on your other disk as
    well.

    -- Bart
    -
    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: 2005-03-22 14:00    [W:2.593 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site