I'm starting to look at ZFS, doing tests with FreeNAS on an old HP MicroServer (N40L). Didn't get extra RAM yet so it's only running with 2 GB, so pretty much no cache.
I created a pool on a single 1 TB SATA disk, created a zvol, and exported it with iSCSI. I just ran a few tests with CrystalDiskMark on Windows 10 and I'm getting weird results when changing the pool bock size.
ZFS 16K and NTFS 4K
-----------------------------------------------------------------------
CrystalDiskMark 5.1.0 x64 (C) 2007-2015 hiyohiyo
Crystal Dew World : http://crystalmark.info/
-----------------------------------------------------------------------
* MB/s = 1,000,000 bytes/s [SATA/600 = 600,000,000 bytes/s]
* KB = 1000 bytes, KiB = 1024 bytes
Sequential Read (Q= 32,T= 1) : 105.938 MB/s
Sequential Write (Q= 32,T= 1) : 98.709 MB/s
Random Read 4KiB (Q= 32,T= 1) : 8.330 MB/s [ 2033.7 IOPS]
Random Write 4KiB (Q= 32,T= 1) : 6.243 MB/s [ 1524.2 IOPS]
Sequential Read (T= 1) : 93.946 MB/s
Sequential Write (T= 1) : 72.780 MB/s
Random Read 4KiB (Q= 1,T= 1) : 8.948 MB/s [ 2184.6 IOPS]
Random Write 4KiB (Q= 1,T= 1) : 6.898 MB/s [ 1684.1 IOPS]
Test : 1024 MiB [X: 0.0% (0.2/849.9 GiB)] (x1) [Interval=5 sec]
Date : 2016/01/12 18:54:05
OS : Windows 10 Professional [10.0 Build 10586] (x64)
Everything is as I'd expect here compared to the same disk used as a SATA disk in the client PC.
- A little sequential performance is a lost because of the iSCSI overhead.
- Random reads are better, some caching there.
- Random writes are better because of the COW makes the writes not actually random.
ZFS 4K and NTFS 4K
-----------------------------------------------------------------------
CrystalDiskMark 5.1.0 x64 (C) 2007-2015 hiyohiyo
Crystal Dew World : http://crystalmark.info/
-----------------------------------------------------------------------
* MB/s = 1,000,000 bytes/s [SATA/600 = 600,000,000 bytes/s]
* KB = 1000 bytes, KiB = 1024 bytes
Sequential Read (Q= 32,T= 1) : 24.405 MB/s
Sequential Write (Q= 32,T= 1) : 81.038 MB/s
Random Read 4KiB (Q= 32,T= 1) : 3.048 MB/s [ 744.1 IOPS]
Random Write 4KiB (Q= 32,T= 1) : 55.971 MB/s [ 13664.8 IOPS]
Sequential Read (T= 1) : 42.362 MB/s
Sequential Write (T= 1) : 45.292 MB/s
Random Read 4KiB (Q= 1,T= 1) : 0.961 MB/s [ 234.6 IOPS]
Random Write 4KiB (Q= 1,T= 1) : 9.576 MB/s [ 2337.9 IOPS]
Test : 1024 MiB [X: 0.0% (0.2/799.9 GiB)] (x1) [Interval=5 sec]
Date : 2016/01/12 19:10:22
OS : Windows 10 Professional [10.0 Build 10586] (x64)
A few notes:
- The network usage doesn't go over 600 Mb (task manager on the Windows 10), so less than in the first test were it was fully used.
- The CPU usage is about double that of the first test, but still at least 20% idle (top on FreeNAS server)
Here I didn't expect that!
- Sequential performance is lower. Maybe more smaller packets transmitted, so network not fully used?
- Lower random reads. It's really only less caching, still over the disk performance. But why less cache?
- Random writes are much better with Q=32. I'd say ZFS is writing 16K (12K empty) when writing 4K in the previous test. Is that really the case?