Sunday, August 2, 2009

ZFS: FreeBSD vs Solaris

Following up on the previous benchmark ; I wanted to check on the difference between FreeBSD and Solaris.
Sun being the inventor of ZFS and had plenty of time to fine tune Solaris for it, they had to have it better.

But by how much...

So I installed OpenSolaris 2009.06... Installation was smooth as, very easy... A tad lost after that however as this is very different to FreeBSD or Linux which I'm more familiar with.

Being able to read the ZFS created in FreeBSD was a bit complicated as for some weird reasons, Solaris was convinced the pool was using different partitions (even though the pool was created using entire disks).

So I ran iometer, and here are the results...
On the left FreeBSD 8.0-current (compiled without debugging option to speed things up)
on the right, OpenSolaris 2009.06
Write Sequential: 279MB/s - 289MB/s
Read Sequential: 320MB/s - 362MB/s
Write Random: 249MB/s - 282MB/s
Read Random: 181MB/s - 176MB/s

The use of memory caches is an interesting topic. Solaris seems to make much better use of the memory cache for longer as seen on the graph below, but FreeBSD has faster access to it. FreeBSD however didn't seem to use more than 1GB for write cache, even though 6GB was available. Overall when it comes to accessing the disks directly, Solaris is definitely faster.



No matter what, the motherboard I'm using has dual-gigabit NIC only, so the difference in speed isn't that much relevant... Being much more familiar with BSD, this is what I will continue to use, and no doubt, ZFS support will keep improving.


  1. You should enable AHCI mode in FreeBSD, and make sure to edit your loader.conf to allow for more memory to be cached by ZFS - FreeBSD's defaults don't allow for a lot of memory to be used.

  2. The server is already using AHCI.

    The kernel is a 64 bits kernel, and according to the FreeBSD ZFS's folks, on 64 bits system provided you have more than 2GB of RAM, things will automatically be optimal.

    Server has 6GB of RAM had the time I wrote this article, it has been upgraded since to 12GB of RAM