uCosminexus Application Server, Expansion Guide
The huge blocks, which cause a long time for automatic release processing of the Explicit memory block, are generated because long-lived objects, which are used until the application stops, are generated and placed because a user program or framework is used. For effectively using the Explicit Memory Management functionality, you must identify the objects, which cause generation of these huge blocks, and make sure that those objects are not placed in the Explicit heap.
You can identify the objects that cause generation of huge blocks if you use object release rate information. The object release rate information is the rate of objects released by automatic release processing of the Explicit memory block. It can be understood that the objects having low release rate in huge blocks are the objects, which cause generation of huge blocks. If you specify freeratio option in eheapprof command and execute the command, you can output the object release rate information in the Explicit heap information of extended thread dump. Refer to this information and specify classes of the objects in the configuration file for Explicit Memory Management functionality application exclusion. For details on how to specify in the configuration file for Explicit Memory Management functionality application exclusion, see 8.13.3 Controlling the application target of the Explicit Memory Management functionality by using a configuration file.
The following figure shows an example of output of object release rate information.
Figure 8-19 Example of output of object release rate information
As shown in this figure, JavaVM executes full garbage collection and automatic release processing of Explicit memory block for obtaining object release rate information. Because these processing might stop the application for few seconds, we recommend that you output the object release rate information when developing the system or when the work is stopped.
The object release rate information, which is output here, is calculated on the basis of the result of first automatic release processing that is generated when outputting the information. Hence, we recommend that you acquire the object release rate information multiple times for increasing the accuracy.
If you specify -freeratio option in eheapprof command and execute the command, JavaVM executes the following processing:
The following figure shows an example of calculating object release rate information.
Figure 8-20 Example of calculating object release rate information
If there are objects that are referred from outside (the Explicit memory block not targeted for releasing), move the objects to a new Explicit memory block when executing automatic release processing. Similar to the Explicit memory block 6, if multiple Explicit memory blocks exist before automatic release, calculate object release rate from the total value of number of objects in multiple Explicit memory blocks and the number of objects in a new Explicit memory block.
For details on how to specify eheapprof command and output contents of Explicit heap information, see eheapprof (Outputting extended thread dump with Explicit heap details) in the uCosminexus Application Server Command Reference Guide.
All Rights Reserved. Copyright (C) 2013, 2015, Hitachi, Ltd.