From owner-freebsd-hackers Wed Jan 29 11:45:32 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E87037B405 for ; Wed, 29 Jan 2003 11:45:31 -0800 (PST) Received: from rwcrmhc52.attbi.com (rwcrmhc52.attbi.com [216.148.227.88]) by mx1.FreeBSD.org (Postfix) with ESMTP id A5E8543F43 for ; Wed, 29 Jan 2003 11:45:30 -0800 (PST) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org (12-232-168-4.client.attbi.com[12.232.168.4]) by rwcrmhc52.attbi.com (rwcrmhc52) with ESMTP id <2003012919453005200dtskae>; Wed, 29 Jan 2003 19:45:30 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id LAA26201; Wed, 29 Jan 2003 11:45:29 -0800 (PST) Date: Wed, 29 Jan 2003 11:45:28 -0800 (PST) From: Julian Elischer To: James Gritton Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: What's the memory footprint of a set of processes? In-Reply-To: <200301291940.h0TJeXm1022866@guppy.dmz.orem.verio.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG check out /proc//map for a really detailed map of the process. On Wed, 29 Jan 2003, James Gritton wrote: > 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 > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message