Elastic Memory for Java (EM4J) is included with vFabric tc Server Spring Edition. The Spring Edition includes all of the components and features of tc Server Standard Edition, plus Spring Insight Operations, EM4J, and Spring commercial support. You install both Spring Edition and Standard Edition with the Standard Edition installation bundle.
You enable EM4J in an ESXi virtual machine by adding a parameter to
the virtual machine configuration and then specifying the EM4J agent on the
java command line. The tc Server
elastic-memory template automates configuring tc Runtime
instances for EM4J.
The EM4J plug-in for vSphere Web Client provides additional memory
monitoring capabilities in the vSphere Web Client. The EM4J plug-in requires
that you install a JVM and run the Console Guest Collector (CGC) on each
virtual machine you want to monitor. The CGC is installed from the tc Server
elastic-memory template, but you do not have to run tc Server
or EM4J to run the CGC and monitor virtual memory.
The following topics help you configure and run EM4J, the vSphere Web Client EM4J plug-in, and the CGC.
After you create a VM on ESXi, you enable EM4J in the VM by adding a parameter to the VM's configuration. You can add a second parameter to limit the size of the EM4J balloon, but it is unnecessary. The following table describes the parameters.
Table 1. EM4J VM Configuration Parameters
|When set to |
|Sets a limit for the total balloon size for the VM, in
megabytes. If set to |
When EM4J ballooning is enabled, the guest balloon is disabled. If you enable EM4J ballooning, but do not run an EM4J-enabled JVM, there will be no ballooning for the VM, which could lead to the ESXi host swapping pages from the VM. This situation is undesirable because host swapping occurs without insight into process activity, scheduling, and memory distribution in the VM. If you shut down a JVM with an EM4J balloon, the ballooned memory remains until it is written over. This means that the risk of swapping occurring after a JVM shutdown is at least initially very low.
The procedure describes how to add the EM4J configuration parameters using the vSphere Client. You can also add the parameters by editing the VM's VMX text file. After you enable EM4J, cloning the VM will duplicate the setup.
Create at least one virtual machine. EM4J requires VMware ESXi 5.0 or higher. See Creating a Virtual Machine.
Shut down the guest OS and, using vSphere Client, power off the VM, if necessary. It is not possible to edit the configuration parameters while the VM is running.
In the left panel of the vSphere Client, expand the ESXi host so that the VM you want to configure is visible.
Right-click the VM and select Edit Settings... from the pop-up menu.
Click the Options tab.
In the Settings column, under Advanced, select General. See the following figure.
In the Configuration Parameters box on the right, click Configuration Parameters....
Click Add Row and enter the following parameter, as shown in the following figure.
(Optional) Click Add Row and enter the following parameter.
(or enter the maximum number of
megabytes to limit the size of the EM4J balloon)
Click OK twice.
Repeat this procedure for each VM that will run an EM4J-enabled Java application.