EXT3 vs EXT4 vs XFS vs BTRFS linux filesystems benchmark

Written by Gionatan Danti on . Posted in Linux & Unix

User Rating:  / 129

Bonnie++: random seeks and file handling

The following graph show the number of random seeks per second and the corresponding CPU load:

Bonnie++ random seeks

BTRFS's results are very disappointing: not only it scores less than 20 seeks/sec, but is also cause a 350% CPU load! This is very strange, as maximum CPU load can only be at 200% (remember that this is a dual core machine). Can be a bonnie++ measurement error? Yes, but I am not sure, as EXT3, EXT4 and XFS seems to score OK. Note that EXT3 is the fastest here: this is an important win, as random performances are relevant for a large number of applications. In contrast, the very low BTRFS's score can be related to a quite complex metadata handling.

How these filesystems stack when creating and deleting a large number of files?

Bonnie++ file creation deletion

Wow! BTRFS is by very far the slowest, at a point where we can not read correctly the other results. Let's examine the same data without BTRFS score:

Bonnie++ file creation deletion without BTRFS

Now we can see that EXT4 is the faster and more efficient filesystem, followed by XFS and finally by EXT3. This file creation/deletion test corroborate my guess about too complex metadata handling for BTRFS filesystem. On the other end of the spectrum, FS with delayed allocation capabilities (EXT4 and XFS) are way faster than the good old EXT3.

UPDATE: preparing the system for another benchmark, I noticed that, in contrast to what written in Fedora 14 documentation, write barriers were non enabled on EXT3 filesystem. Please read the updated "Conclusions" page.


#1 Max 2012-08-26 15:49
Thank you for this very interesting article. I'll go with ext3, mostly because of your verdict for it being a good and balanced filesystem.
#2 Gionatan Danti 2012-08-26 16:11
Hi Max,
I'm happy that you found my article interesting.

However please note that, as you can read in the updates, EXT3 was incorrectly benchmarked with write barrier off, while all other filesystems used barrier on.

This means that EXT3 data were somewhat flawed. For up-to-date data, please read my latest article here: http://www.ilsistemista.net/index.php/linux-a-unix/33-btrfs-vs-ext3-vs-ext4-vs-xfs-performance-on-fedora-17.html

#3 Kuba 2012-10-09 15:01
Hi Gionatan,

Could you please let me know what sysbench parameter you have used to perform these tests?

#4 http:// 2014-03-08 09:57
I believe what you published was very reasonable. But,
what about this? suppose you typed a catchier post
title? I mean, I don't want to tell you how to run your website, however suppose you added something to possibly get people's attention?
I mean EXT3 vs EXT4 vs XFS vs BTRFS linux filesystems benchmark is a little vanilla.

You ought to glance at Yahoo's home page and see how they write
article headlines to get people to open the links.

You might add a video or a pic or two to get readers excited about everything've got to say.
Just my opinion, it could bring your website a little bit more interesting.

You have no rights to post comments