Memory tuning vCenter server appliance
After deployment of vCenter server appliance, memory tuning on vCenter server appliance is the first task you should do after deployment and configuration. In particular when you deploy vCenter server appliance to your homelab environment, by tuning JVM heap size for vCetner server process you can easily save up 5GB RAM out of your homelab resources.
Default values for JVM per service are below:
Memory for VMware vSphere Web client:
- /usr/lib/vmware-vsphere-client/server/wrapper/conf/wrapper.conf
- wrapper.java.initmemory=512
- wrapper.java.maxmemory=2048
Memory for inventory services
- /usr/lib/vmware-vpx/inventoryservice/wrapper/conf/wrapper.conf
- wrapper.java.initmemory=256
- wrapper.java.maxmemory=3072
Memory for storage profiles
- /usr/lib/vmware-vpx/sps/wrapper/conf/wrapper.conf
- wrapper.java.initmemory=256
- wrapper.java.maxmemory=1024
Quick way to list configured memory is from command line by typing below command
vcsa01:~ # vpxd_servicecfg jvm-max-heap read VC_MAX_HEAP_SIZE_QS=3072 VC_MAX_HEAP_SIZE_SPS=1024 VC_MAX_HEAP_SIZE_TOMCAT=512 VC_CFG_RESULT=0 vcsa01:~ #
For homelab deployment my suggestion is to downgrade vCenter server appliance memory by at least 50%, from 8GB to 4GB or even 3GB. Test your settings on your own and tune memory values accordingly to your needs.
Memory tuning on vCenter server appliance 5.5
- Log in to vCenter server appliance using SSH
- Edit /usr/lib/vmware-vsphere-client/server/wrapper/conf/wrapper.conf configuration file, look for JVM memory section and change maxmemory to 1024
############# # JVM Memory ############# wrapper.java.initmemory=512 wrapper.java.maxmemory=1024
- Edit /usr/lib/vmware-vpx/inventoryservice/wrapper/conf/wrapper.conf configuration file, find wrapper.java.maxmemory parameter and change it from 3072 to 1536
# Maximum Java Heap Size (in MB) wrapper.java.maxmemory=1536
- Edit /usr/lib/vmware-vpx/sps/wrapper/conf/wrapper.conf find wrapper.java.maxmemory parameter and change it from 1024 to 512
# Maximum Java Heap Size (in MB) wrapper.java.maxmemory=512
- Shutdown VM
- Change virtual machine RAM from default 8GB to 4GB – to start with
Default vCPU number for virtual machine with vCSA is 2, for HomeLab I’m always changing it back to 1, it doesn’t harm.
- Power VM up again and check if vCenter server is up again.
Good way of checking server performance is top tool. TOP is available by default in almost every Linux distribution, it is handy tool if you have to troubleshoot or monitor system performance.
Log in to vCenter server appliance via SSH and type top. Check memory metrics and verify how much memory is used, swapped.
Resources:
- Memory size recommendation for vCenter server appliance KB2005086
Cheers, im also looking into tuning it further and decrease the memory footprint even further and perhaps also speed it up.