JVM heap sizing in VMware guests
Related to my question:
Here is a PDF that provides a broad overview of considerations for running Java on VMware guests: link text
In this case, make sure that Reservation = OS vRAM + JVM + heap size.
Meanwhile, the following are general recommendations from VMware KB site:
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 Server is overcommitted, ensure the the Balloon Driver is running within the virtual machine so that memory is optimally managed.