Ryan’s Blog

March 28, 2009

Comparing boot performance of Ext3, Ext4, and XFS on Ubuntu Jaunty

Filed under: Linux, Ubuntu — Tags: , , , , , , — Ryan @ 12:19 am

Ext4 is all the rage, with different postings saying different things, usually exagerrating its boot performance over other file systems:

So here, armed with the scientific method, I will try to debunk some of this using Bootchart.

For the purpose of our experiment we have the following machine:

AMD Athlon64 3200+ processor

2 GB DDR 400 RAM

160 gig 7200 RPM Seagate Barricuda hard drive

OS: Ubuntu Jaunty Beta X86-64, clean installed, with no updates past what the disc provides.

——————

Ext3: Is the most popular Linux file system in use today, so we should probably start here.

Ext3 Boot Chart

Ext3 Boot Chart

As we can see, it took 27.7 seconds to boot on Ext3, which isn’t horrible for a system like this.

Disk Throughput Average: 51 MB/sec

——————

Ext4: This is the new replacement for Ext3, to get optimal performance you should cleanly format it, not “upgrade your Ext3 partition”, anyway, lets see how a clean Ubuntu install does here:

Ext4 Boot

Ext4 Boot

24.68 seconds=3.02 seconds faster than Ext3=roughly 11% faster boot, not bad, but not “night and day” noticeable. While the time for boot went down, it actually scored lower than Ext3 on average disk throughput which is just weird. *shrugs*

Disk Throughput Average: 41 MB/sec

——————

Finally XFS: XFS is what I use normally, Ubuntu compiles it as modules though, so this will hurt its performance, it has to stop and load 3 more things as it boots vs. building it into the kernel.

I asked an Ubuntu developer about this once and they said they build in Ext file systems because each module loading takes about 0.5 seconds, so I’d subtract about 1.5 seconds from XFS to give it back the time it takes for ubuntu’s kernel to load modules. (I always build XFS into *my* kernels though).

XFS Boot

XFS Boot

Boot Time: 26.95 seconds (Assuming 25.45 seconds if you built it in instead)

Disk Throughput Average: 57 MB/sec

—–

I am declaring the winners to be:

Boot time:

Statistical tie in first place for Ext4 and XFS, XFS came in a bit behind because of the way Ubuntu has chosen to support it, but other than adding 1.5 seconds to your boot if you use Ubuntu kernels, it’s essentially the same.

Ext3 loses by 2.25 seconds (adjusted) to XFS and by 3.02 seconds to Ext4.

Disk Throughput:

First Place: XFS with 57 MB/sec

Second Place Ext3 with 51 MB/sec

Third Place Ext4 with 41 MB /sec

——————

Ext4 may have won the title of fastest boot to XFS in a photo finish, but all three file systems were within a 3 second window of each other, so not a huge difference. You could stop Ext3/4 from doing their fsck and gain maybe a second but it’s not worth risking having a corrupted disk and not knowing it.

Ext4 took a beating in disk read throughput, not only to XFS, but even its predecessor Ext3! I was not expecting that to happen at all, and re-ran the test to make sure it wasn’t a fluke (42 MB/sec on the rerun).

I think this raises some questions about Ext4’s performance. Although it still has definite advantages over Ext3 (faster file deletions, less fragmentation, etc.), XFS still clearly trounces it on overall raw throughput. XFS is also fast with large file operations, and has a defragmenter. (xfs_fsr)

My conclusion:

I’ll continue to use XFS, it really has never let me down. Ext4 may do some things better than Ext3, but it still seems to be in need of some work.

—Update—

Let’s do ReiserFS and JFS just for the hell of it. Nobody should actually use these as they are essentially abandoned though.

ReiserFS: The first journaling file system for Linux, Linus Torvalds merged it because Suse and a bunch of other distros were using it to get away from Ext2. Today Hans Resier spends his days trying not to drop the soap after murdering his wife.

Reiser Boot

Reiser Boot

Ouch, maybe it *is* a module, but I don’t think a second or so shaved off Reiser will make any difference after that insanely long Reiserfsck.

Boot Time: 40.13

Average Disk Throughput: 52 MB/sec

——————

JFS: IBM’s Journaling File System was ported from OS/2 and is now competing with ReiserFS for the bitrot crown.

JFS Boot

JFS Boot

Well, we can see that it’s not the worst boot time, but after ReiserFS, what could be. The Disk Throughput shows JFS to be the slowest by far.

Boot Time: 30.13 seconds

Average Disk Throughput: 39 MB /sec (Ouch)

Our Final List:

Boot Time:

1. Tie between Ext4 and XFS.

2. Ext3

3. JFS

4. ReiserFS (Reiserfsck makes the boot chart look like an EKG…..We’re losing him! CLEAR!!!)

Disk Throughput:

1. XFS (by a mile)

2. ReiserFS

3. Ext3

4. Ext4

5. JFS (Again, ouch!)

8 Comments »

  1. Could you be reading the data wrong? I think disk throughput is a poor indicator of just about anything during boot since wall clock time is all that matters. XFS could simply have to read more superblocks or some exercise some other data structures that just happens to hit while the boot is limited by CPU rather than disk I/O. ext4 is probably the best choice for 97% of desktop users.

    Comment by Kevin Bowling — March 28, 2009 @ 10:46 am

  2. I asked Eric Sandeen, he had a big hand in XFS and Ext4.

    Me: sandeen: Higher disk throughput on bootchart is a good thing(TM) yes? I had someone ask if I read that wrong or something.

    Eric Sandeen Well, I suppose. assuming that all that IO was necessary.

    So there you go.

    I’m assuming that XFS was actually getting that throughput and some external factor in the Ubuntu kernel or bootup process made it boot a little bit slower than Ext4. I’d rather lose a couple seconds on boot if XFS is really capable of throughput that’s that much better.

    Comment by Ryan — March 29, 2009 @ 1:12 am

  3. His point was the same as mine: “assuming that all that IO was necessary”

    My speculation was that XFS required more bootstrap housekeeping, hence it exercised the disks more (which results in higher “throughput”). If that is the case, the number is essentially meaningless in respect to boot time.

    Disk throughput comparison would be more appropriate for a filesystem benchmark such as bonnie or iozone.

    Comment by Kevin Bowling — March 29, 2009 @ 1:18 am

  4. [...] Comparing boot performance of Ext3, Ext4, and XFS on Ubuntu Jaunty Boot Time: [...]

    Pingback by Links 29/03/2009: GNU/Linux at DreamWorks, Bubba | Boycott Novell — March 30, 2009 @ 3:22 am

  5. Well, reiserfsck should not happen during bootime. You can place “0″ at the end of the appropriate line in fstab to avoid it.

    Comment by Kamil Vratny — March 30, 2009 @ 1:57 pm

  6. Hi interesting tests, i think the label is the maximum (green), not the average.

    What get’s me is that the disk is 100%busy (Disk Util, and the Cpu is waiting for io I/OWait) for a lot of the time, but the transfer is so low (green).

    There must be big improvements possible if we can get the throughput of the disk to be more consistent.

    Comment by diepes — May 9, 2009 @ 9:23 pm

  7. Hi, I think that comparing ReiserFS (a very outdated FS) with others is just as fair as comparing JFS with others. It would be nice to include Reiser4, a stable successor of ReiserFS (almost as EXT4 is for EXT3, except for the backward compatibility).

    Thank you for the post, very enlightening.

    Comment by Arthur — August 25, 2009 @ 3:58 pm


RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.