Fix Version/s: 11
Compatibility Risk Description:Default value change may change performance profile. While changes have been tested on a range of benchmarks with no difference, there might be some applications where this change does have a negative impact.
Interface Kind:add/remove/modify command line option
Increase the default value of the flag G1RefProcDrainInterval to 1000 to improve performance of G1 reference processing.
The G1RefProcDrainInterval flag determines the frequency at which new references are actually processed while keeping alive references during reference processing.
The current value is 10, i.e. every ten attempts to keep alive References G1 drains the mark stack. However, due to expensive setup and teardown of G1 marking, this seriously inhibits reference processing performance performance.
Tests showed that with a significantly higher value, the suggested value of 1000, reference processing time can more than halve.
This request changes the default value of the G1RefPRocDrainInterval flag to a higher value that after some testing on a reference processing test applications shows significant improvements. The value 1000 has been chosen as a conservative measure to get most of the performance improvements by queuing up work, but not using a too high value. The CR JDK-8201527 contains a graph showing performance with different values.
One alternatives could be to improve setup and teardown performance of G1 marking, however this is significantly more work; increasing the default value is a short term measure.
The review thread is at http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2018-April/021817.html.
This is the diff for this specification change:
- product(int, G1RefProcDrainInterval, 10, \ + product(uint, G1RefProcDrainInterval, 1000, \ "The number of discovered reference objects to process before " \ "draining concurrent marking work queues.") \ range(1, INT_MAX) \