EXT3 vs EXT4 vs XFS vs BTRFS - filesystems comparison on Linux kernel 3.0.0

Written by Gionatan Danti on . Posted in Linux & Unix

User Rating:  / 24
PoorBest 

Postgresql performance

Postgresql is another widely adopted open souce database system. It has an historical focus on correctness and scalability over pure speed. How todays heroes will perform with it?

First, lets examine the time needed to create a test database and populate it with 100K rows:

Sysbench postgresql prepare

All filesystems perform equally well here apart btrfs, which is way slower.

Sysbench postgresql simple

In this simple read-only test all filesystems perform quite well, with ext3 slightly behind the others.

Will the complex, read-write test change anything?

Sysbench postgresql complex

Now the faster filesystems are ext4 and xfs, while the slower are ext3 and btrfs.

Xfs again seems a very well-rounded filesystem, but will another test confirm this victory? Lets compare Sysbench results with pgbench ones. First, lets see how much time is needed to create a test database with a scale factor set to 100:

Pgbench prepare

Ext3 is the slower again, with the others scoring similar results. We must say that ext4 is the faster here, but with a low margin.

It is time of real pgbench performance results now:

Pgbench tps results

Again we see that ext4 is the leader, with xfs and btrfs battling for the second place. Ext3 continue to be the slower.

So, what filesystem is the best for a postgresql workload? As btrfs shows a very high prepare time, I think that the real battle is between ext4 and xfs: all considered, I think that ext4 is the best filesystem for postgresql (in this case at least), but xfs really is a viable alternative.

Comments   

 
#1 D Mackney 2012-09-12 11:35
What a well presented resume of Linux file systems.
Now a question, have you considered reviewing the BeFS as
used by the Haiku OS, as it would be interesting to see how it
compares to, say, the XFS file-sysem, especially as there seems
to be an implied 'Speed advantage' in its function.
Regards.
 
 
#2 Daniel OConnell 2013-05-26 04:33
xfsdump and xfsrestore

Why I use xfs.
 

You have no rights to post comments