# Changes recommended for reducing writes on SSDs, this is generally all bad for hard drives: https://serverfault.com/questions/950794/how-to-limit-zfs-writes-on-nvme-ssd-in-raid1-to-avoid-rapid-disk-wear/950896#950896
# This may cause data loss and increase other resource usage (like CPU, etc).
# This script assumes your zfs pool is rpool.
echo"Enabling a variety of settings to reduce writes on SSDs. This may cause data loss and increase the usage of other resources like CPU. DO NOT run this on a hard drive. Hit Ctrl + C to cancel."
zfs setlogbias=throughput rpool # Change logbias to throughput. Don't do this if you have a custom log device for your pool. You'll want latency for that.
zfs setrecordsize=16K rpool # This works better with lots of little writes, and seems to be recommended for VMs on SSDs unless your workload is many large writes.