I wanted to optimize my all SSD storage array on my FreeNAS server but I had a hard time finding information in one place. After a lot of digging I pulled things from several places. This is what I came up with. It boiled down to two main settings
- ashift
- recordsize
zdb -U /data/zfs/zpool.cache | grep ashift
I read here a recommended setting of ashift=13, recordsize=8k for VM workloads on SSDs.
How to change recordsize:
This is easily done in the GUI or command line and can be changed on the fly.
zfs set recordize <value> <volume>
How to change ashift:
Backup your data and destroy the pool.
Modify the setting dictating minimum ashift setting as outlined here
sysctl vfs.zfs.min_auto_ashift=13
Re-create the pool.
Note: this lustre wiki actually recommends ashift 12 instead of 13.
UPDATE 2/26/20: You can also set the ashift at pool creation time as dictated here
zpool create POOL_NAME -o ashift=12 ...
Additional reading
http://open-zfs.org/wiki/Performance_tuning#Alignment_shift
https://www.reddit.com/r/zfs/comments/7pfutp/zfs_pool_planning_for_vm_storage/