Bonnie++ results

Sequential and random read/write speeds are two factors that can greatly influence final application speed. Let's start examining Bonnie++ sequential speed and CPU usage:

Bonnie++ sequential speed

While EXT4 and XFS generally show comparable results both in normal, cached mode and in synchronous mode, XFS lead the sequential output (write) test by a very large margin. To tell the truth, the EXT4 sequential output test results seem unrealistically low.

What about random speed? Bonnie++'s random I/O speed return the number of seeks per second that the disk subsystem can sustain:

Bonnie++ seeks per sec

The mechanical nature of current hard disks implies results that are some order of magnitude lower than the sequential ones: considering 512 byte long sectors, we are speaking about a maximum I/O transfer rate of ~264 KB/s. Considering 4096 byte long sector, the I/O transfer rate grows to a maximum of ~2114 KB/s. In this test, we see that EXT4 has a slight advantage; however, in the synchronous mode the two contenders are tied.

Let's now see file creation/deletion, aka metadata handling, performance. First, normal mode:

Bonnie++ file creation/deletion

EXT4 really eclipses XFS in this test, scoring some very high results. However, you can argue that the ~2500 new files/sec scored by XFS should be enough for any kind of workload.

Now, synchronous mode:

Bonnie++ sync file creation/deletion

This time, XFS was the best.

So, from Bonnie++ tests we noted that, while EXT4 excel in metadata handling, XFS seems to be faster transferring I/O block from the disk subsystem, and its synchronous behavior seems to be more robust than EXT4 one.

One last thing to note is that Bonnie++ sometime crashed the entire machine when running on top of EXT4 filesystem. The cause the crash is under investigation, but seems related to out of memory conditions. While Bonnie++ (in synchronous mode) was the only test that trigger the crash, the fact that it bring down the entire machine is a bad thing. XFS, on the other hand, never had this problem.