For one of my main servers I’ve set the lxd default pool to a ssd mirror where this default pool is it’s own ZFS dataset. Having purchased the ssd’s for this pool a little less than a year ago, and truthfully they were also utilized on a previous Truenas build that didn’t work out well I am now realizing:
-
I purchased the wrong type of SSD for the application I am using them in (should have gotten enterprise drives)
-
I need to pay attention to SSD wear and write amplification (The reason for this post)
So this comes to the question: What are the recommended ZFS Pool settings for LXD to allow for good performance while minimizing wear on the SSD’s??
Looking around a little, most people when discussing ZFS, SSD’s and applications/VM’s are suggesting the below tweaks:
- Recordsize - set this to somewhere between 16k and 64k for most applications and especially VM’s
- Logbias - set this to “throughput”
- Compression - set this to LZ4
Are there any other guidelines/settings we should be ensuring are set when utilizing a ZFS dataset as the default pool?
Here is the iostat of my zfs mirror that contains the LXD dataset: