Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Jan 2003 12:40:33 -0700 (MST)
From:      James Gritton <gritton@iserver.com>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   What's the memory footprint of a set of processes?
Message-ID:  <200301291940.h0TJeXm1022866@guppy.dmz.orem.verio.net>

next in thread | raw e-mail | index | archive | help
How do I find how much memory (real and/or virtual) is being used by a set
of processes, taking shared pages into account?  I see per-process numbers I
can use (vmspace_resident_count and vmspace_swap_count), and overall usage
numbers exist, but I can't find a better way of measuring multiple processes
than adding their individual totals together.  This can lead to wild
inaccuracies if a few processes share a lot of pages (Java comes to mind, as
do database servers).  Is there some kind of reference count I can access
per page, or some not-too-expensive way to see what processes are using a
page?  I see some things in the VM code that look like recerence counts
(such as act_count in struct vm_page), but they don't seem to really be
such, or at least they don't count what I'm expecting them to.

This is on 4.7.  I haven't really looked at 5, so I don't know how different
it is.

- James Gritton
  gritton@iserver.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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