I have installed vSphere vServer on a virtual machine with 2GB RAM and I am noticing that Guest Memory is at 99%. According to taskmanager, tomcat6.exe is using 729MB RAM. Anyone know how I can fix this?
chimoe125,
Eric Siebert wrote a good article on this.
See link http://itknowledgeexchange.techtarget.com/virtualization-pro/memory-usage-in-vcenter-server-40/
Regards
DC
Not sure if this is officially sanctioned by VMware or not, but it's a standard tomcat6 option....
Having just installed a new datacenter, consisting of 2 ESX4 hosts, one template, and one VM, tomcat6.exe was consuming roughly 1.2GB memory after 48hrs running.
From I simply added "--JvmMx=512" to the end of 'ImagePath' of the service in the registry:
HKLM\SYSTEM\CurrentControlSet\Services\vctomcat
and restarted the service
Considering it's a standard tomcat option, I can't see why it shouldn't be supported. Will keep an eye on things.
-Colin
Nothing to fix with tomcat6, it actually requires a lot of memory. So just add memory to machine.
---
VMware vExpert '2009
i don`t really like an attitude like this, i.e. "just throw ram at a software memory hog without knowing, if it REALLY needs it".
I have seen my tomcat on vsphere server also go up to >>1gb.
as i know that java programmers often are careless people when it comes to ram requirements of their app, i think there maybe room for optimization.
i have worked in support team for an enterprise java based web-app, and whenever there was a memory issue and i talked to the programmers it always wasn`t their fault but the machine not being equipped with enough ram (which was nonsense in more than 90% of all support cases)
java programmers really don`t know how to do memory efficient programming. they leave it up to the garbage collector.
harsh words, i know - but prove the contrary
oh - and btw - besides the web-interface - what services does the tomcat6 instance provide exactly?
is there an architectural vcenter server overview for this?
Hi Colin,
Have you experienced any issues since you have limited TomCat to 512MB of RAM? I am having the same issues as you state but do not want to cause any other issues.
Thank you,
-Pete
I would like to know if there are some issues with limiting tomcat as well. It makes SQL look like a light weight.
Bob
i`d add -Xloggc:path\to\logfile to the tomcat startup and have a look on that with a gc log analyzing tool.
if you see large time being spent with garbage collection (whenever this happens your jvm will stall) tomcat has memory issues.
if not, all should be well.
Well, so far no noticable issues
but that said, this particular environment is relatively small - 2 hosts and 10 VM's. Regular operations are fine, but I don't think they reference the webservices. Update Manager runs fine. No other plugins in use. The tomcat6.exe is consuming 5-600MB which seems more appropriate.
Haven't used the log parameter yet, but do agree that it's probably a good idea.
I do not want to throw in extra memory just for a (terrible) management web interface. I solved the mayhem by switching to Virtualbox.
Update: as per http://deinoscloud.wordpress.com/2009/11/30/tomcat-for-vcenter-memory-tuning/ a couple of Jvm memory parameters are pre-set for the vcenter tomcat6 instance.
Removing the fixed-allocation settings in the registry seems to have the desired affect of keeping the tomcat6 memory usage to a more "normal" amount
Locate the following registry key, for either x64 or x86 systems
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Procrun 2.0\vctomcat\Parameters\Java
HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun 2.0\vctomcat\Parameters\Java
And set each value to 0x0 and restart the vCenter Webservices service
JvmMs = 0x0
JvmMx = 0x0
JvmSs = 0x0
Note: I also removed the "--JvmMx=512" from the service configuration mentioned previously, and memory usage is maintained around the 220MB mark.
Been following this post, the --JvmMx=512 didn't work but this gem did! Holding steady at 168MB (working set) and 205MB (VM Size).
Note: I'm only doing this in a lab env.
Ben
Guys, that Reg key listed first is not the place to tweak them. I just adjusted mine -
On windows, the memory should be set in the
hkey local machine\software\apache software foundation\procrun 2.0\tomcat\parameters\java
Then there is a JvmMs and JvmMx and JvmSs
I tweaked Mx and Ss down to 512 - from 1024 and have had much better luck
These settings worked for me. Thanks for the post. Tomcat6.exe memory utilization went from 1300MB to 350MB.
Hello,
On my vCenter server, tomcat6.exe was using 1300 Mb of memory, and I adjust the registry setting located in
JvmMs = 0x0
JvmMx = 0x0
JvmSs = 0x0
Then restart web service;
tomcat6.exe now use 225 Mb
Thank you !
Yannick
If your not using the VMware Web Service, I would just stop and disable that service.
Thanks for tip, but I still need the web access service, but it was (only !) using too much memory from my point of view and vCenter was unstable.
Now it is better.
If your not using the VMware Web Service, I would just stop and disable that service.
I think the Webservice is used for some other stuff too, as some of the Performance charts and some search handling, which does not seems to have any connection to the webservice.
After settings JvmMs = 0x0, JvmMx = 0x0, JvmSs = 0x0, the search inventory function in VSphere client doesn't work anymore.
I don't know if there are any other side effects.