Subject: 'top' memory stats
To: None <port-mac68k@NetBSD.ORG>
From: Matthew Ahrens <matt@callnet.com>
List: port-mac68k
Date: 01/28/1997 01:14:03
I know that this question is not specific to this group, but I thought that
maybe someone here might know.

in 'top' (v3.4) there are a number of statistics concerning memory, but I
understand very few of them.

First, there is the "Memory:" line. here is an example:
Memory: 7996K Act 5240K Inact 3196K Wired 2180K Free 36% Swap
OK, i guess i can accept 'Act' for 'Active' and 'Inact' for 'Inactive',
'Free' and 'Swap' are obvious, but what is 'Wired'?? Also, the numbers in
each of Act, Inact, Wired, and Free add up to approximately the amount of
real RAM i have installed (20MB), but shouldn't the swap space be accounted
for somewhere in there?? my 'pstat' shows that it is using 19MB of swap
space in addition to my 20MB real RAM:

[play.callnet.com:root]/>pstat -s
Device      1K-blocks     Used    Avail Capacity  Type
/dev/sd0b       53000    19236    33764    36%    Interleaved

Second, there are two columns that seem to be related to memory: 'SIZE' and
'RES'. At one point, I thought that 'SIZE' was the amount of memory the
program had allocated, and 'RES' was the amount resident or actively in use
or not swapped out or something like that. However, i have seen some
processes have a larger RES than SIZE, so i guess that blows that theory,
though SIZE does seem to be larger than RES most of the time.

if anyone has any thoughts on this, let me know.
--matt
Matthew Ahrens
<mailto:matt@callnet.com>
<http://www.callnet.com/~matt>