----- Original Message -----
From: "RW" <rwmailli...@googlemail.com>
To: <freebsd-hackers@freebsd.org>
Sent: Thursday, December 01, 2011 1:58 PM
Subject: Re: Invalid memory stats from vmstat and sysctl vm.vmtotal?
On Wed, 30 Nov 2011 12:39:10 -0000
Steven Hartland wrote:
We're seeing some impossible memory usage stats reported on machines
here from vmstat and sysctl vm.vmtotal.
We have machines reporting to be using 31GB total when they only have
8GB physical and are not using any swap.
Here's an output from one of our machines:-
vmstat -c 2 -w 1 -n 0
procs memory page faults cpu
r b w avm fre flt re pi po fr sr in sy cs us
sy id 0 0 0 31768M 2112M 586 0 0 0 421 0 106 270
569 0 6 94 0 0 0 31768M 2112M 2 0 0 0 0 0 370
8139 3996 0 1 99
...
It looks like it may be out by a factor of 4, possibly due to the fact
the its a 4k page size not 1k as indicated by the vmstat man page:-
I don't think so, I have 16GB and tops shows:
Mem: 817M Active, 396M Inact, 1364M Wired, 82M Cache, 1282M Buf, 13G
Free
but
vmstat -c 2 -w 1 -n 0
procs memory page faults cpu
r b w avm fre flt re pi po fr sr in sy cs us sy
id 0 0 0 9750M 13G 450 5 3 1 560 0 234 50201 5206 2
2 96 1 0 0 9742M 13G 79 4 0 0 573 0 239 51886 4700
0 1 99
Hmm, yes on another machine same OS with 16GB memory we see:-
dmesg | grep memory
real memory = 17179869184 (16384 MB)
avail memory = 16536604672 (15770 MB)
vmstat -c 2 -w 1 -n 0
procs memory page faults cpu
r b w avm fre flt re pi po fr sr in sy cs us sy id
0 0 0 1948M 666M 395 14 0 0 398 1966 3237 5980 14085 2 4 93
1 0 0 1948M 636M 4 0 0 0 16 0 8215 18660 35322 2 7 92
sysctl vm.vmtotal
vm.vmtotal:
System wide totals computed every five seconds: (values in kilobytes)
===============================================
Processes: (RUNQ: 1 Disk Wait: 0 Page Wait: 0 Sleep: 194)
Virtual Memory: (Total: 1075975332K Active: 1979056K)
Real Memory: (Total: 309048K Active: 160804K)
Shared Virtual Memory: (Total: 75112K Active: 18860K)
Shared Real Memory: (Total: 15656K Active: 10572K)
Free Memory Pages: 731960K
but with top:-
last pid: 38187; load averages: 0.15, 0.16, 0.16 up 2+23:33:55 15:13:02
195 processes: 1 running, 194 sleeping
CPU: 0.0% user, 0.0% nice, 4.1% system, 0.0% interrupt, 95.9% idle
Mem: 886M Active, 12G Inact, 2194M Wired, 599M Cache, 1630M Buf, 138M Free
Swap: 8192M Total, 1512K Used, 8190M Free
So I've no idea whats going on?
Regards
Steve
================================================
This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it.
In the event of misdirection, illegible or incomplete transmission please
telephone +44 845 868 1337
or return the E.mail to postmas...@multiplay.co.uk.
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"