System RAM and OpenVZ Utilization [message #9482] |
Sat, 06 January 2007 02:02  |
rexxe
Messages: 8 Registered: January 2007
|
Junior Member |
|
|
Hello,
I have a server with 8 GB of RAM. I have three VEs, one for Apache, one for PostgreSQL, and one for Tomcat. I have tuned each one and have gotten it to the point when load testing with about 300 users I get no errors in any params in the UBC. However, when I run vzmemcheck I have enormous utilization, well over 1.0 in some of the cases. However, when I run 'free' I still have close to 3 GB of RAM free and all of my swap space free. What's going on? 3 GB of RAM free seems way too much for system daemons (which are minimal) and different caches. Is there something I need to look at to give the VEs a bigger share of the RAM?
Thanks for your help!
|
|
|
|
|
Re: System RAM and OpenVZ Utilization [message #9486 is a reply to message #9482] |
Sat, 06 January 2007 12:25   |
rickb
Messages: 368 Registered: October 2006
|
Senior Member |
|
|
Quote: | hen I run vzmemcheck I have enormous utilization.. However, when I run 'free' I still have close to 3 GB of RAM free and all of my swap space free. What's going on
|
The numbers seem to add up. You box is using 3912MB of ram overall based on /proc/meminfo.
Then, the breakdown for VE utilization is:
16+191+3696=3903
Quote: |
Is there something I need to look at to give the VEs a bigger share of the RAM?
|
Are you saying that your VEs are attempting to allocate memory but are failing? Or, are you wanting to see all of your memory used? I don't see any apparent problems. The combined applications in your VEs are using 3903MB of ram. I'm guessing your HN is just running sshd and not much else since the difference between 3903 and 3912 is only 9MB of ram.
Hope this points you in the right direction.
-------------
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: System RAM and OpenVZ Utilization [message #9489 is a reply to message #9487] |
Sat, 06 January 2007 18:02   |
rickb
Messages: 368 Registered: October 2006
|
Senior Member |
|
|
Quote: | I want to see my VEs using all available memory.
|
This goes back to one of my questions to you. Are you having memory allocation problems? ie, if your applications are allocating X pages of memory in total, why would you expect free to report usage any higher then X? So, if you are not having memory allocation problems, the amount of memory used is the amount of memory your applications are allocating, its that simple. You can't force your memory to be utilized, read below.
Quote: |
how can I increase the memory given to it without increasing the utilization
|
What do you mean "given"? There is an allocation limit (privvm) and memory guarantees (oomguar,vmguar). Adjusting any UBC metrics will not effect the utilization by itself. Instead, applications inside your VE will effect the utilization.
Hope this clears it up for you.
-------------
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: System RAM and OpenVZ Utilization [message #9493 is a reply to message #9489] |
Sat, 06 January 2007 21:44   |
rexxe
Messages: 8 Registered: January 2007
|
Junior Member |
|
|
Ok, I think I understand a little bit better, but maybe helping me through an example would help me more.
VEID 103 has Tomcat. I am running Tomcat with java flags such that the Java Heap space min and max are 3550mb. So obviously, I want to make sure that VEID 103 has at least that much memory available to it. So when I start Tomcat, everything is fine. However, now when I run vzmemcheck -v, VEID shows that it's utilization is 40+. So Tomcat is obviously overutilizing which is causing instability in the VE. When I check UBC, I have no failures. So, how do I ensure that Tomcat gets at least the 3550mb and keep the utilization to 1.0 so things don't become unstable?
[Updated on: Sat, 06 January 2007 22:01] Report message to a moderator
|
|
|
|
Re: System RAM and OpenVZ Utilization [message #9496 is a reply to message #9493] |
Sun, 07 January 2007 02:10  |
rexxe
Messages: 8 Registered: January 2007
|
Junior Member |
|
|
I think my main problem is understanding how to interpret the results from vzmemcheck. The wiki and docs say to keep the numbers under 1.0 (when not megabytes). What does that mean? The default output is %, so should I keep it under 1%? Or by 1, does that mean 100%?
|
|
|