FreeBSD 8.2 - active plus inactive memory leak!?

Konstantin Belousov kostikbel at gmail.com
Wed Mar 7 10:06:05 UTC 2012


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:
> > > > 
> > > > The pages belonging to vnode vm object can be active or inactive or cached
> > > > but not mapped into any process address space.
> > > 
> > > Thank you, Konstantin.  Does the number of vnodes we've got open on this
> > > machine (272011) fully explain away the memory gap?
> > > 
> > >         Memory gap:
> > >         11264M active + 2598M inactive - 9297M sum-of-resident = 4565M
> > >         
> > >         Active vnodes:
> > >         vfs.numvnodes: 272011
> > > 
> > > That gives a lower bound at 17.18Kb per vode (or higher if we take into
> > > 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.
> 
> 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?
> 
> 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.
> 
> Can 5779M of memory be explained by 272011 vnodes entries?
It can be explained why whatever count of vnodes. This is cached vnode
pages.

> 
> > > Okay, so this could be UFS disk cache, except the system is ZFS-on-root
> > > with no UFS filesystems active or mounted.  Can I confirm that no
> > > double-caching of ZFS data is happening in active + inactive (+ cache)
> > > memory?
> > 
> > ZFS double-buffers the mmaped files.
> 
> 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.
-------------- 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/20120307/89179f61/attachment.pgp


More information about the freebsd-fs mailing list