From owner-freebsd-fs@FreeBSD.ORG Mon Jun 7 23:29:14 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3FC5106566B for ; Mon, 7 Jun 2010 23:29:14 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail14.syd.optusnet.com.au (mail14.syd.optusnet.com.au [211.29.132.195]) by mx1.freebsd.org (Postfix) with ESMTP id 54F788FC08 for ; Mon, 7 Jun 2010 23:29:13 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c211-30-160-13.mirnd2.nsw.optusnet.com.au [211.30.160.13] (may be forged)) by mail14.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o57NTAj3000531 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 8 Jun 2010 09:29:12 +1000 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.4/8.14.4) with ESMTP id o57NTApC058778 for ; Tue, 8 Jun 2010 09:29:10 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.4/8.14.4/Submit) id o57NTACe058777 for freebsd-fs@freebsd.org; Tue, 8 Jun 2010 09:29:10 +1000 (EST) (envelope-from peter) Date: Tue, 8 Jun 2010 09:29:10 +1000 From: Peter Jeremy To: freebsd-fs@freebsd.org Message-ID: <20100607232909.GA57423@server.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jI8keyz6grp/JLjh" Content-Disposition: inline X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.20 (2009-06-14) Subject: ZFS memory usage X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jun 2010 23:29:14 -0000 --jI8keyz6grp/JLjh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 =3D "x" x 1000000;' sort-of works - by forcing the VM system into real memory shortage. Is there a better work-around? --=20 Peter Jeremy --jI8keyz6grp/JLjh Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEUEARECAAYFAkwNgMUACgkQ/opHv/APuIdQ3gCgvipKI+Dalgu9JATA2CHohjy1 8U8AljXf+S28MzAjT0It336mNQGC0wQ= =jsoE -----END PGP SIGNATURE----- --jI8keyz6grp/JLjh--