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!
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
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.
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.
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.
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?
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%?