Hitachi

uCosminexus Application Server System Design Guide


7.1 Overview of GC and JavaVM memory management

The purpose of JavaVM tuning is to improve the processing performance of the system. Tuning the JavaVM to manage memory optimally with the GC mechanism in mind will yield improvements to system performance. Because the behavior of the GC mechanism differs according to how memory is managed, you need to select the memory management method that best meets the requirements of the system. For an Application Server, you can select from the following three memory management methods.

Table 7‒1: Characteristics of memory management methods

No.

Memory management method

Characteristics

1

Serial GC

  • Suitable for systems that prioritize throughput.

  • This method offers high throughput.

  • There are two approaches to GC: Full GC in which GC takes a long time, and copy GC in which GC finishes in a shorter time. You cannot control the duration of GC.

  • You can make Full GC occur less frequently by tuning the memory size.

2

Combination of Serial GC and Explicit Memory Management functionality

  • Suitable for typical Web front-end systems that use sessions.

  • This method offers high throughput.

  • There are two approaches to GC: Full GC in which GC takes a long time, and copy GC in which GC finishes in a shorter time. You cannot control the duration of GC.

  • In session-based systems, you can make Full GC occur less frequently by tuning the memory size and using the Explicit heap to manage sessions.

3

G1 GC

  • Suitable for memory-intensive systems and systems that prioritize responsiveness.

  • This method offers lower throughput than the preceding two.

  • There are two approaches to GC: Full GC in which GC takes a long time, and a combination of young GC and mixed GC in which GC finishes in a shorter time. You can control the duration of young GC and mixed GC.

  • You can make Full GC occur less frequently by tuning the memory size and increasing the number of threads that perform GC.

For details about serial GC, see sections 7.2 to 7.10. For details about the Explicit Memory Management functionality, see sections 7.11 to 7.14. For details about G1 GC, see sections 7.15 and 7.16.