Limit ZFS ARC Cache on Core?

knebb

Dabbler
Joined
Feb 14, 2024
Messages
13
Hi,

I have a TrueNAS Core system with 64GB. My ZFS Pool will be around 8T as mirror and no deduplication. And I will run one or two VMs with approx. 8GB of RAM of each.
Now having a look at the VM configuration page I see only 0.1 bytes of free memory. And when I power on a VM I am getting a warning about too low memory.
Bildschirmfoto 2024-02-18 um 11.31.48.png

I understand ARC and I know it is using nearly all available memory for caching which makes sense and is fine. And I know ZFS behaves very aggresively in consuming memory. However, I want to use some parts of my memory for my VMs. From a usual OS POV it should decrease the memory used by ARC and make it available to VMs as needed. In ZFS I have the experience this is not happening, for whatever reason. I have seen similar behaviour on QNAP QTShero, and from using the search here it is more or lesse the same on TrueNAS SCALE with Linux as a base.
Bildschirmfoto 2024-02-18 um 11.39.33.png


What I now need to know how I can limit the ARC memory on my TrueNAS CORE? Whatever I have found here was either outdated (FreeeNAS 10.x) or for SCALE.

So how do I limit my memory usage for ARC?

Thanks a lot!

/KNEBB
 

LarsR

Guru
Joined
Oct 23, 2020
Messages
719
Arc will dynamically adjust itself. If you reserve 8gb for a vm arc will shrink itself down. You should not need to manually adjust the maximum arc size.
 

knebb

Dabbler
Joined
Feb 14, 2024
Messages
13
If this is the case (what I would expect from OS view) then there should not be a warning when powering on the VM.
I will monitor and report, as soon as I have a VM properly up and running.
 
Top