From owner-freebsd-questions Mon Aug 9 16:36:20 1999 Delivered-To: freebsd-questions@freebsd.org Received: from implode.root.com (root.com [209.102.106.178]) by hub.freebsd.org (Postfix) with ESMTP id A17AF15355 for ; Mon, 9 Aug 1999 16:36:13 -0700 (PDT) (envelope-from root@implode.root.com) Received: from implode.root.com (localhost [127.0.0.1]) by implode.root.com (8.8.8/8.8.5) with ESMTP id QAA09300; Mon, 9 Aug 1999 16:29:41 -0700 (PDT) Message-Id: <199908092329.QAA09300@implode.root.com> To: "Ronald F. Guilmette" Cc: Dan Nelson , questions@FreeBSD.ORG Subject: Re: Per-process memory overhead In-reply-to: Your message of "Mon, 09 Aug 1999 15:13:51 PDT." <23333.934236831@monkeys.com> From: David Greenman Reply-To: dg@root.com Date: Mon, 09 Aug 1999 16:29:41 -0700 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > >In message <199908092106.OAA08248@implode.root.com>, you wrote: > >>>Each executing instance of this program now shows up as having an RSS of >>>36 KB. I _know_ that 12 KB of that is the (sharable) text segment, so that >>>leaves 24 KB, per process, to account for. Of that 24 KB, I already know >>>that the program itself is using 8 KB (for data and stack). But note that >>>this still leaves 16 KB per process unaccounted for. >>> >>>So OK. Three questions: >>> >>>1) Where is this extra 16 KB per-process overhead coming from? >> >> The RSS includes the space for the process page directory (1 page) and page >>tables (2 pages), so 12KB. There is also the kernel stack and u area, which is >>a total of 2 pages. > >That's 5 pages. Yes, I was refering to the kstack + u area when I said 2 pages. >I think your math must be slightly off somewhere, because the actual per- >process overhead I'm seeing is actually only 4 pages (16KB). My math is correct, but the kernel stats are probably wrong. The page directory and/or other kernel related pages might not actually be included in the reported RSS...I'd have to look at the code to be sure and in any case what is included has changed over time in different versions of FreeBSD. -DG David Greenman Co-founder/Principal Architect, The FreeBSD Project - http://www.freebsd.org Creator of high-performance Internet servers - http://www.terasolutions.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message