Reducing the vCenter memory – vCSA 5.5

An update for this post on how to minimize the memory requirements of the vCenter Server Appliance for release 5.5 was long overdue. Sorry for the delay, I was rather struggling with a pure IPv6 setup (and found out that the VMRC plugin as well as the Web Client break the whole thing – more on that soon).

Anyway, lets see what changed with V5.5 with regards to the memory requirements and JVM parameters. Amazingly quite a lot, but in a good way. Some of my recommendations are obsolete now since VMware changed the settings to more or less the same values I proposed. Must be a coincidence, of course. At least a nice confirmation that my settings were not that bad. 🙂

I had to update this post for vCSA 5.5 update 2 since the settings for the initial 5.5 release caused services to fail in 5.5U2. Overall, the memory requirements were significantly increased.

Inventory Service:

  • /usr/lib/vmware-vpx/inventoryservice/wrapper/conf/wrapper.conf
  • Set wrapper.java.maxmemory (default: “3072″) to “1024″ (MB)
    I still don’t understand why this service would require that much memory, but it seems to need more with each release and even with each update. Prior to 5.5 update 2 it would run with a setting of 512 MB, but in 5.5U2 it would not work anymore, so I had to adjust this value.

Profile Driven Storage:

  • /usr/lib/vmware-vpx/sps/wrapper/conf/wrapper.conf
  • Set wrapper.java.maxmemory (default: “1024″) to “512” (MB)
    Note that the default maxmemory has doubled from 5.1. If you’re using this feature you may want to stick with the default.

vSphere Web Client:

  • /usr/lib/vmware-vsphere-client/server/bin/dmk.sh
    Delete the whole JAVA_OPTS setting (three lines from JAVA_OPTS= until the last double quote). In 5.x more settings were configured in here, but that changed and what is left (erroneously I suppose) will be overwritten by the following wrapper.conf settings anyway.
  • /usr/lib/vmware-vsphere-client/server/wrapper/conf/wrapper.conf
  • Set wrapper.java.maxmemory (default: “2048″) to “1024″ (MB)
  • There’s another JVM started for the Web Client with Xms=1024m and no Xmx setting (it seems), unfortunately these values are embedded in the console-5.5.0.war file. I will have to look into the whole thing to check if I can change this. Advice appreciated.

What we do not need to or must not change anymore:

Single Sign On:

  • /usr/lib/vmware-sso/bin/setenv.sh
  • JAVA_OPTS=”-Xss256k -Xmx512m -XX:MaxPermSize=128m
    The SSO JVM settings were slightly lowered by VMware with 5.5 GA, but with update 2 they were increased again, and it seems they have to stay untouched. No big deal anyway.

Log Browser:

  • /etc/init.d/vmware-logbrowser
  • HEAP_PROP=”-Xms128m -Xmx512m”

Tomcat:

  • /etc/vmware-vpx/tomcat-java-opts.cfg
  • -Xmx512m -XX:MaxPermSize=256m
    These now default to the values I suggested for 5.1.

After these adjustments the VM memory of your vCSA can safely be reduced to 6 GB (prior to update 2: 5 GB) for small and/or lab environments. Of course the same disclaimer as before applies – all these changes are in no way supported by VMware and should not be used on production systems.

And like with the last post here’s the result:

top - 12:45:23 up 16 min,  2 users,  load average: 0.62, 0.91, 1.05
Tasks: 144 total,   1 running, 143 sleeping,   0 stopped,   0 zombie
Cpu(s):  1.0%us,  0.2%sy,  0.0%ni, 98.8%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   6125768k total,  5386668k used,   739100k free,    50668k buffers
Swap: 15735804k total,        0k used, 15735804k free,  1638768k cached

  PID USER      PR  NI  VIRT  RES  SHR S   %CPU %MEM    TIME+  COMMAND
 5263 root      20   0 2031m 1.0g  15m S      0 17.0   3:51.38 java
 4704 root      20   0 1178m 622m  11m S      0 10.4   3:03.80 java
 3663 root      20   0 1672m 517m  14m S      0  8.7   0:35.59 java
 3488 root      20   0 1028m 460m  13m S      0  7.7   0:51.20 java
 4918 root      20   0  960m 362m  14m S      0  6.1   0:30.54 java
 4592 root      20   0  427m 174m  92m S      0  2.9   0:08.59 vpxd
 6210 root      20   0  439m 155m  12m S      0  2.6   0:10.36 java
 4099 root      20   0  840m 114m  12m S      0  1.9   0:05.07 java
 3280 root      20   0  664m  86m  13m S      0  1.4   0:06.22 jsvc
 4554 ldap      20   0  241m  27m 5184 S      0  0.5   0:00.84 slapd
 4612 postgres  20   0  413m  26m  18m S      0  0.4   0:01.92 postgres

2 thoughts on “Reducing the vCenter memory – vCSA 5.5

  1. Thanks for the great information.
    Do you have any suggestions how to minimize the memory requirements for the 6.0 vCenter appliance?

    Thanks

    • Hi Jim! You’re welcome, and thanks for the feedback.
      Unfortunately I’ve been busy with my new Multi-Cloud stuff (more on that soon), but I already downloaded all the binaries of 6.0 GA and will deploy it in my lab as soon as possible. Stay tuned. 🙂
      You may want to follow me on Twitter to be notified when the post goes online.
      Cheers, Martin

Leave a Reply

Your email address will not be published. Required fields are marked *

*

code