KB450086 – Setting ZFS on Linux ARC Limit

Last modified: April 7, 2020
You are here:
Estimated reading time: < 1 min

ZFSonLinux defaults to use only 50% of available RAM in the system.

This should be bumped up to 90% in a sole ZFS server, and 80% if other tasks (non ZFS) are running as well.

The RAM variable below should be in bytes. Total available RAM in kb can be found by running the following command. Convert to bytes by multiplying by 1024.

  • RAM_kb = “${cat /proc/meminfo | grep -i memtotal} * RAM = RAM_kb * 1024
  • Create file “/etc/modprobe.d/zfs.conf”
  • echo “options zfs zfs_arc_max=$”{90% * RAM}
  1. echo “options zfs zfs_arc_min=${33% * RAM}
  2. Reboot
  3. Verify with
    1. cat /sys/module/zfs/parameters/zfs_arc_max
    2. cat /sys/module/zfs/parameters/zfs_arc_min

EXAMPLE t0 set ARC max to 45GB

touch /etc/modprobe.d/zfs.conf

echo “options zfs zfs_arc_max=48318382080” >> /etc/modprobe.d/zfs.conf

reboot system

Verify: cat /sys/module/zfs/parameters/zfs_arc_max


Was this article helpful?
Dislike 0
Views: 395
Unboxing Racking Storage Drives Cable Setup Power UPS Sizing Remote Access