Hitachi

uCosminexus Application Server System Design Guide


7.3.1 Concept of tuning

Usually, you can process copy GC in lesser time interval than Full GC.

You can avoid the occurrence of Full GC for the entire Java heap by implementing copy GC to New area and recovering adequate memory. However, avoiding the occurrence of full garbage collection is related to the reduction in stop frequency of system and improving the processing performance. To achieve these objectives, you must set appropriate size or ratio of memory space in the JavaVM options.

Another effective way to prevent Full GC from occurring is to allocate some of the objects in the Tenured area to the Explicit heap that is managed by the Explicit Memory Management functionality. The Explicit heap can be used from applications by using the automatic allocation configuration file or Explicit Memory Management APIs, and is also used from J2EE servers. The automatic release functionality is enabled with the default settings of the Explicit Memory Management functionality. When the automatic release functionality is enabled, JavaVM automatically calls back the Explicit heap area memory. The automatic release processing might not finish for a long time depending on how the Explicit heap is used. Therefore, the Explicit Memory Management functionality must be used appropriately and the Explicit heap memory size must be tuned suitably so that the automatic release processing, which does not end for a long time, does not occur. For details on the automatic release processing, see 7.7 Releasing Explicit memory blocks when the automatic release functionality is enabled in the uCosminexus Application Server Expansion Guide.

Based on this information, you can implement JavaVM tuning for the following two points:

The following figure shows the relation of ideal memory usage and lapsed time.

Figure 7‒8: Relation of ideal memory usage and lapsed time

[Figure]

In this figure, all the objects with short lifespan are recovered by copy GC and the objects are not expanded or deleted. Therefore, the memory size after executing copy GC is fixed. You can thereby implement operations in stable status without occurrence of Full GC.

In the JavaVM tuning, the tuning is performed by estimating memory size used in each area of memory space used by JavaVM, with this status as an ideal status.

Tip

Tuning standards

Figure 7-8 shows an ideal example where Full GC does not occur even once. Actually, estimate the occurrence of copy GC 10 to 20 times for a single occurrence of Full GC and accordingly implement the tuning.