Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Aug 1999 16:29:41 -0700
From:      David Greenman <dg@root.com>
To:        "Ronald F. Guilmette" <rfg@monkeys.com>
Cc:        Dan Nelson <dnelson@emsphone.com>, questions@FreeBSD.ORG
Subject:   Re: Per-process memory overhead 
Message-ID:  <199908092329.QAA09300@implode.root.com>
In-Reply-To: Your message of "Mon, 09 Aug 1999 15:13:51 PDT." <23333.934236831@monkeys.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
>
>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




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