Skip to content

Instantly share code, notes, and snippets.

@click0
Last active September 21, 2019 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save click0/82beeb7ebaa90fbe14460b3d8dbe4016 to your computer and use it in GitHub Desktop.
Save click0/82beeb7ebaa90fbe14460b3d8dbe4016 to your computer and use it in GitHub Desktop.
#!/bin/bash
zfs_arc_min=4 #G
zfs_arc_max=8 #G
cat << EOF >> /etc/modprobe.d/zfs.conf
# ZFS tuning for a proxmox machine that reserves 64GB for ZFS
#
# Don't let ZFS use less than 4GB and more than 64GB
options zfs zfs_arc_min=$(( ${zfs_arc_min} * 1024 * 1024 * 1024 ))
options zfs zfs_arc_max=$(( ${zfs_arc_max} * 1024 * 1024 * 1024 ))
#
# disabling prefetch is no longer required
options zfs l2arc_noprefetch=0
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment