The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
Best practices for running Java in a virtual machine (1008480)
These points are general recommendations:
- Size the virtual machine memory to leave adequate space for the Java heap, the other memory demands of the Java virtual machine code and stack, and any other concurrently executing process that needs memory from the guest operating system.
- Set the memory reservation value in the VMware Infrastructure Client to the size of memory for the virtual machine. As any type of Memory Swapping (physical or virtual) is detrimental to performance of JVM heap especially for Garbage Collection.
- Determine the optimal number of virtual CPUs for a virtual machine that hosts a Java application by testing the virtual machine configured with different numbers of virtual CPUs at different times with the same load.
- If you are using multiple Garbage Collector threads in your JVM, match the number of those threads to the number of virtual CPUs that are configured in the virtual machine.
- For easier monitoring and load balancing, use one JVM process per virtual machine.
- If your ESX host is overcommitted, ensure that the Balloon Driver is running within the virtual machine so that memory is optimally managed.
For more information, see the VMware Technical Paper Enterprise Java Applications on VMware - Best Practices Guide undefined undefined.
Request a Product Feature
To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.