PDA

View Full Version : Memory Usage


lordrich
12-07-2006, 04:23 PM
I'm getting confused by memory usage again. I'm using the following script:

#/bin/bash
awk '/oomguarpages/ {print "RAM Guarantee: " $2/256 "MB in use out of " $4/256 "MB with a maximum of " $3/256 "MB"}' /proc/user_beancounters
awk '/privvmpages/ {print "Allowed Burst RAM: " $2/256 "MB in use out of " $4/256 "MB with a maximum of " $3/256 "MB"}' /proc/user_beancounters
awk '/vmguarpages/ {print "Virtual Memory Guarantee: " $2/256 "MB in use out of " $4/256 "MB with a maximum of " $3/256 "MB"}' /proc/user_beancounters

And I'm seeing:

RAM Guarantee: 141.988MB in use out of 244.141MB with a maximum of 188.152MB
Allowed Burst RAM: 243.66MB in use out of 1953.12MB with a maximum of 296.422MB
Virtual Memory Guarantee: 0MB in use out of 256.016MB with a maximum of 0MB

Does that really mean I'm using 141Mb out of an available 244? Or does it mean I'm using 243 out of an available 244? And if one of those is correct, what does the other one mean? The RRD graph from server usage history indicates the 141 figure would be correct, but given that's an average I don't want to rely on it.