Hitachi

uCosminexus Application Server System Design Guide


7.15.4 Saving objects

The process of moving a Java object whose age has not reached the threshold to the Tenured area is called saving the object. Saving of objects takes place when there is a large number of in-use objects in the Eden area and the From space when young GC or mixed GC is executed, and there is not enough memory space in the To space to accommodate all those objects. In this case, objects that could not be moved to the To space are moved to the Tenured area.

Figure 7‒20: Saving objects

[Figure]

The saving of objects results in objects with short lifespans being stored in the Tenured area that are not meant to be stored in the Tenured area. If this process repeats, objects that were meant to be collected by young GC or mixed GC remain in the memory space. This increases the memory usage of the Java heap, ultimately triggering Full GC.

The following figure shows how memory usage changes when objects are saved.

Figure 7‒21: Change in memory usage when objects are saved

[Figure]

When Full GC is executed, the application might pause for several seconds to several tens of seconds.

For this reason, when determining the configuration of the memory space and memory size, you must achieve a balance between the Eden area and the Survivor area to prevent objects from being saved.