[clug] Ext2 vs Ext3: weird benchmark result

Daniel Pittman daniel at rimspace.net
Sat Aug 7 06:44:44 MDT 2010


Nathan O'Sullivan <nathan at mammoth.com.au> writes:

> I've been doing some basic benchmarking with Unixbench 5.1.2 of different Xen
> kernels and noticed that the reported disk performance was quite variable, but
> with a distinct pattern - some kernels had roughly double the disk speed of
> others.

[...]

> What doesn't make sense is that UnixBench reports roughly double the speed
> when CONFIG_EXT3_FS=m was used - that is, when the initial rootdisk mounted as
> ext2.

It makes perfect sense: aside from ext3 imposing, by default, a global sync
every five seconds, it also requires non-trivial extra seeks to handle journal
writes, and extra barrier or flush operations to assure data integrity.

> Through editing /etc/fstab and rebooting (And checking via 'mount'), I
> determined that whether ext2 or ext3 was used when the filesystem was
> mounted read-write made no difference. Whether UnixBench would be 'fast' or
> 'slow' depended solely on how the root disk was initially mounted readonly -
> ext2 or ext3.

You can't remount as ext3 without unmounting, which for the rootfs is not
trivially possible, so this is "if it was ext3 or ext2" and all.

-o remount doesn't change the file system type, and ext2 is genuinely a
separate driver from ext3.

[...]

> I'm having a hard time understanding how this might even be possible -
> that mounting as ext2 or 3 during the initial root startup could somehow
> affect speed later.

Try adding another, unused, partition to the virtual disk and unmounting it
between different types of file system mount.  I predict it will confirm my
statement above.

Regards,
        Daniel
-- 
✣ Daniel Pittman            ✉ daniel at rimspace.net            ☎ +61 401 155 707
               ♽ made with 100 percent post-consumer electrons


More information about the linux mailing list