Thursday, October 28, 2010

Unix File-Systems: why EXT4?

Ext4 is here since the Linux 2.6.28 kernel, and henceforth some of the most popular Linux distributions have been adopting it. In some cases, e.g. Ubuntu, it's actually the default file system.
It it really worth to abandon the very well known EXT3 or ReiserFS, which have proven its value for several years now?

Just for minimal information, EXT4 is mostly like an update to EXT3, not really a revolution, which has several advantages over it and is backwards compatible. In the mainline of the improvements is the use of extents instead of block mapping like XFS or Apple HFS+ already do, which is designed to improve performance with the creation of larger files, and will reduce fragmentation on the hard disk. Furthermore, EXT4 features delayed allocation, persistent pre-allocation, and journal check summing.

For a clearer idea, here you find some benchmark results from Phoronix
Ok, one can see that the large file creation really benefits from extents with a significant 50% margin.

For sequential read the performance gain is also very significant, although XFS performs a little bit better. EXT3 and ReiserFS are outperformed by more than 55%

And if you had doubts between EXT4 and XFS, this last test shows how the filesystems perform against a server disk activity simulation. EXT4 performs 3x better than XFS and almost 100% better than the usual competitors.

So, if you are or ever been in doubt, I assume you have good reasons to not think again in the same issue. EXT4 is there and is actually faster for most disk usage patterns.