ZFS performance can be improved be tweaking some settings. I always set these when using both Proxmox and TrueNAS Core, or any other ZFS setup. You should stripe mirrors for the best IO, RAIDZ2 is not exactly fast, and I personally don’t use it for pools larger than 10 disks.

  • make sure when you created your zfs pool that you used the ashift=12 for setting the block size on your disks
  • zfs set xattr=sa (pool) set the Linux extended attributes as so, this will stop the file system from writing tiny files and write directly to the inodes
  • zfs set sync=disabled (pool) disable sync, this may seem dangerous, but do it anyway! You will get a huge performance gain.
  • zfs set compression=lz4 (pool/dataset) set the compression level default here, this is currently the best compression algorithm.
  • zfs set atime=off (pool) this disables the Accessed attribute on every file that is accessed, this can double IOPS
  • zfs set recordsize=(value) (pool/vdev) The recordsize value will be determined by the type of data on the file system, 16K for VM images and databases or an exact match, or 1M for collections 5-9MB JPG files and GB+ movies ETC. If you are unsure, the default of 128K is good enough for all around mixes of file sizes.
  • You will see no gains with read cache or an SLOG with your configuration, don’t bother.

ZFS loves RAM. you can also tweak the ARC to a larger size for some performance gains.

https://forums.servethehome.com/index.php?threads/very-slow-zfs-raidz2-performance-on-truenas-12.33094

Leave a Reply

Your email address will not be published. Required fields are marked *