FreeNAS 11 & reserving memory for VMs and/or capping ZFS memory

Status
Not open for further replies.

Osiris

Contributor
Joined
Aug 15, 2013
Messages
148
Hi guys,

I could use some advice here.
One of my nasses has 32G RAM for only a 3x3TB z1 and a 4x2TB z2 pool ...
What happens is that zfs tends to consume all RAM (after doing some read write activity, after boot)
It seems to even grab memory from the VMs and swapping starts to occur, rendering certain VM activity extremely slow.

I've seen some info on tuning memory & arc size (also the FreeBSD tuning guide), but not a real straightforward way to 'cap' the memory used by ZFS.
I would assume that I should be able to limit it to 1GB per TB or something, no?

Does anyone have the same problem?
 
Last edited by a moderator:

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
ZFS will typically release RAM when it's needed by other applications. If you're seeing your swap being utilized, then you may consider limiting the amount of RAM ZFS uses. You can set the sysctl of vfs.zfs.arc_max to adjust the maximum ARC size. In my case, I have it set to 8GB ( vfs.zfs.arc_max=8589934592) as I only have 16GB RAM and have a couple of applications in jails (Just for reference, I have 5x2TB in RAIDZ2 and it performs pretty well). The sysctl vfs.zfs.arc_max can be adjusted on the fly so you don't have to reboot to see the results.
 
Status
Not open for further replies.
Top