The current statistics data:
cat /proc/spl/kstat/zfs/arcstats
c
is the target size of ARC in bytes
c_max
is the maximum size of the ARC in bytes
size
is the current size of the ARC in bytes
To change the limit check
cat /sys/module/zfs/parameters/zfs_arc_max
Also, we can check zfs_arc_min in the same directory
We can also set the current zfs_arc_max on the fly by setting the value there.
To set the value to 10GB:
echo "$[10 * 1024*1024*1024]" >/sys/module/zfs/parameters/zfs_arc_max
To permanently change the ARC limit, modify the /etc/modprobe.d/zfs.conf file:
- To set the max value to 8GB:
options zfs zfs_arc_max=8589934592
If the root file system is ZFS, need to update the initramfs every time this value is changed.
update-initramfs -u
Reference: