EXT3 vs EXT4 vs XFS vs BTRFS linux filesystems benchmark

Written by Gionatan Danti on . Posted in Linux & Unix

User Rating:  / 128

Sysbench: PostgreSQL performance

The first PostgreSQL benchmark measure the time needed to prepare (populate) the database. It write a single, 100000 records length table:

Sysbench postgresql prepare

Finally, we see a test were BTRFS is the best! While its speed is almost equaled by EXT3, BTRFS can boast an ultra low CPU usage. On the other hand, while EXT4 and XFS have the same ultra low CPU utilization they are 10 times slower. How it is possible? Perhaps we encounter one EXT4/XFS regression, as the somewhat similar Phoronix's SQLite and Postmark tests seems to indicate a severe slowdown in this kind of workload for EXT4 in recent kernels.

Now, let's see sysbench's simple test results:

Sysbench postgresql simple test

This is a 100000 requests, read-only test. As we have no write activity, I didn't expect great variations between results: we see that all filesystems are more or less equivalent here.

Can the much more complex, read-write, transactional test draw a different picture?

Sysbench postgresql complex test

Yes, it can: BTRFS is now awfully slow, scoring less that ¼ of EXT4 and XFS. EXT3 is the clear winner: it has 4X the EXT4/XFS performance here (so it is over 16 times faster than BTRFS!).

This tests shown that for a database system you should really stay with EXT3, at least until the EXT4 regressions are worked out in future kernels.

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