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:
All filesystems perform equally well here apart btrfs, which is way slower.
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?
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:
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:
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.