The past few Linux kernel releases have brought a number of new file-systems to the Linux world, such as with EXT4 having been stabilized in the Linux 2.6.28 kernel, Btrfs being merged into Linux 2.6.29, and most recently the NILFS2 file-system premiering with the Linux 2.6.30 kernel. Other file-systems have been introduced too during the past few Linux kernel release cycles, but these three have been the most talked about and are often looked at as being the next-generation Linux file-systems. Being the benchmarking junkies that we are, we have set out to compare the file-system performance of EXT4, Btrfs, and NILFS2 under Ubuntu using the Linux 2.6.30 kernel. We also looked at how these file-systems compared to EXT3 and XFS.
Before we begin, here is a quick summary of these three new file-systems. EXT4 is the successor to EXT3 and this file-system can now support volumes up to 1 Exabyte, introduces Extents to replace traditional block mapping, supports persistent pre-allocation and delayed allocation for improving performance, brings journal check-summing to the EXT family, and file-system checking is faster under EXT4. Previously we delivered real-world benchmarks of EXT4 and found it to be a nice performance step above EXT3 in a majority of the tests. Install-time support for EXT4 was introduced with Ubuntu 9.04. EXT3 has been in the Linux kernel since 2001 and is what a majority of the Linux desktop distributions had been using as the default file-system.
The Btrfs file-system has yet to be stabilized and is currently at version 0.19 with its on-disk format not yet being finalized. Btrfs supports online defragmentation, an SSD optimized mode, copy-on-write logging, zlib compression, object-level mirroring and stripping, sub-volumes, and writable snapshots. A few months back we delivered Btrfs benchmarks with support for this file-system now being available through Red Hat's Anaconda installer in Fedora 11. These benchmarks found Btrfs to perform well in some areas, but there's a lot left to be desired.
NILFS2 is the latest file-system to be talked about and it stands for the New Implementation of a Log-structured File System. As implied by its name, this is a log-structured file-system, and like Btrfs, it supports snapshots. Other features of NILFS2 include CRC32 checksums, a B-tree structure for managing file and inode blocks, and support for files up to eight exabytes in size. This will be out first time benchmarking NILFS2 at Phoronix.
Our test system for this file-system benchmarking comparison consisted of dual AMD Opteron 2384 quad-core "Shanghai" processors, Tyan Thunder n3600M motherboard, 4GB of DDR2 ECC Registered memory, an AMD FirePro V8700 1GB graphics card, and a Western Digital 160GB Serial ATA 2.0 hard drive for hosting the Ubuntu 9.04 installation. The disk drive we used for carrying out the file-system benchmarks was a Seagate 250GB SATA 2.0 ST3250310AS (7200RPM; 8MB cache). Originally, we were going to also throw a solid state drive into the mix, but with these tests taking longer than anticipated on the newer file-systems, in this article are just the HDD results. We will be publishing solid-state drive benchmarks in the near future, likely from an OCZ Vertex SSD.
The SATA HDD was formatted to the respective file-system at the time of testing and with the Phoronix Test Suite we specified the drive's mount point as the PTS environment directory to use for carrying out this testing. All mount options and file-system settings were left at their defaults, as with the operating system settings. Making up the OS was a daily snapshot of Ubuntu 9.10 from 2009-06-21 with the Linux 2.6.30 kernel, GNOME 2.27.3, X Server 220.127.116.111, xf86-video-radeon 6.12.2, Mesa 7.4.1, and GCC 4.4.0.
Beyond just testing the EXT4, Btrfs, and NILFS2 file-systems, we also threw in some results from EXT3 and XFS. For facilitating this large file-system performance comparison was the Phoronix Test Suite. We were using the latest 2.0 Sandtorg code of this open-source benchmarking software. The test profiles we used consisted of Parallel BZIP2 Compression, Bork File Encrypter, SQLite, PostgreSQL, Apache HTTP, IOzone, Dbench, Threaded I/O Tester, PostMark, and BlogBench.