External journal on flash drive

Stephen C. Tweedie sct at redhat.com
Mon Sep 13 22:02:46 UTC 2004


On Sat, 2004-09-11 at 17:02, Mika Liljeberg wrote:

> 1) Does the journaling code spread write accesses to the journal device
> evenly, as I hope,

Pretty much so, yes.  Sequential writes are much more efficient than
random ones, so the journal IO tries to avoid seeking; a side-effect of
that is that the wear should be largely uniform.

>  or are there blocks that are particularly "hot"?

There is one: the journal superblock.  It's not updated _hugely_ often,
but it is updated whenever we "checkpoint" the journal (ie. when we
remove old transactions from the tail end of the journal.)  I haven't
measured it but I'd expect we're updating that maybe 2 or 3 times more
rapidly than other journal blocks.

> 2) Currently, the main drive seems to spin up within 60 seconds after a
> write access. I would like the checkpointing to occur only when the
> journal device is getting full. How can I tune this?

That's not related to journal activity --- that's normal writeback.

The way the journal works is that it makes sure we update transactions
atomically, in the journal, before they are allowed to undergo normal

However, once the transaction _has_ committed, the journal is almost
entirely out of the picture.  The only interest the journal retains in
the updated metadata is that we have to make sure that we don't reuse
the journal record for that transaction until all of the metadata has
undergone its normal writeback (otherwise we'd risk having no record of
it after a crash!)  Other than that, it's up to the normal VM writeback
to write the updated metadata to its home location on disk at that

Only if the journal wraps and we need to reclaim journal space urgently
will we _force_ the write from the journal code.


More information about the Ext3-users mailing list