As I am currently fiddling around with Oracle Solaris and the related technologies, I wanted to see how the ZFS file system compares to a hardware RAID Controller. The ZFS file system allows you to configure different RAID levels such as RAID 0, 1, 10, 5, 6. In this post, I want to test the RAID 10 performance of ZFS against the performance with the HP RAID Controller (also in a RAID 10 configuration) over 4 disks.
For this test, I arranged two (quite old) HP DL380 G2 (2x 1.4GHz) with 6x 10k SAS Disks. These servers feature a Smart Array 5i Controller from HP. On both servers, I configured two disks in a RAID 1 configuration as system disk. The other four disks are used for this performance test. Both servers are physically identical apart from the RAID configuration.
Host 1 was configured using the setup utility of the internal RAID controller. The disk was then formatted with ZFS and mounted as “/storage”.
The RAID controller of Host 2 was configured to provide a JBOD to the Operating System. In Solaris, I then used the following command to create a ZFS RAID 10 storage pool:
host2:~# zpool create storage mirror c0t1d0 c0t2d0 mirror c0t3d0 c0t4d0
For the benchmark, I am using IOzone (Version 3.217). I ran IOzone with the following parameters:
iozone -a -f /storage/testfile
The output of IOzone can be found in the following spreadsheet: Hardware RAID vs. ZFS Output
When processing the averages of the output and putting it into a diagram, the following diagram is drawn:
As we can clearly see, the performance of the Hardware RAID controller is a little better than the software RAID. But you shouldn’t jump to a conclusion just seeing this diagram. First of, the servers used in this benchmark are quite old and don’t have fast processors (Intel Pentium!). This can harm the performance of the software solution. Also note that both systems are using their standard settings and were not tweaked or optimised. There are a lot of parameters that can be set in ZFS to optimise performance.
From my own point of view I was surprised that ZFS performed so well in these tests, as I was expecting much worse results. The added flexibility and security of ZFS might be more important in your environment than pure performance. Overall, ZFS is 3-13% slower than a Hardware RAID, depending what load you apply to the file system.