From owner-freebsd-hackers Wed Jan 29 22:44:51 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 A1F9237B401 for ; Wed, 29 Jan 2003 22:44:50 -0800 (PST) Received: from HAL9000.homeunix.com (12-233-57-224.client.attbi.com [12.233.57.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1290843F3F for ; Wed, 29 Jan 2003 22:44:50 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.6/8.12.5) with ESMTP id h0U6imNt007470; Wed, 29 Jan 2003 22:44:48 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.6/8.12.5/Submit) id h0U6im8b007469; Wed, 29 Jan 2003 22:44:48 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Date: Wed, 29 Jan 2003 22:44:48 -0800 From: David Schultz To: James Gritton Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: What's the memory footprint of a set of processes? Message-ID: <20030130064448.GA7258@HAL9000.homeunix.com> Mail-Followup-To: James Gritton , freebsd-hackers@FreeBSD.ORG References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Thus spake James Gritton : > The object's ref_count hasn't changed, which is what I meant about seeing > reference counts in the kernel that were apparently not counting what I'm > looking for. I did see a ref_count increase on the first object > (presumably the text image), but nothing on the allocated memory. > > It seems the object level isn't fine enough, but the deeper I go into the > VM code, the more confused I become. In this forked process example, what > happens when I alter a few COW pages in the currently-shared object? > Apparently a shadow object is created, but it claims to be the same size as > the original object. True, but I know it's not actually using that many > pages, since most of them are still validly shared. System usage numbers > tell me this is true, but I can't find what in the process or object data > structures reflect this fact. No, you don't have enough information. Even if you knew which objects shadowed which, I still don't think you would have enough information. You want to account for physical pages, so you should be looking at vm_page structures. AFAIK, there isn't an interface to do that, but one shouldn't be too hard to implement. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message