Hitachi

uCosminexus Application Server Expansion Guide


7.14.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 you specify different values, the copy GC occurrence frequency 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 copy GC ends

    The size of the New area changes dynamically.

  • When Full GC 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 occurrence of Full GC is suppressed by the Explicit Memory Management functionality, the system loses the opportunity to resize the Tenured area. 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 you specify a small value for the initial size of the New area, copy GC might occur more frequently than when the Explicit Memory Management functionality is not used.