memory leak?
Ivan Voras
ivoras at freebsd.org
Mon Aug 23 12:36:22 UTC 2010
On 08/23/10 11:50, n dhert wrote:
> After a reboot of my FreeBSD 8.0-p4 system
> a vmstat shows:
> Mon Aug 23 08:40:00 CEST 2010
> procs memory page disks faults cpu
> r b w avm fre flt re pi po fr sr da0 pa0 in sy cs us
> sy id
> 1 1 0 1515M 7118M 816 5 5 0 726 0 0 0 138 2376 1740 1
> 2 97
> My system had been allocated 8 Gb memory in a Vmware ESXi4 virtual machine.
> avm = active virtual pages, fre = size of free list
> 2525M + 7118M is 9600M is this normal? (more than 8 Gb..)
See here, on a physical machine with 4 GB RAM:
procs memory page disks faults cpu
r b w avm fre flt re pi po fr sr ad0 cd0 in sy cs
us sy id
1 0 0 5571M 1254M 30 0 0 0 29 0 0 0 8 519 522
0 0 100
We have 5571+1254=6825 MB.
The catch is in the description - active *virtual* pages belonging to
processes - they do not have to correspond to physical RAM.
> six days ago is was:
> 3 1 0 2446M 1552M 628 0 0 0 621 6 0 0 30 939 572 1
> 5 22 0 2260M 816M 489 0 0 0 478 2 0 0 27 957 580
> avm + free adds up to only 3 Gb.
> Where is the rest of the memory ??
There are a lot other uses for memory. Try running "top" a couple of
time when you seem to detect the leak and add together the various
categories of memory.
> Is there a memory leak, how to find what causes the memory leak?
If indeed there is, which is not probable, you first need to discover is
it in a userland program or in kernel. If in kernel, use "vmstat -m" to
track usage over time and see if some category increases when it shouldn't.
Also, since you are running vmware, maybe you should try running
emulators/open-vm-tools and its vmmemctl driver - it could help if your
host is running out of memory.
More information about the freebsd-questions
mailing list