[ltp] Journaling on a laptop?

Matt Graham linux-thinkpad@linux-thinkpad.org
Thu, 16 Sep 2004 17:00:50 -0400


On Thursday 16 September 2004 16:19, after a long battle with 
technology, Arno Willig wrote:
> Norman Walsh wrote:
>> What's the current thinking on journaling filesystems on a laptop?
>> In the past, I've used ext2 instead, based on the idea that the HD
>> will spin down and save battery life if I'm using a non-journaling
>> file system.

Good idea, but you're barking up the wrong snake in the grass.  I assume 
you've mounted your filesystems with "noatime"?  Do that first; atime 
updates are pretty useless in most cases and they always require disk 
writes.

You need "noflushd" or a set of kernel patches called "laptop-mode" 
IIRC.  noflushd tweaks a number of settings so that disk writes are 
cached much more aggressively than normal, which lets you spin down 
your disk for longer periods.  noflushd *doesn't* work with ReiserFS 
3.6, because the journal writing there bypassed all the mechanisms that 
noflushd used for delaying writes.  noflushd is supposed to work with 
ext[23].  For best disk spindown on ext3 filesystems, set "commit" to a 
high number, so that the metadata isn't committed too often.  I don't 
remember what the default is for commit, but it's in units of 1/100 
seconds, so mounting with commit=3000 commits the metadata every 30 
seconds.  Hmm... 15 minutes, commit=90000 ?

laptop-mode does a lot of things which I haven't researched fully, but 
it's theoretically a very nice thing to have working.

> I use the fabulous Reiser4 filesystem (which can be found in the
> mm-patches for recent kernels on kernel.org) and I am very happy with
> it. Journaling works fine and the filesystem is lighning-fast.

ReiserFS 4 is in its infancy.  It's probably a nice filesystem, but if 
it has bugs, you'll get bitten by them.  Or if your disk gets eaten by 
something, and you have to use a rescue CD, you probably won't find a 
reiserfsck that understands ReiserFS 4 on that rescue CD.  Caveat user.  
HTH,

-- 
   He is a rhythmic movement of the penguins, is Tux.
   --MegaHAL, trained on random gibberish
There is no Darkness in Eternity/But only Light too dim for us to see