[rfc] use ext3 instead of ext2

Bryan Kadzban bryan at kadzban.is-a-geek.net
Thu Jul 15 15:29:15 PDT 2004


Matthew Burgess wrote:
> I don't know why anyone would willingly want to use a non-journalling
> FS vs. a journalling FS unless performance was absolutely critical
> over data integrity (is there ever a need for that kind of
> trade-off?).

Actually, in a few cases, ext3 is faster than ext2.

Specifically, if the program in question is using fsync() a lot (or
opens a lot of files with O_SYNC, which is pretty much the same thing),
then there's a HUGE benefit to ext3, if it's mounted with the
data=journal option.  Programs like this include mail servers, for one
-- they have to sync the mailbox file before they acknowledge receipt of
the mail, so that mail doesn't get lost.  Database servers also probably
fsync() a lot, to make sure their logs are up to date on the disk.

The reason fsync()-heavy loads are so much faster with data=journal is
that the ext3 code can return from the fsync() call when the data has
hit the journal, instead of waiting for it to get out to its final
destination.  This reduces seeks by quite a bit, especially if data
gets overwritten a lot with fsync()s between each write (I can't think
of anything that would do this, though, except maybe a database).

Now yes, this is a very special case, but my point is, ext3 isn't always
slower.  ;-)



More information about the lfs-dev mailing list