OpenVZ Forum


Home » General » Support » /proc/user_beancounters and vzlist giving different outputs
/proc/user_beancounters and vzlist giving different outputs [message #24696] Fri, 07 December 2007 21:40 Go to next message
blunt is currently offline  blunt
Messages: 16
Registered: October 2007
Junior Member
well I created a script for checking my ram usage.

Using the output of /proc/user_beacncounters, the total bytes of ram being used are: 20931303
with vzlist -o with the same fields that I use with the beancounters, the sum is 20847588.

I've checked for differences, and at least kmemsize show different values in user_beancounters and in vzlist -o kmemsize...is this normal? Which one is the correct one?

Thank you
Re: /proc/user_beancounters and vzlist giving different outputs [message #24699 is a reply to message #24696] Fri, 07 December 2007 21:48 Go to previous messageGo to next message
ugob is currently offline  ugob
Messages: 271
Registered: March 2007
Senior Member
Are you doing the checks at exactly the same time? Memory usage varies.

You should try using vzmemcheck instead.


[root@server ~]# vzmemcheck -Av
Output values in Mbytes
veid LowMem LowMem RAM MemSwap MemSwap Alloc Alloc Alloc
util commit util util commit util commit limit
109 1.55 88.35 18.78 18.78 387.97 48.08 387.97 1424.51
103 0.91 88.35 8.30 8.30 387.97 13.17 387.97 1424.51
102 0.98 88.35 10.01 10.01 387.97 17.28 387.97 1424.51


Please read the manual before asking questions:
http://download.openvz.org/doc/OpenVZ-Users-Guide.pdf

Please have a look at the wiki before asking questions:
http://wiki.openvz.org/Main_Page
Re: /proc/user_beancounters and vzlist giving different outputs [message #24700 is a reply to message #24699] Fri, 07 December 2007 21:52 Go to previous messageGo to next message
blunt is currently offline  blunt
Messages: 16
Registered: October 2007
Junior Member
yes I have both calculations made in the same script.

They show a little difference in bytes, but the one based on user_beancounters is always +-100kb bigger than the vzlist -o mode...

can't figure out why..

vzmemcheck shows a value that is closer to the vzlist mode, but lower...
Re: /proc/user_beancounters and vzlist giving different outputs [message #24748 is a reply to message #24700] Sun, 09 December 2007 13:11 Go to previous messageGo to next message
blunt is currently offline  blunt
Messages: 16
Registered: October 2007
Junior Member
Does anyone have a clue on why this happens?

vzmemcheck shows 16,95Mb of usage, vzlist and /proc/user_beancouters show 17,1Mb (but not the same in bytes: 17969188 for beancounters, 17955105 for vzlist).

Which is the output I should trust of being more accurate?

thank you
Re: /proc/user_beancounters and vzlist giving different outputs [message #24760 is a reply to message #24748] Sun, 09 December 2007 22:48 Go to previous messageGo to next message
ugob is currently offline  ugob
Messages: 271
Registered: March 2007
Senior Member
I can't speak for the others, but I think that you're making a big deal out of a minimal difference between two outputs.

Please read the manual before asking questions:
http://download.openvz.org/doc/OpenVZ-Users-Guide.pdf

Please have a look at the wiki before asking questions:
http://wiki.openvz.org/Main_Page
Re: /proc/user_beancounters and vzlist giving different outputs [message #24772 is a reply to message #24696] Mon, 10 December 2007 08:34 Go to previous messageGo to next message
blunt is currently offline  blunt
Messages: 16
Registered: October 2007
Junior Member
I just wanted to know because this time the difference is small, but I don't know if it may be a bigger one...

that is why I wanted to know which one i should trust...
Re: /proc/user_beancounters and vzlist giving different outputs [message #24773 is a reply to message #24748] Mon, 10 December 2007 09:35 Go to previous message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

You can check vzlist sources to find out how it calculates those numbers, and compare it with your own way.

Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Previous Topic: Another cElementTree issue with FC7
Next Topic: HowTo modify parameters in /etc/sysconfig/vz-scripts/ve-vps conf
Goto Forum:
  


Current Time: Sat Jul 27 07:22:56 GMT 2024

Total time taken to generate the page: 0.03061 seconds