Subject: Re: Memory totals under top on 1.6_BETA
To: None <email@example.com>
From: Chris Gilbert <firstname.lastname@example.org>
Date: 07/29/2002 11:39:47
> On 28 Jul 2002, Chris Gilbert wrote:
>> On Thu, 2002-07-25 at 16:25, David Brownlee wrote:
>> > Machine has 1GB of RAM, top reports:
>> > Memory: 525M Act, 265M Inact, 2316K Wired, 7220K Exec, 635M File,
>> > 5056K Free
>> > Ading them all up gives 1439 MB.
>> > Act + Wired + Exec + File + Free = 1174 MB
>> > Am I missing something?
>> yes top doesn't show all the numbers, the groupings should be:
>> Act + Inact + Wired + Free (missing pages to be paged)
>> Exec + File (and missing some others, eg Anon, Zero pages, and
>> Reserved pages, zero and reserved are near constant)
>> Using the above you've got:
>> 525 + 265 + 2.3 + 5 = 797.3, which is a couple of hundred less then
>> expected (what does dmesg give as your total available?)
> total memory = 1023 MB
> avail memory = 945 MB
>> 7.2 + 635 = 642.5 again not quite there either, the missing chuck
>> being anon pages normally.
>> The other place to get figures is:
>> vmstat -s
>> but perhaps ain't as handy as top.
>> If you're really interested try the attached patch. (you might want to
>> trim the paging and reserved bits out though)
> Thanks, with that I get:
> Memory: 266M Act, 960K Inact, 2008K Wired, 647M Free, 161M Anon, 6336K
> Exec, 131M File, 24K Rsvd
> Swap: 2258M Total, 2258M Free
> Act + Inact + Wired + Free = 916M
Hmm, I wonder where the other 31MB have gone, how big is the kernel in top?
> Exec + File + Anon + Rsvd + Wired + Inact + Free = 948MB
That should be:
Exec + File + Anon + Rsvd + Free = 945MB
> Would it make sense to put Anon etc on a second line in top?
Possibly, however that's yet another line gone in headers, which would make
6, on an 80x24 display you've now only got 16 lines of processes. Although
looking at it we could move things around and share the Swap space line)
And Rsvd is constant really, so that could/should be ignored.