Choose a filesystem

Recently we have had some discussions at our team about what filesystem should we stick with our OS upgrades should we reconsider ext4 for some cases?

Since we currently use XFS across the platform some members have brought up again their discontent about the file system not permitting shrinking.

From our users perspective there is minimal differences, from our point we check how large are we going to get this filesystem to be and how well will it perform for our use cases.

I personally had less issues with XFS file system compared to ext4 and since it became default for RHEL with 7, I have been picking XFS over ext4 mainly when we have VM hypervisor problems and host reboots happen journaling seems to be working very well as designed. Doing a replay after crash has been a super helpful way of recovering.

Streaming workload optimization and metadata consistency checking are my favorite features but also performance of concurrent operation support has been good. Some other good features are online de-fragmentation and online filesystem grow operations. There has been also good number of repair utilities available.

XFS has also been performing well on smaller systems which have a multi-threaded, parallel I/O workload. That being said I also suffered from poor performance when a project of ours had millions of small files and they were traversing through those files and these metadata intensive operations were getting a big performance hit.

But again main discussion again was you cannot reduce file system in size. Once allocated and not used you can quickly end up over allocating and not utilizing resources efficiently.

Ext4 and its large storage support has been good and also it does perform as bad as XFS with small files when run single threaded operations.

You can also shrink ext4 filesystem so its more flexible compared to XFS. We still do have warm fuzzy feelings towards fsck. And yeah if you remember doing that on older ext3 or ext2 you will notice its way faster.

So here are some questions we ask to our users and ourselves before making a decision:

What is the general size of your files and data sets?
Will we need to reduce filesystem size?
What kind of I/O are we going to be seeing on this system?
If we have storage issues how much downtime is reasonable?

I don’t coming across articles without proper conclusion and here is my take on this.

If you have good reliable large storage systems and do have CPU to allocate (since XFS consumes more cpu for metadata operations) go with XFS.

If your users have single rw and use many many small files you should consider ext4.