uCosminexus Application Server, Expansion Guide

[Contents][Index][Back][Next]

8.14 Precautions for using the Explicit Memory Management functionality

This section describes the points to be considered when using the Explicit Memory Management functionality.

Organization of this section
(1) Setting initial size and maximum size of the Java heap
(2) Notes on using Explicit heap in objects related to an HTTP session
(3) Maximum number of characters in the name of the Explicit memory block to be output to the thread dump

(1) Setting initial size and maximum size of the Java heap

You must specify the same value in the initial size (-Xms) and maximum size (-Xmx) of the Java heap. If the values are different, the count of the copy garbage collection might increase.

We recommend this setting even if you do not use the Explicit Memory Management functionality.

Supplement:
If the initial size and maximum size of the Java heap are different, sizes of all areas change at the following timings:
  • When the copy garbage collection ends
    The size of the New area changes dynamically.
  • When the full garbage collection ends
    The sizes of the Tenured area and New area change dynamically.
The size of the New area is mainly determined according to the Tenured area size and the value specified in the -XX:NewRatio option.
If the Explicit Memory Management functionality inhibits occurrence of the full garbage collection, the timing of changing the Tenured area size is lost. With this, size of the New area becomes almost fixed.
Therefore, even if you specify a maximum size that is larger than the initial size, the timing of the extension of the New area is lost and the size is the value that you specified as the initial size. If the New area specified in the initial size is small, count of occurrence of the copy garbage collection is more as compared to the case where you do not use the Explicit Memory Management functionality.

(2) Notes on using Explicit heap in objects related to an HTTP session

(3) Maximum number of characters in the name of the Explicit memory block to be output to the thread dump

The name of the Explicit memory block is output to Explicit heap details that are output to the thread dump of JavaVM. The maximum limit for the number of characters in the name of an Explicit memory block is 2,000 characters. If you set a name of an Explicit memory block exceeding 2,000 characters in the setName method of the JP.co.Hitachi.soft.jvm.MemoryArea class, the name part which exceeds 2,000 characters is not output to the thread dump.