EXT4 vs XFS: large volumes with low-end RAID controller

Written by Gionatan Danti on . Posted in Linux & Unix

User Rating:  / 16
PoorBest 

Fragmentation

Fragmentation is the #1 enemy of mechanical disks, as every head movement correspond to lower total I/O performance.

Both EXT4 and XFS has a fame to be very fragmentation resistant, but what is the best? Let's start with counting fragments per file after the extraction of the Linux kernel .tar.bz2 file (see the untar test above for more informations):

Fragmentation after untar

Yeah, both filesystems where exceptionally resistant to fragmentation here, showing perfect results.

Sysbench's sequential and random tests give us another interesting point of reference in this discipline. First, the fragmentation status after the sequential write test:

Fragmentation after sysbench seqwr

Now XFS is the leader, with EXT4 lagging quite behind. It is interesting to note that in the synchronous test (one write / one fsync) EXT4 exhibits lower fragmentation: this can explain the higher sequential read results in synchronous mode recorded earlier. Speaking about XFS, it seems that this filesystem optimally manage large files and its high sequential read/write speeds are likely a results of the complete lack of fragmentation in these class of files.

The random write test is a harder one:

Fragmentation after sysbench rndwr

In this case, both filesystems become heavily fragmented, proving that no filesystem is completely immune to this issue. However, XFS has and edge here: it ships with a functional, proved defragmenter, while the EXT4 package lack an official, stable-released defrag utility (while this utility exists, it is more-or-less in a beta stage).

Comments   

 
#1 musculare 2014-04-13 09:08
Spot on with this write-up, I absolutely think this website needs far more attention.
I'll probably be back again to see more, thanks for the info!
 

You have no rights to post comments