uCosminexus Application Server, Expansion Guide
The objects referenced from the objects in an Explicit memory block, which is created by using automatic placement functionality, move from the Java heap to the Explicit heap on the basis of a reference relation when a garbage collection occurs. The functionality for specifying classes to be excluded from the application of the Explicit Memory Management functionality excludes the objects, which are to be moved on the basis of this reference relation, from application target of the Explicit Memory Management functionality by using a configuration file and does not let the objects move to Explicit heap. If you use this functionality, you can exclude the objects, which are not recovered in a full garbage collection also, such as the objects used until the application stops, from the application target of the Explicit Memory Management functionality. For details on the movement based on reference relation of objects, see 8.6.5 Moving the objects from the Java heap to the Explicit memory block based on a reference relation.
The following two types of files are used in the functionality for specifying classes to be excluded from the application of the Explicit Memory Management functionality:
Specify classes of the objects, which you do not want to move to an Explicit heap. The objects of the classes specified in this file do not move to an Explicit heap even if a garbage collection occurs. The objects move to Tenured area at the time of rising.
A configuration file for Explicit Memory Management functionality application exclusion contains files provided by the system. If you enable the functionality for specifying classes to be excluded from the application of the Explicit Memory Management functionality, the configuration file for Explicit Memory Management functionality application exclusion provided by the system is used. The following is the file path of the configuration file for Explicit Memory Management functionality application exclusion, which is provided by the system:
If you want to add classes for exclusion from application target of the Explicit Memory Management functionality, update the file in the following file path or create a new file:
If you create a new configuration file for Explicit Memory Management functionality application exclusion, specify the file path in -XX:ExplicitMemoryExcludeClassListFile option.
Specify the classes, for which the settings of application exclusion are to be disabled, from among the classes specified in the configuration file for Explicit Memory Management functionality application exclusion. Objects of the classes specified in this file move to Explicit heap if a garbage collection occurs.
If you want to disable the classes excluded from application target of the Explicit Memory Management functionality, update the file in the file path given below or create a new file. You can also disable settings of the classes specified in the configuration file for Explicit Memory Management functionality application exclusion, which is provided by the system.
If you create a new configuration file for disabling application exclusion of the Explicit Memory Management functionality, specify file path in -XX:ExplicitMemoryNotExcludeClassListFile option.
Priority is given to specification of configuration file for disabling application exclusion of the Explicit Memory Management functionality than the specification of configuration file for Explicit Memory Management functionality application exclusion.
This subsection describes specification of configuration file and scope of application of the Explicit Memory Management functionality considering com.sample package as an example. com.sample package contains two classes - ClassA and ClassB. Specify each configuration file as shown below.
com.sample.* |
com.sample.ClassB |
Both ClassA and ClassB are included in specification of the configuration file for Explicit Memory Management functionality application exclusion. However, because specification of the configuration file for disabling application exclusion of the Explicit Memory Management functionality is preferred, only ClassA is excluded from the application of the Explicit Memory Management functionality and Explicit Memory Management functionality is applied to ClassB, as shown in the following figure.
The following is the format for coding a configuration file.
Fully-qualified-class-name-of-specified-class #Comment : Fully-qualified-class-name-of-specified-class# |
# You can omit the class name by using *.
[-part-in-number-of-dimensions-of-array#L Fully-qualified-class-name-of-specified-class; |
# In case of a multi-dimensional array, specify [ continuously for the number of dimensions. In case of three-dimensional array, it will be [[[.
Coding examples of the configuration file for Explicit Memory Management functionality application exclusion and configuration file for disabling application exclusion of the Explicit Memory Management functionality are described below.
The coding example described here is a class structure shown in the following figure having package name as com.sample.
Figure 8-27 Example of class structure
The following is an example of a configuration file for Explicit Memory Management functionality application exclusion when specifying in a fully qualified class name:
com.sample.aaa.ClassA com.sample.aaa.ClassC com.sample.ddd.ClassD |
In this example, the objects of ClassA class, ClassC class, and ClassD class move to Tenured area.
The following are coding examples of a configuration file for Explicit Memory Management functionality application exclusion and configuration file for disabling application exclusion of the Explicit Memory Management functionality when specifying by omitting class name.
com.sample.* |
com.sample.aaa.ClassB com.sample.ddd.ClassE |
In this example, not only the classes in the same package but all the classes including the classes in subpackages are targeted to move to Tenured area because of the coding in the configuration file for Explicit Memory Management functionality application exclusion. However, the objects of ClassB class and ClassE class are targeted to move to the Explicit memory block because of the coding in the configuration file for Explicit Memory Management functionality application. Hence, the objects of ClassA class, ClassC class and ClassD class move to Tenured area.
All Rights Reserved. Copyright (C) 2013, 2015, Hitachi, Ltd.