Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Jun 2010 09:29:10 +1000
From:      Peter Jeremy <peterjeremy@acm.org>
To:        freebsd-fs@freebsd.org
Subject:   ZFS memory usage
Message-ID:  <20100607232909.GA57423@server.vk2pj.dyndns.org>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
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

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iEUEARECAAYFAkwNgMUACgkQ/opHv/APuIdQ3gCgvipKI+Dalgu9JATA2CHohjy1
8U8AljXf+S28MzAjT0It336mNQGC0wQ=
=jsoE
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100607232909.GA57423>