Hitachi

uCosminexus Application Server Maintenance and Migration Guide


9.8.3 Notes for executing the unused objects statistical functionality in the Tenured area

This subsection describes the notes for executing the unused objects statistical functionality in the Tenured area.

Organization of this subsection

(1) Notes when the unused objects statistical functionality in the Tenured area is executed immediately after a Full GC

If you execute the unused objects statistical functionality in the Tenured area immediately after a Full GC, the statistical processing is executed when the unused objects in the Tenured area for which the statistics are to be collected have been collected. Therefore, the total instance size within the class-wise statistical information and the number of instances becomes less, and the unused objects cannot be identified effectively. To effectively identify the unused objects, execute the unused objects statistical functionality in the Tenured area. The following describes the execution of the unused objects statistical functionality in the Tenured area separately for the case where the timing of occurrence of a Full GC is known and for the case where it is not known.

(a) When the timing of occurrence of a Full GC is known

If you execute the unused objects statistical functionality in the Tenured area immediately before a Full GC, the statistical processing is executed when the number of unused objects in the Tenured area for which the statistics are to be collected is large. Therefore, the total instance size within the class-wise statistical information and the number of instances becomes large, and the unused objects can be identified effectively.

(b) When the timing of occurrence of a Full GC is not known

To increase the total instance size within the class-wise statistical information, the number of instances, and effectively identify the unused objects:

  1. To know the timing of occurrence of Full GC, set the -XX:+HitachiVerboseGC option to output the extended verbosegc information at JavaVM startup. By specifying the option, you can acquire the GC information.

  2. Execute the unused objects statistical functionality in the Tenured area at a fixed interval in JavaVM. As a result, you can acquire the GC information and multiple class-wise statistical information.

  3. You can acquire the date and time of a Full GC from the extended verbosegc information, so select the class-wise statistical information that is close to the Full GC. The class-wise statistical information close to the Full GC is information about the statistical processing executed when the number of unused objects in the Tenured area for which statistics are to be collected is large.

(2) Notes on statistical results

The following is an example of reference relationship showing the notes on statistical results.

Figure 9‒12: Example of reference relationship (Notes on statistical results)

[Figure]

In this figure, when you assume a1 as the lowest address, the statistical processing is executed with the reference relationship a1b1c1 in which a1 is the base object. At this point, if you assume b1 or c1 as the base object, expected results will not be output to the statistical results of the unused objects statistical functionality in the Tenured area and the base object list output functionality for Tenured augmentation factors.

(3) Notes on objects for which the statistics are not to be collected

The following figure shows the objects for which the statistics are not to be collected for a case in which the objects (a1 and c1) of the Tenured area have a reference relationship with the object (b1) of other than the Tenured area.

Figure 9‒13: Example of reference relationship (Objects for which the statistics are not to be collected)

[Figure]

In this figure, the statistics are not collected for the object (b1) that belongs to other than the Tenured area. However, the size of the referenced object (c1) of the Tenured area is added to the total instance size of the class B.

(4) Notes for reference relationship from multiple objects

The following figure shows a reference relationship from multiple objects for a case having a reference relationship in which one object (b1) is referenced from multiple reference sources (c1 and d1).

Figure 9‒14: Example of reference relationship (For a reference relationship from multiple objects)

[Figure]

In this figure, if you execute the unused objects statistical functionality in the Tenured area, the statistical processing is executed from the base object having the lowest address among the base objects (c1 and a1) of the reference relationship to which the reference source belongs. Therefore, if a1 is the object with the lowest address and c1 is the base object, the expected results will not be output in the statistical results of the unused objects statistical functionality in the Tenured area and the base object list output functionality for Tenured augmentation factors.

(5) Notes for increasing the statistical value

If executing the unused objects statistical functionality in the Tenured area and the base object list output functionality for Tenured augmentation factors in a Java process in which the -XX:+HitachiAutoExplicitMemory option is specified, the following phenomena occurs:

If you are using versions earlier than 08-70, specify the -XX:-HitachiExplicitMemoryPartialTenuredAreaCollection option to prevent occurrence of this phenomenon.