3.1.1 Memory management methods for Java
The memory management for Java uses GC and Application Server functions to control the memory area used by programs. To properly manage the Java memory, you need to understand the structure of the memory area to be used and the flow of GC processing. You can select from three Java memory management methods: SerialGC, a combination of SerialGC and the explicit memory management functionality (the functionality that suppresses GC), or G1GC. By selecting the appropriate memory management method based on the system requirements, you can improve the system processing performance.
Use GC to manage memory for Application Server and for applications running on Application Server. If a request is sent while GC is being performed, processing of the request stops until GC ends. For this reason, whether GC can be properly executed greatly affects the processing performance of the system.
The following table shows the memory management method for Java for Application Server. Depending on the memory management method, the operation of GC varies. Therefore, you must select the memory management method for Java based on the system requirements.
No. |
Memory management method of Java |
Appropriate system and characteristics |
---|---|---|
1 |
SerialGC |
This method is suitable for systems that put importance on throughput.
|
2 |
Combination of SerialGC and the explicit memory management functionality |
This method is suitable for general web front systems that use sessions.
|
3 |
G1GC |
This method is suitable for systems that use large amount of memory, or systems that put importance on responses.
|