ZFS memory usage

Peter Jeremy peterjeremy at acm.org
Mon Jun 7 23:29:14 UTC 2010


Currently, ZFS does not appear to be able to steal memory from the
"inactive" list, whereas NFS and UFS both return "freed" pages to the
"inactive" list.  Over time, unless you have a pure ZFS box (with no
NFS), this tends to result in ZFS reporting a memory shortage
(kstat.zfs.misc.arcstats.memory_throttle_count increasing), whilst
there is plenty of "inactive" space.

What is involved in correcting this?

At least part of the problem is that
cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c:arc_memory_throttle()
only looks at cnt.v_free_count (number of free pages) when deciding
whether to throttle or not.  Is the fix as simple as changing the
test to check (cnt.v_free_count + cnt.v_inactive_count)?

Assuming that the fix is non-trivial, is there an easy way to transfer
"inactive" memory to the "free" list?  The perl hack:
  perl -e '$x = "x" x 1000000;'
sort-of works - by forcing the VM system into real memory shortage.
Is there a better work-around?

-- 
Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20100607/a62929a9/attachment.pgp


More information about the freebsd-fs mailing list