Subject: Re: R6
To: matthew green <mrg@mame.mu.oz.au>
From: Chris G. Demetriou <cgd@alpha.bostic.com>
List: port-sparc
Date: 08/21/1994 20:17:00
> also vmstat's avm field is a
> little, uh, wrong too..
let me guess, it says something like:
procs memory page disks faults cpu
r b w avm fre flt re pi po fr sr ?0 ?1 ?2 ?3 in sy cs us sy id
1 0 0 78668 12636 24 4 1 0 0 0 0 0 0 0 0 254 32 10 5 85
i.e. avm is much more than the amount of RAM in your machine?
well, you know... from the man page for vmstat:
memory Information about the usage of virtual and real
memory. Virtual pages (reported in units of 1024
bytes) are considered active if they belong to pro-
cesses which are running or have run in the last 20
seconds.
avm active virtual pages
fre size of the free list
now, you'll note that what that ends up saying is that all virtual
pages in all processes that have been run in the last 20 seconds are
counted...
which means that, say, if a process with N k of 'personal' use of RAM
also happens to mmap() in 1M of shared libraries, that 1M of virtual
memory will be added to AVM. this is because even though the object
backing them might be the same, the fact that it's mapped 2x (or N
times) means that there are N _virtual_ copies...
So, that number is correct.
However, it's not very useful. A more useful measure would be, for
instance, the amount of memory being used by active virtual memory in
the system...
I've heard of at least one patch to make this number 'more useful',
but i've not yet had time to investigate it.
cgd
------------------------------------------------------------------------------