Either I'm calculating things out wrong, or vzmemcheck is reporting incorrect values.
Some notes about my system:
Debian 6
Kernel 2.6.32-5-openvz-amd64
System Memory 6103328k
Swap Space 19836912k
I've currently got 1 container that's set for 1G of memory.
For some reason vzmemcheck is reporting that I've got 0.49 MemSwap commit and 4.13 Alloc Limit.
vzmemcheck -v
Output values in %
veid LowMem LowMem RAM MemSwap MemSwap Alloc Alloc Alloc
util commit util util commit util commit limit
101 0.10 0.91 0.16 0.04 0.49 0.05 0.61 4.13
-------------------------------------------------------------------------
Summary: 0.10 0.91 0.16 0.04 0.49 0.05 0.61 4.13
Looking at UBC_systemwide_configuration#Allocated_memory (can't use a link cause I'm new) it says that Alloc Limit is calculated by:
privvmpages(lim) * 4096 + kmemsize(lim) + allsocketbuf(lim) / (Ram size + swap space)
So I plug in the values for my VE:
privvmpages(lim) = 262144
kmemsize(lim) = 14790164
tcpsndbuf = 2703360
tcprcvbuf = 2703360
othersockbuf = 2252160
dgramrcvbuf = 262144
Plugging those values into the equation I get:
(262144 * 4096 + 14790164 + 2703360 + 2703360 + 2252160 + 262144) / (6249807872 + 20312997888)
...
1096453012 / 26562805760 = 0.0413
Which is off by a factor of 100.
Can anyone tell me if I'm calculating the aloc limit correctly? If I am calculating it correctly, should I worry about vzmemcheck reporting incorrectly?
Any help is appreciated.
Thanks!