7.4.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 garbage collection, as the unused memory size of the Tenured area is lesser than the used memory size of the New area.

Usually a copy garbage collection 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, JavaVM starts generating a full garbage collection and tries to increase the unused memory size of 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.5 Estimating the memory size of the New area in Java heap.

Hint
When checked with the help of extended verbosegc information, if a full garbage collection occurs frequently without occurrence of a copy garbage collection, it can be concluded that the memory size of Tenured area is lesser than the objects saved 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.