OpenVZ Forum


Home » General » Support » System RAM and OpenVZ Utilization
System RAM and OpenVZ Utilization [message #9482] Sat, 06 January 2007 02:02 Go to next message
rexxe is currently offline  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 #9483 is a reply to message #9482] Sat, 06 January 2007 06:09 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
Paste us the exact outputs so that we can see the details ourselves. This will make it a lot easier for us to understand the situation rather then basing it on your interpretation.

vzmemcheck -vA; free -m


-------------
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 #9484 is a reply to message #9483] Sat, 06 January 2007 09:31 Go to previous messageGo to next message
rexxe is currently offline  rexxe
Messages: 8
Registered: January 2007
Junior Member
Here you go......

free -m:

             total       used       free     shared    buffers     cached
Mem:          7887       4922       2964          0         79        931
-/+ buffers/cache:       3912       3975
Swap:         2000          0       2000


============================================================ ====

vzmemcheck -vA

Output values in Mbytes
veid        LowMem  LowMem     RAM MemSwap MemSwap   Alloc   Alloc   Alloc
              util  commit    util    util  commit    util  commit   limit
101           3.39   21.03   15.80   15.80   45.03  829.23   45.03 2637.00
102           6.66   31.83  190.68  190.68   55.83  528.08   55.83  868.94
103          11.35   44.43 3696.90 3696.90   68.43 4022.65   68.43 12601.07
-------------------------------------------------------------------------
Summary:     21.40   97.30 3903.39 3903.39  169.30 5379.96  169.30 16107.02
        3154.00 3154.00 7887.00 9887.00 9887.00 9887.00 9887.00 9887.00


============================================================ ====

vzmemcheck -v

Output values in %
veid        LowMem  LowMem     RAM MemSwap MemSwap   Alloc   Alloc   Alloc
              util  commit    util    util  commit    util  commit   limit
101           0.11    0.67    0.20    0.16    0.46    8.39    0.46   26.67
102           0.21    1.01    2.42    1.93    0.56    5.34    0.56    8.79
103           0.36    1.41   46.87   37.39    0.69   40.68    0.69  127.45
-------------------------------------------------------------------------
Summary:      0.68    3.08   49.49   39.48    1.71   54.41    1.71  162.90


As you can see veid 103 has some very high utilization percentages....

Thanks for your help
Re: System RAM and OpenVZ Utilization [message #9486 is a reply to message #9482] Sat, 06 January 2007 12:25 Go to previous messageGo to next message
rickb is currently offline  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 #9487 is a reply to message #9486] Sat, 06 January 2007 17:46 Go to previous messageGo to next message
rexxe is currently offline  rexxe
Messages: 8
Registered: January 2007
Junior Member
The hardware node has 8 gb of physical RAM. I want to utilize all of it, not just 3912mb. That leaves over 4gb of RAM left to use. I want to see my VEs using all available memory.

Based on the documentation, aren't all the utilizations supposed to be below 1.0 when looking at vzmemcheck -v? VEID 103 has utilization much higher than that, so how can I increase the memory given to it without increasing the utilization (based on the formulas on the wiki, increasing the buffers and memory increases the utilization)?

Thanks.
Re: System RAM and OpenVZ Utilization [message #9488 is a reply to message #9482] Sat, 06 January 2007 17:48 Go to previous messageGo to next message
mperkel is currently offline  mperkel
Messages: 253
Registered: December 2006
Senior Member
Are you running a 64 bit kernel?

Re: System RAM and OpenVZ Utilization [message #9489 is a reply to message #9487] Sat, 06 January 2007 18:02 Go to previous messageGo to next message
rickb is currently offline  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 Go to previous messageGo to next message
rexxe is currently offline  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 #9494 is a reply to message #9488] Sat, 06 January 2007 21:45 Go to previous messageGo to next message
rexxe is currently offline  rexxe
Messages: 8
Registered: January 2007
Junior Member
Yes
Re: System RAM and OpenVZ Utilization [message #9496 is a reply to message #9493] Sun, 07 January 2007 02:10 Go to previous message
rexxe is currently offline  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%?
Previous Topic: *SOLVED* Can't mount:
Next Topic: VPS users interfere with HN ones
Goto Forum:
  


Current Time: Sat Aug 09 22:19:12 GMT 2025

Total time taken to generate the page: 1.03344 seconds