Re: kjournald and disk sleeping

From: Andreas Dilger (adilger@turbolabs.com)
Date: Mon Oct 22 2001 - 13:47:51 EST


On Oct 22, 2001 14:29 -0300, Marcos Dione wrote:
> Hi. first of all, I'm not suscribed to the mailing list, so cc to
> me in the replies. thanks. and I'm running 2.4.10.

Don't use 2.4.10 Linus kernel with ext3. It is bad. Use a newer kernel,
or -ac kernel instead.

> then I switched to ext3 and kjournald started to appear on the
> processes list. and it commits the transactions very often. I know I can
> set the commit interval to a high value, but both I don't know exactly
> how, and I think that it's not the solution I need. sending STOP signals
> to kjournald doesn't work, it seems to ignore them. what can I do?

Hmm. I have a laptop running with all ext3 filesystems, and it has no
problems spinning down the disk. I have not done anything to increase
the flush interval of kjournald. It may be that kjournald is writing
to disk because you have things which are trying to write to disk.

> then I send a STOP signal to kupdated

Well, this is a sure sign that you are getting disk write requests.
Note that it is very dangerous to do this. Instead, you should give it
a long (but finite) interval so that you at least get some data written
to disk instead of none at all.

I have all of the filesystems on my laptop mounted noatime (this breaks
/tmp auto-cleanup, but oh well) and I have moved all of the entries from
/etc/cron.hourly to /etc/cron.daily, as they are not so critical for me.

If you want, you can still increase the kjournald flush interval by editing
fs/jbd/journal.c:journal_init_common(). Granted, this is not elegant, and
it _should_ be configurable somewhere, but it isn't yet.

If you change the commit interval and run in journaled-data mode, and have
a long interval to kupdated, then ext3 _should_ buffer all of your I/O in
memory until the journal is full. This is much safer than just turning off
kupdated, since you WILL get things written to disk if there have been enough
changes to fill the journal, so you have an upper limit of a few MB of data
that can be lost if it never flushes to disk.

Cheers, Andreas

--
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

- 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/



This archive was generated by hypermail 2b29 : Tue Oct 23 2001 - 21:00:32 EST