7.16.5 Tuning to improve throughput
|
|
To improve throughput, you must reduce the frequency with which GC occurs. Young GC and mixed GC are triggered when the Eden area becomes full. By increasing the size of the New area, you also increase the size of the Eden area which reduces the frequency of GC. You can perform tuning to increase the size of the New area by using the -Xmx option or the -XX:GCMaxPauseMillis option.
-
-Xmx option
You can increase the maximum size of the Java heap by specifying a larger value in this option. Increasing the maximum size of the Java heap area also increases the size of the New area.
-
-XX:MaxGCPauseMillis option
You can increase the target pause time by specifying a larger value in this option. Because young GC reclaims as much of the New area as the target pause time allows, extending the target pause time increases the size of the New area.
If you complete the tuning to improve throughput but throughput does not improve, it is possible that the size of the New area is at the maximum end of the range in which it can be resized. Check whether the New area was resized based on the changes in the values for the Eden area and the Survivor area in the log data. For details about how to perform this check, see 7.15.8 Young GC. Note that the tuning to improve throughput can sometimes reduce the responsiveness of the application. For this reason, you must verify the performance of the system after completing the tuning process.