Hitachi

uCosminexus Application Server System Design Guide


7.5.2 Reason for adding the memory size of the New area in Java heap

In the memory size of the Tenured area, Hitachi recommends you to add the memory size of the New area to the minimum required memory size of the application. This is to prevent frequent occurrence of Full GC, as the unused memory size of the Tenured area is lesser than the used memory size of the New area.

Usually, copy GC occurs when the Eden area becomes full. At that point, the Java objects in use that exist in the Eden area and the From space of the Survivor area try to move to the To space of the Survivor area. If, however, the unused area of the Tenured area is lesser than the memory size that is in use in the Eden area and the Survivor area, and all the Java objects of the New area are promoted, the Java objects in use do not move to the Tenured area. At this point, the JavaVM triggers Full GC and attempts to increase the unused memory size in the Tenured area.

To prevent this, apart from the memory size required by application, add the memory size equivalent to the New area, in the Tenured area.

The following figure shows this concept:

Figure 7‒11: Reason for adding the memory size of the New area

[Figure]

For details about estimating the memory size of the New area, see 7.6 Estimating the memory size of the New area in Java heap.

Tip

If checking the extended verbosegc information and other resources reveals that Full GC occurs frequently without copy GC occurring, you can conclude that the memory size of the Tenured area is too small for the objects promoted from the New area. This situation occurs when the size of the New area is increased. Modify the memory size of the Tenured area, as and when required. Also modify the relation between the Eden area and the Survivor area of the New area.