From owner-freebsd-fs@FreeBSD.ORG Wed Mar 7 10:06:05 2012 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 8AF6810656A6 for ; Wed, 7 Mar 2012 10:06:05 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 010558FC1C for ; Wed, 7 Mar 2012 10:06:04 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q27A5vaW036402; Wed, 7 Mar 2012 12:05:57 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q27A5vr4087265; Wed, 7 Mar 2012 12:05:57 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q27A5vGQ087264; Wed, 7 Mar 2012 12:05:57 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 7 Mar 2012 12:05:57 +0200 From: Konstantin Belousov To: Luke Marsden Message-ID: <20120307100557.GG75778@deviant.kiev.zoral.com.ua> References: <1331061203.2218.38.camel@pow> <4F569DFF.8040807@mac.com> <1331080581.2589.28.camel@pow> <20120307082338.GD75778@deviant.kiev.zoral.com.ua> <1331112366.2589.51.camel@pow> <20120307093109.GF75778@deviant.kiev.zoral.com.ua> <1331113988.2589.64.camel@pow> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CEiQS9p18X4Il5Lz" Content-Disposition: inline In-Reply-To: <1331113988.2589.64.camel@pow> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, PLING_QUERY autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-fs@freebsd.org, team@hybrid-logic.co.uk Subject: Re: FreeBSD 8.2 - active plus inactive memory leak!? 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: Wed, 07 Mar 2012 10:06:05 -0000 --CEiQS9p18X4Il5Lz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 07, 2012 at 09:53:08AM +0000, Luke Marsden wrote: > On Wed, 2012-03-07 at 11:31 +0200, Konstantin Belousov wrote: > > > >=20 > > > > The pages belonging to vnode vm object can be active or inactive or= cached > > > > but not mapped into any process address space. > > >=20 > > > Thank you, Konstantin. Does the number of vnodes we've got open on t= his > > > machine (272011) fully explain away the memory gap? > > >=20 > > > Memory gap: > > > 11264M active + 2598M inactive - 9297M sum-of-resident =3D 45= 65M > > > =20 > > > Active vnodes: > > > vfs.numvnodes: 272011 > > >=20 > > > That gives a lower bound at 17.18Kb per vode (or higher if we take in= to > > > account shared libs, etc); that seems a bit high for a vnode vm object > > > doesn't it? > > Vnode vm object keeps the set of pages belonging to the vnode. There is > > nothing bad (or good) there. >=20 > Thanks. My question is, as an estimate, how large should I expect these > vnode objects to be, in terms of the active + inactive memory they > consume? >=20 > I'm trying to explain 5GB+ of memory which has "gone missing" on this > system. Active memory usage is currently at 13G (and inactive at 1G) > even though only the sum of the resident memory sizes in the output of > 'ps' comes only to 8557MB. >=20 > Can 5779M of memory be explained by 272011 vnodes entries? It can be explained why whatever count of vnodes. This is cached vnode pages. >=20 > > > Okay, so this could be UFS disk cache, except the system is ZFS-on-ro= ot > > > with no UFS filesystems active or mounted. Can I confirm that no > > > double-caching of ZFS data is happening in active + inactive (+ cache) > > > memory? > >=20 > > ZFS double-buffers the mmaped files. >=20 > The only mmap on this system, to my knowledge, is done in Apache's > scoreboard, which is relatively small and doesn't explain the 5G > discrepancy. Any executed binary is mmaped, as well as shared libraries. --CEiQS9p18X4Il5Lz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk9XMwUACgkQC3+MBN1Mb4hiEgCeNDQOrgZHzGxmIlDS8l/HpUFd xz0AnRfPWm/yxVPstuyLt0L0UiZEMoL3 =pPfD -----END PGP SIGNATURE----- --CEiQS9p18X4Il5Lz--