7.13.1 Common settings for using the Explicit Memory Management functionality (setting JavaVM options)
This subsection describes common settings for using the Explicit Memory Management functionality.
You need to do the following settings when using the Explicit Memory Management functionality:
-
J2EE server
-
Batch server
-
Java application
-
Automatic placement configuration file settings
If you want to control the application target of the Explicit Memory Management functionality, you need to perform the following setting:
-
Setting configuration file for Explicit Memory Management functionality application exclusion
- Organization of this subsection
(1) J2EE server settings
Perform the J2EE server settings in an Easy Setup definition file.
For the common settings for using the Explicit Memory Management functionality, specify the JavaVM options in the JavaVM startup parameter (add.jvm.arg), which is inside the <configuration> tag of the logical J2EE server (j2ee-server) in an Easy Setup definition file.
The following table describes the definitions of the JavaVM options in the Explicit Memory Management functionality.
An example of definitions in an Easy Setup definition file is given below.
<param-name>add.jvm.arg</param-name> <param-value>-Xms512m</param-value> <param-value>-Xmx512m</param-value> <param-value>-XX:+HitachiUseExplicitMemory</param-value> <param-value>-XX:HitachiExplicitHeapMaxSize=64m</param-value>
- Reference note
-
You can also perform the J2EE server settings from the [Setting startup parameters] screen (defining the logical J2EE server) in the management portal. For details on how to perform the settings in the management portal, see 10.8.23 Setting startup parameters (J2EE server) in the uCosminexus Application Server Management Portal User Guide.
For details on the JavaVM options to be specified and tags to be specified in an Easy Setup definition file, see the uCosminexus Application Server Definition Reference Guide.
(2) Batch server settings
Perform the batch server settings in an Easy Setup definition file.
For the common settings for using the Explicit Memory Management functionality, specify the JavaVM options in the JavaVM startup parameter (add.jvm.arg), which is inside the <configuration> tag of the logical J2EE server (j2ee-server) in an Easy Setup definition file.
For the JavaVM options to be specified, see (1) J2EE server settings.
(3) Java application settings
Perform the settings of the Java application that you run using the cjclstartap command, in the option definition file for Java applications (usrconf.cfg).
For the common settings for using the Explicit Memory Management functionality, specify the JavaVM options in the JavaVM startup parameter (add.jvm.arg) in the option definition file for Java applications (usrconf.cfg).
For JavaVM options to be specified, see (1) J2EE server settings.
An example of definitions in the option definition file for Java application (usrconf.cfg) is given below.
add.jvm.arg=-Xms512m add.jvm.arg=-Xmx512m add.jvm.arg=-XX:+HitachiUseExplicitMemory add.jvm.arg=-XX:HitachiExplicitHeapMaxSize=64m
For details on the option definition file for Java applications (usrconf.cfg), see 12.2.1 usrconf.cfg (Option definition file for Java applications) in the uCosminexus Application Server Definition Reference Guide.
(4) Automatic placement configuration file settings
If you want to use the Explicit Memory Management functionality by using an automatic placement configuration file, you need to specify the -XX:+HitachiAutoExplicitMemory option and set the objects that you want to place in the Explicit heap.
Specify the objects that you want to place in the Explicit heap, in the AutoExplicitMemoryText parameter, which is inside the <configuration> tag of the logical J2EE server (J2EE-Server) in an Easy Setup definition file.
An example is given below.
: <param> <param-name>AutoExplicitMemoryText</param-name> <param-value> <![CDATA[ com.sample.*, java.util.ArrayList com.sample.Main.main(java.lang.String[]), java.util.LinkedList ]]> </param-value> </param> :
For details on how to create an automatic placement configuration file, see 7.13.2 Using the Explicit Memory Management functionality by using the automatic placement configuration file.
You can also perform the automatic placement configuration file settings from the [Setting startup parameters] screen (defining logical J2EE server) in the management portal or from any user file (file specified in the -XX:HitachiAutoExplicitMemoryFile property).
(5) Setting configuration file for Explicit Memory Management functionality application exclusion
If you use a configuration file for Explicit Memory Management functionality application exclusion and control application of the Explicit Memory Management functionality to the objects to be moved on the basis of a reference relation, you must specify the following options and set the classes not to be moved to the Explicit heap.
-
-XX:ExplicitMemoryFullGCPolicy=0
-
-XX:+ExplicitMemoryUseExcludeClass
Code the setting of classes not to be moved to the Explicit heap in the configuration file for Explicit Memory Management functionality application exclusion.
The following is the coding example:
com.sample.ClassA com.sample.ClassB
If you want to move some classes from among the classes, which are coded in the configuration file for Explicit Memory Management functionality application exclusion, to the Explicit heap, code the classes, for which the settings of application exclusion of the Explicit Memory Management functionality are to be disabled, in configuration file for disabling application exclusion of the Explicit Memory Management functionality.
For details on how to create a configuration file for Explicit Memory Management functionality application exclusion and configuration file for disabling application exclusion of the Explicit Memory Management functionality, see 7.13.3 Controlling application target of the Explicit Memory Management functionality by using a configuration file.