EM4J works with the ESXi hypervisor to make memory in the Java heap
space available to other VMs that need it. Once EM4J is enabled, as
described in Enable EM4J in the VM, no
additional configuration is required. When memory pressure increases on the
host and it has recovered as much as it can from techniques such as page
sharing, ESXi initiates ballooning in VMs that are configured for it. You
can monitor memory utilization, including ballooning, using vSphere Client
or other tools such as
esxtop. In addition, more specific
information about EM4J ballooning is available by querying EM4J MBeans
Ballooning is one of several strategies ESXi employs to use host memory efficiently. Using vSphere Client, you can observe ESXi memory management as the different techniques are applied and memory is recovered from the VMs. Charts on the Performance tab let you view the memory metrics over time. You can see how memory utilization responds to different loads and events and how you might arrange and configure VMs to more fully utilize the physical resources and maintain desired performance.
You can select an individual VM, as illustrated by the following example, a Resource Pool, or the entire host. Choose the Performance tab and select Memory from the Switch to drop-down list. If necessary, click Chart Options... and select Balloon and Balloon target in the Counters section.
The balloon metrics in the vSphere Client do not distinguish between the VMware tools balloon and the EM4J balloon, but the balloon in any given VM must be one type or the other. When EM4J is enabled in a VM, the Balloon and Balloon target metrics for that VM describe the current and target sizes of the EM4J balloon. When EM4J is not enabled, these metrics instead describe the VMware tools balloon driver. When you view a group of VMs, the numbers from both types of balloons are summed.