so in this case make sure Reservation = OS vRAM + JVM + heap size hope this helps.
but meanwhile, the following are general recommendations of the VMware KB site:
The size of the virtual machine memory to leave enough space for the Java heap, other memory requirements for the code and stack of the Java virtual machine, and any other simultaneous execution process that requires memory from the guest operating system.
Set the memory reservation value in the VMware infrastructure client to the memory size for the virtual machine. Because any type of memory replacement (physical or virtual) is detrimental to JVM heap performance, especially to garbage collection.
Determine the optimal number of virtual processors for the virtual machine hosting the Java application by testing a virtual machine configured with a different number of virtual processors at different times with the same load.
If you use multiple Collector Garbage threads in your JVM, compare the number of these threads with the number of virtual processors configured on the virtual machine.
To simplify monitoring and load balancing, use one JVM process for each virtual machine.
If your ESX server is overloaded, make sure that the virtual ball driver is running on the virtual machine to optimally manage memory.
Senior systems engineer
source share