Hitachi

uCosminexus Application Server Expansion Guide


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:

If you want to control the application target of the Explicit Memory Management functionality, you need to perform the following setting:

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.

Table 7‒14: Definitions of the JavaVM options in the Explicit Memory Management functionality

JavaVM option

Setting details

Default value

-XX:[+|-]HitachiUseExplicitMemory

The option sets whether you want to use the Explicit Memory Management functionality.

In the case of new installation

The value depends on the execution environment#1.

IN the case of version upgrade

-XX:-HitachiUseExplicitMemory

-XX:[+|-]HitachiAutoExplicitMemory

The option sets whether you want to use the automatic placement functionality in the Explicit Memory Management functionality.

-XX:-HitachiAutoExplicitMemory

-XX:HitachiAutoExplicitMemoryFile:String

This option specifies the path of the automatic placement configuration file that is used when using the automatic placement functionality in Explicit Memory Management functionality.

Empty string

-XX:[+|-]HitachiExplicitMemoryAutoReclaim

The option specifies whether you want to use the automatic release functionality in the Explicit Memory Management functionality.

-XX:+HitachiExplicitMemoryAutoReclaim

-XX:[+|-]HitachiExplicitMemoryCompatibleToV8

This option specifies whether to use the same method as 08-00 for securing Explicit memory blocks. Enable this option if you do not want to use new functions in 08-50 or later, and want to run an application, which runs in 08-00, as is in 08-50.

-XX:-HitachiExplicitMemoryCompatibleToV8

-XX:HitachiExplicitHeapMaxSize#2

This option sets maximum size of the Explicit heap area. (units: bytes)

-XX:HitachiExplicitHeapMaxSize =64m

-XX:HitachiExplicitMemoryLogLevel:String

In String, set the log level of event log to be output by the Explicit Memory Management functionality.

Specify one of the following values:

none

normal

verbose

debug

-XX:HitachiExplicitMemoryLogLevel:normal

-XX:HitachiExplicitMemoryJavaLog:String

In String, specify the output destination path name of event log to be output by the Explicit Memory Management functionality.

In Windows

-XX:HitachiExplicitMemoryJavaLog:Cosminexu- installation-directory\CC\server\public\ejb\<server name>\logs

In UNIX

-XX:HitachiExplicitMemoryJavaLog:/opt/Cosminexus/CC/server/public/ejb/<server name>/logs

-XX:HitachiExplicitMemoryJavaLogFileSize=Integer value

In Integer value, specify file size of event log. (units: bytes)

-XX:HitachiExplicitMemoryJavaLogFileSize =4m

-XX:ExplicitMemoryFullGCPolicy=Numeric-value

This option specifies whether to control object movement from the Java heap to Explicit memory blocks based on reference relations when Full GC occurs.

-XX:ExplicitMemoryFullGCPolicy=0

-XX:[+|-]ExplicitMemoryUseExcludeClass

The option specifies whether you want to enable the functionality for specifying classes to be excluded from the application of the Explicit Memory Management functionality.

Recommended mode:

-XX:+ExplicitMemoryUseExcludeClass

-XX:ExplicitMemoryExcludeClassListFile:String

The option specifies the path of the configuration file for Explicit Memory Management functionality application exclusion to be used when using the functionality for specifying classes to be excluded from the application of the Explicit Memory Management functionality.

Empty string

-XX:ExplicitMemoryNotExcludeClassListFile String

The option specifies the path of configuration file for disabling application exclusion of the Explicit Memory Management functionality to be used when using the functionality for specifying classes to be excluded from the application of the Explicit Memory Management functionality.

Empty string

#1

In the case of a new installation, the default value varies according to the execution environment as described below.

In the case of a J2EE server

-XX:+HitachiUseExplicitMemory

In the case of a batch server and a Java application

-XX:-HitachiUseExplicitMemory

#2

For details on the estimation, see 7.11 Explicit heap tuning in the uCosminexus Application Server System Design Guide.

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.

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.