Re: Question about memory settings [message #10598 is a reply to message #10595] |
Fri, 23 February 2007 13:08   |
rickb
Messages: 368 Registered: October 2006
|
Senior Member |
|
|
This error: "can“t allocate enough memory" means your VE has exhausted the privvmpages UBC. You can verify by checking the failcnt column of privvmpages in /proc/user_beancounters of the VE.
No one can tell you how much privvmpages to give the VE. It is the same question as "how much ram should I put in this physical server"? The answer is always "as much as you can afford". So, in this case, how much you can afford is how much physical ram the HN has.
For example, if your HN has 8GB of ram and 10 VEs and you anticipate each using 256MB on average, you can safely set privvmpages to 3-4GB for each VE and vmguar/oomguar to 256MB. This guarantees each VE 256MB of ram for its applications and allows each to use up to 3-4GB of ram while no other VEs need it for their 256MB. So, for anyone to intelligently answer your question, they would need to know the details about your applications and their memory requirements. If you are selling the VE space, you need to figure out how much each is guaranteed and base usage off that number.
------------------------------------------
+8GB total
+10 VEs
+256MB avg use / guarantee on each VE
10*256 = 2.5GB used for VE guars
8GB-2.5=5.5GB mem left over
The 10 VEs together will have on average, 5.5GB of burstable memory (above their 256MB) guarantee. 3-4GB privvm in my example above is less then 5.5GB by design. This means one VE can't starve the system memory at all. Adjust your numbers accordingly.
------------------------------------------
Hope this points you in the right direction!
Rick Blundell
-------------
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
[Updated on: Fri, 23 February 2007 13:11] Report message to a moderator
|
|
|