OpenVZ Forum


Home » General » Support » *SOLVED* Memory usage query
*SOLVED* Memory usage query [message #12441] Sat, 28 April 2007 09:30 Go to next message
arpad is currently offline  arpad
Messages: 16
Registered: November 2006
Junior Member
Hi!

I think I'm a little bit confused. I used to set privvmpages to control the memory usage of a VE like this:
vzctl set <VEID> --privvmpages 320M:320M --save

Now this VE exceeded this limit .I checked the current memory usage and I there is some differences between the memory usage showed by cat /proc/user_beancounters and the summarized memory usage from the output of ps vax.

The /proc/user_beancounters says there is 72807 pages allocated it's ~284MB (with 4K/page).
The sum of the ps vax's RSS field gives me just ~237MB.

Why the difference is so big? There are only approx. 25 process on this node.

How can I set that the node can use all of the 320M what I planned?

Thanks,

Arpad

[Updated on: Wed, 02 May 2007 07:12] by Moderator

Report message to a moderator

Re: Memory usage [message #12443 is a reply to message #12441] Sat, 28 April 2007 10:32 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
privvmpages is not memory in use, its allocated memory. you can malloc() your heart out, and throw your privvmpages thru the ceiling, without copying any bits to your ram, rss. check the UBC wiki page for privvmpages and physpages definitions.

I wouldn't set privvm that low, 75% of the HN's physical memory is a good estimate, assuming you have more then a few VEs on the node.



-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: Memory usage [message #12446 is a reply to message #12443] Sat, 28 April 2007 10:49 Go to previous messageGo to next message
arpad is currently offline  arpad
Messages: 16
Registered: November 2006
Junior Member
Ok. I think I understand it now.

The privvmpages is for the allocated RAM which can be unused so it's always greater than the real memory usage. If I limit this option my customers (not all the VE's belongs to me, some are rented to others) get smaller resources than I defined. It's not good behaviour to me.

The physpages is the amount of the used memory. It's always below or equal than the privvmpages value. But the manual said this is only accounting parameter. I think there will be no effect if I changed it. IMHO. Sad

What will happen if I set the privvmpages to unlimited and the physpages to 320M? It will simulate a machine with 320M RAM (thats my destiny) or it doesn't limits the memory at all?

Thanks,

Arpad
Re: Memory usage [message #12447 is a reply to message #12446] Sat, 28 April 2007 10:54 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
If you want to simulate a machine with 320MB of ram, set privvm, vmguar, oomguar all to 320M.

phypages is an accounting parameter, you cannot change it. Because so many applications allocate memory but never use it, the vz architecture has the dual concept of memory utilization- privvm and phys.


-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: Memory usage [message #12448 is a reply to message #12447] Sat, 28 April 2007 11:00 Go to previous message
arpad is currently offline  arpad
Messages: 16
Registered: November 2006
Junior Member
Thanks. Now it's crystal clear for me. Smile

Arpad
Previous Topic: OpenSuSE precreated no connectiviy
Next Topic: *SOLVED* DNS lookup not working inside the VPS
Goto Forum:
  


Current Time: Mon Jul 15 20:06:56 GMT 2024

Total time taken to generate the page: 0.02471 seconds