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
  [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to