zfs_arc_max realtime

spearox

Renowned Member
Jun 6, 2013
97
2
73
Dear Members,

I would like to ask about the /etc/modprobe.d/zfs.conf
Can I change the options zfs zfs_arc_max=X parameter realtime somehow? There are running VM's and I don't would like to restart.

Thanks.
 
No, the options are loaded when the module is inserted into the kernel.
 
Ehm, you can w/o reboot by:

echo "your wanted size in byte" > /sys/module/zfs/parameters/zfs_arc_max

and a

echo 3 > /proc/sys/vm/drop_caches

Thanks!

Can you tell me please what this do exactly? "echo 3 > /proc/sys/vm/drop_caches"
 
Well, if you want to decrease your ARC, you need to free the already allocated memory.

https://linux-mm.org/Drop_Caches

Running that drop_caches command _should_ free the reclaimable RAM from the ARC. There are some deficiencies in the ZFS on Linux memory management though, which could cause this *not* to happen

To set the max_size "more save" w/o a host reboot, you could just un-/ and reload zfs module, but forsure this needs to shutdown all processes which use ZFS (e.g. your VMs on ZFS pool)