Change arc size----------------------- echo #number in bytes here#>> /sys/module/zfs/parameters/zfs_arc_max
You’ll have to basically put in that command after every boot and each time you stat/stop a VM. (Edit: Might be easier to simply have a cron every hour or something)
@winnielinnie’s memeing is honestly pretty true - there is something that feels like linux doesn’t free up arc memory as quickly as freebsd did. Am I smart enough to prove or fix this? No, so I just work around it. Should it behave this way? Likely not.
The same thing happens in Solaris 10 & 11. If the application checks for currently free memory, it gets what is free. If it attempted to simply allocate the memory and check the return code for success, it would succeed. ZFS would release enough ARC entries, in the proper order, (like any good cache), to not only allow the application it’s requested memory. But, also to keep the minimum free memory.
Now I do agree that FreeBSD’s memory management of ZFS ARC memory is superior to Linux, unfortunately people think Linux is the way to go…