7.16.4 Tuning to shorten worst-case response times
This approach to tuning shortens the worst-case response time by reducing the length of time an application pauses for GC to take place. This approach is effective when application pause time due to GC accounts for a large percentage of response time. You can identify application pause time from the gc_time item in VG1 log entries. For details about VG1 log entries, see -XX:[+|-]HitachiVerboseGC (Option for extended verbosegc information output) in the uCosminexus Application Server Definition Reference Guide.
To shorten worst-case response times, you must reduce the application pause time that is caused by GC. Because G1 GC allows you to specify the pause time, you can reduce the worst-case response time by specifying a smaller value.
-
-XX:MaxGCPauseMillis option
You can reduce the target pause time and shorten the worst-case response time by specifying a smaller value in this option. However, this causes GC to occur more often which reduces throughput. If you perform tuning to shorten the worst-case response time, you must repeat system verification to ensure that the system meets the system requirements. Because every type of GC executed by G1 GC targets the New area, you cannot reduce the time taken by GC to less than that taken to reclaim the New area. The pause time beyond which no further reductions are possible is called the minimum pause time. If reducing the target pause time does not shorten the worst-case response time, then check the GC pause time in the log data.
The GC pause time is the highlighted and bolded part in the following log entry.
[VG1]<Wed Jun 12 11:21:10 2013>[Young GC 899070K/899072K(1048576K)->501755K/501760K(1048576K), 0.0931560 secs][Status:-][G1GC::Eden: 389120K(389120K)->0K(397312K)][G1GC::Survivor: 41984K->41984K][G1GC::Tenured: 459776K->459776K][G1GC::Humongous: 2048K->2048K][G1GC::Free: 609536K->607232K][Metaspace: 3634K(4492K, 4492K)->3634K(4492K, 4492K)][class space: 356K(388K, 388K)->356K(388K, 388K)][cause:G1EvacuationPause][RegionSize: 1024K][Target: 0.2000000 secs][Predicted: 0.2495800 secs][TargetTenured: 0K][Reclaimable: 0K(0.00%)][User: 0.0156250 secs][Sys: 0.0312500 secs][IM: 729K, 928K, 0K][TC: 509][DOE: 16K, 171][CCI: 2301K, 49152K, 2304K]
If reducing the target pause time does not shorten the worst-case response time, this means that the minimum pause time has been reached. A target time that is too close to the minimum pause time means that when the target pause time is exceeded, it is exceeded by a wider margin. This can extend the worst-case response time. If the system still does not meet the system requirements after reducing the target pause time, then tuning on its own is not enough. You will need to modify the application in order to meet the system requirements.