OpenVZ Forum - RDF feed
type: channel
items: System RAM and OpenVZ Utilization
items: Re: System RAM and OpenVZ Utilization

System RAM and OpenVZ Utilization
type: item
description: 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!
creator: rexxe
date: 2007-01-06T02:02:30-00:00

Re: System RAM and OpenVZ Utilization
type: item
description: 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
creator: rickb
date: 2007-01-06T06:09:50-00:00

Re: System RAM and OpenVZ Utilization
type: item
description: 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
creator: rexxe
date: 2007-01-06T09:31:51-00:00

Re: System RAM and OpenVZ Utilization
type: item
description: 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.
creator: rickb
date: 2007-01-06T12:25:53-00:00

Re: System RAM and OpenVZ Utilization
type: item
description: 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.
creator: rexxe
date: 2007-01-06T17:46:08-00:00

Re: System RAM and OpenVZ Utilization
type: item
description: Are you running a 64 bit kernel?
creator: mperkel
date: 2007-01-06T17:48:57-00:00

Re: System RAM and OpenVZ Utilization
type: item
description: 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.
creator: rickb
date: 2007-01-06T18:02:00-00:00

Re: System RAM and OpenVZ Utilization
type: item
description: 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?
creator: rexxe
date: 2007-01-06T21:44:05-00:00

Re: System RAM and OpenVZ Utilization
type: item
description: Yes
creator: rexxe
date: 2007-01-06T21:45:32-00:00

Re: System RAM and OpenVZ Utilization
type: item
description: 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%?
creator: rexxe
date: 2007-01-07T02:10:21-00:00