I have minimal Debian VM container running in OpenVz with sun web server, the admin, and no Java apps. The memory is reading 1.5gb for the VM. There is a little more on the Debian bare metal. Does this sound kind of heavy for a VM with Java? Is there suggested tweaks or are other containers better suited for this? That would mean just a few VMs per machine. Thank you for any thoughts or suggestions as I am just getting started with OpenVZ.

TonyZ

link|improve this question
feedback

2 Answers

Is that 1.5GB VSS or resident? 1.5GB of VSS doesn't seem like much for a JVM, it tends to get a little greedy. The problem with allocating a lot of VSS up-front, when running inside of OpenVZ, is the way it deals with overcommitment of memory in guests, and the limitations it puts on that.

I'm an OpenVZ person, not a Java person, so I don't know which JVM settings you should tweak, but I know they're in there somewhere (-mx comes to mind for some reason, but I don't know why). On the OpenVZ side, you can increase privvmpages to allow the JVM to pre-allocate more memory, but that can really only work well if you manage the entire machine and all the VMs in it, and ensure that the actual memory usage doesn't exceed the machine's capabilities. The OpenVZ wiki has a nice page on memory allocation parameters.

link|improve this answer
feedback

Thank you for your response. I appreciate it very much. I am not sure what you mean by VSS or resident. I am somewhat new to Virtualization. On the bare metal machine I have Proxmox (OpenVZ) installed. I then added the minimal Debian template from the OpenVZ website and installed it. So I guess this is basically a chroot jail and not a full VM which is what I wanted. I have 4gb of ram and 4 processors. On the container I committed 1024 of ram and swap. The container shows 1.5gb of memory being used in the scenario above. However, the bare metal machine shows only 500mb of actual ram being used.

Yesterday I loaded a rather large Java app and the memory in the container did not increase, it stayed the same. Thank you for the link to the article. I read through and feel I understand it. I guess my confusion is that why is the container saying it is using 1.5gb when it is not? If I want to keep an eye on my usage versus commitments, do I look the bare metal installation or the containers? or maybe I am not understanding the memory usage showing on the container. Looking at the bare metal, It seems I should be able to run at least four of these instances without even coming close to any problems of overcommitments. Thank you for any thoughts.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown