Default Reasoning

Construction of sensible guesses when some useful information is lacking and no contradictory evidence is present…

  • Subscribe

  • Disclaimer

    This blog is personal. The views and opinions expressed here represent my own and not those of the people, institutions or organizations that I may or may not be related with unless stated explicitly. All blog post, white papers and manuals were written during the projects, mostly at a customer site and are scenario specific. Use at your own risk.
  • Meta

Tweaking Java.exe memory usage on vCenter Server 5.1

Posted by Marek.Z on 27 September 2012

During the upgrade of my home lab from vSphere 5.0 to vSphere 5.1 I have noticed that there is more memory consumption on my vCenter Server than before the upgrade. According to the vSphere Installation and Setup Guide, this happens because vCenter Server includes several Java services in the installation (VirtualCenter Management Webservices, Inventory Service, Profile-Driven Storage Service and Single Sign On) and when you install vCenter Server, you have an option to select the size of your vCenter Server inventory to allocate memory for these services. The inventory size determines the maximum Java Virtual Machine (JVM) heap settings for these services. Since I only have 3 hosts in my lab and just a couple of VMs I was surprised by the high memory consumption.

The default values for JVM heap settings in vSphere 5.1 can be found in table 2-5 of the vSphere Installation and Setup Guide.

Source: table 2-5 vSphere Installation and Setup Guide.

I think these values are a bit high for a small, home lab environment. Especially when you have limited resources. You can adjust the settings of the services after the installation by editing the corresponding  configuration file.

vCenter Server

Change the setting in the wrapper.conf file located in <installation_directory>\VMware\Infrastructure\tomcat\conf folder.

  1. Open the file and search for
  2. Change the setting to desired value, in my case 512 MB.
  3. Save and close the file.

vCenter Single Sing On

Also here, change the setting in the wrapper.conf file located in <installation_directory>\VMware\Infrastructure\SSOServer\conf folder.

  1. Open the file and search for
  2. Change the setting to desired value, in my case once again 512 MB.
  3. Save and close the file.

vCenter Inventory Service

Change the setting in wrapper.conf located in the <installation_directory>\VMware\Infrastructure\Inventory Service\conf folder.

  1. Open the file and search for
  2. Change the setting to desired value, in my case 1024 MB.
  3. Save and close the file.

Profile-Drive Storage Service

Also here, change the setting in wrapper.conf located in the <installation_directory>\VMware\Infrastructure\Profile-Driven Storage\conf folder.

  1. Open the file and search for
  2. Change the setting to desired value, in my case 512 MB.
  3. Save and close the file.

Now that you have changed the settings, restart the services or the vCenter Server for the changes to take effect. Try to tweak around with the settings and find out what best suits your environment.


- Marek.Z

About these ads

23 Responses to “Tweaking Java.exe memory usage on vCenter Server 5.1”

  1. [...] Tweaking Java.exe memory usage on vCenter Server 5.1 (Default Reasoning) vSphere 5.1 and New VMware Enhanced vMotion (ESX Virtualization) vSphere 5.1 vMotion deepdive (Frank Denneman) Where is my new vMotion functionality? (Frank Denneman) vCenter Server 5.1 start up may take longer than previous versions (KB Article) vCenter Server Services hang on startup after upgrading to vCenter Server 5.1 (KB Article) Enhanced vMotion / X-vMotion / shared nothing vMotion live demo [video] ( VMware Converter 5 not compatible with vSphere 5.1? ( VMware vCenter Server 5.1 Database Performance Improvements and Best Practices for Large-Scale Environments (VMware Technical Paper) VMware vSphere 5.1 vMotion Architecture, Performance and Best Practices (VMware Technical Paper) Command-Line Installation and Upgrade of VMware vCenter Server 5.1 (VMware Technical Paper) vMotion without shared storage requirement, does it have a name? (VMware vSphere Blog) vMotion enhancement in vSphere 5.1 (Yellow Bricks) [...]

  2. AshvinDX said

    Thanks Marek for these gr8 tips. Based on these I managed to do the same to the vCenter 5.1 SUSE appliance. I reduced the memory requirement from 8GB to 4GB.
    1. After starting appliance, accept the EULA and press cancel
    2. SSH to the server and modify the files as mentioned below. I recommend using WinSCP for those confortable with GUI:
    vCenter Server: /etc/vmware-vpx/tomcat-java-opts.cfg – Change -Xmx1024m -XX:MaxPermSize=256m -Dvim.logdir=/var/log/vmware/vpx To -Xmx512m -XX:MaxPermSize=256m -Dvim.logdir=/var/log/vmware/vpx
    /usr/lib/vmware-vpx/tomcat/bin/ – Change JVM_OPTS=”-Xss1024K -Xincgc -XX:+ForceTimeHighResolution -XX:PermSize=64M” To JVM_OPTS=”-Xss512M -Xincgc -XX:+ForceTimeHighResolution -XX:PermSize=64M”

    vCenter Single Sing On: /usr/lib/vmware-sso/bin/ – Change JVM_OPTS=”$JVM_OPTS -XX:MaxPermSize=256M –Xms2048m –Xmx2048m” to JVM_OPTS=”$JVM_OPTS -XX:MaxPermSize=256M -Xms512m -Xmx512m”
    vCenter Inventory Service: /usr/lib/vmware-vpx/inventoryservice/wrapper/conf/wrapper.conf – Change to
    Profile-Drive Storage Service: /usr/lib/vmware-vpx/sps/wrapper/conf/wrapper.conf – Change to

    3. Shutdown the appliance and modify the memory from 8Gb to 4GB
    4. Configure the appliance as you would normally do

    Hope it helps someone.

  3. [...] Specify vCenter server JVM memory size – you can tune it after installation [...]

  4. Steven said

    With de default settings of “small”, the VC 5.1.0a Server (just VC, no DB) ate up so much memory that even 16GB RAM for the vCenter Server was no where near enough. It was at 97% physical memory all the time. The machine, obviously, was slow as hell as a consequence.

    After these exact tweaks (as suggested in this article), physical memory is now stable at 89%. The Server still has 16GB of RAM (i cannot reproduce a machine that is even remotely satisfied with 4 or 8GB RAM). Not a large improvement unfortunately. Others on the Net have experimented with 384MB as the max. values where this article suggests 512 and so on. It accomplisches very little as well. Again only a small reduction in memory consumption. The Java processes still eat memory like they have not eaten for weeks…

    No matter what, the memory consumption of VC5.1.0a remains astronomical. I’d say the programmers that coded this piece of crap should be !

    VC 5.0.x on the same machine was happy with 7GB RAM (which is still a lot, but it borders on “acceptable”. Needing more than 16GB after the upgrade is idiotic to say the least. And tweaks like in this article hardly helps and the side-effects are not fully understood at this time.

    The choice of Java was a poor one to begin with. vCenter and products like View Connection Server never leave the Win64 platform anyway, so why code in a multi-platform language (Java was meant to “write once, run everywhere”) and the quality of the code is obviously appaling, churning away CPU and Memory.
    Even on state-of-the-art hardware it’s slow, memory consumption is huge. And for what?

    Sorry VMware, bad job. VERY bad job…

    • Marek.Z said

      Hi Steven,

      What you describe is quite unusual, I’m running several vCenter Servers in my lab with 6 GB of memory with everything installed (SQL, SSO, Web Client, VUM etc) and have no issues after tweaking the memory, but that is not a production infra, just a home lab. According to VMware vSphere installation guide the recommended size of memory for your vCenter Server with its components is 10 GB at the moment. Perhaps you could split the load over 2 servers of create a support ticket at VMware.

      Good luck with it.


  5. Mike M. said

    Thank you sooo much. My memory usage has been crazy. I only have 6 hosts and this helps a lot.

  6. [...] MAJ 29.01.2013 : On peut pousser encore un peu plus le tuning en baissant le Xmx java. [...]

  7. Gaurav Baghla said

    I am Searching the same issue but there is no Kb article for this. Anybody can help me with a KB Article.

  8. [...] memory heap to draw from. The good news is that we can change the heap sizes for each JVM service. Here is a good post on changing these values. You can take that guide and get the vCenter Server down to [...]

  9. Martin said

    The VMware documentation unfortunately does not cover all configuration files. I found more settings for vCenter on Windows as well as the appliance. Both run fine in small environments with 5 GB of memory and still some headroom. Check out my recent posts on that topic:

  10. Vinod B said

    Hi Marek,

    W are having the VMware setup with 37 ESX and and vcenter with 32 GB RAM runnig on Windows 2008R2. Most of the time the memory utilization is 90%. We have vcenter 5.1. Could you please suggest the proper tweaking parameters for our setup.



    • Marek.Z said

      Hi Vinod,

      Well, in a production environment, you should scale your vCenter Server according to VMware best practice. Do not use java tweaks as it not supported by VMware.

      90% of 32 GB is quite a lot. Move the SQL database to a separate server is you running it locally, you could also consider moving the Update Manager and any other 3rd party software from the vCenter Server. If this does not help, I suggest you open a support ticket at VMware.

      Hope this helps.


      • Vinod B said

        Hi Marek,

        Thanks for your reply. We are running SQL in the local server. We shall open a case with VMware.

        Thanks & regards,

  11. […] […]

  12. glenn said

    is there sucha a thing as too big for JVM heaps? We have a large env and have our system tweaked above the recommended large env setting, (vcenter server is 4GB instead if recommended 3GB,etc…)Thanks,

    • Marek.Z said

      Hi Glenn,

      Could be, if you set more memory than recommended, other processes could be jeopardized on your server.


    • Martin said

      Too much heap size could cause performance degradation due to garbage collection, which will take more time. Depends on the code quality if the heap gets so much fragmented that the GC will take a noticable amount of time. Symptom would be short “hangs” corresponding to CPU load peaks on the vC. Besides swapping caused by configuring more JVM mem than assigned to the vC VM.
      Personally I would stick with the VMware “large” recommendations if you run an environment as large as outlined in the docs. I suspect they choose too large settings anyway, no need to waste more RAM. ;-)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 613 other followers

%d bloggers like this: