FreeBSD MySQL still WAY slower than Linux

Matthias Buelow mkb at incubus.de
Fri Jun 17 16:20:47 GMT 2005


David Sze <dsze at distrust.net> writes:

>CentOS uses ext3 by default.  How does having a journal help if the
>journal is stored on the same async filesystem?  Unless the journal
>writes are guaranteed sync.

The journal guarantees that the filesystem will always be consistent. If
a journal entry doesn't make it to disk, the operation has never
happened; and the journal entry won't get removed, until the metadata
update has been performed. So the worst thing that could happen is, that
the same operation will be performed twice, once normally, and once at
log replay on reboot. This is not an issue, since such metadata
operations (delete file from directory, write a value into superblock,
etc.) are usually idempotent.

That's the basic function of all journalled filesystems, and that's why
you don't need to run fsck on them. You don't need to write the journal
synchronously, you can do these things in groups.

The softupdates mechanism does something similar; only it doesn't
maintain an on-disk journal, and hence needs fsck after boot to fix up
the free block bitmaps and stuff (basically performing a garbage
collection on the filesystem, which, unfortunately, is pretty slow).

mkb.


More information about the freebsd-stable mailing list