RFR (S/M): 8136678: Implement adaptive sizing algorithm for IHOP

Jon Masamitsu jon.masamitsu at oracle.com
Fri Nov 13 21:03:16 UTC 2015



Can you add a comment describing what this is?

91 size_t _prev_unrestrained_young_size;

Why "recalculate" instead of just "calculate"?  "calculate" has the 
virtual of
being a little shorter name.

95 // Updates _current_threshold according to internal state.
96 void recalculate();

This says that you want the target_occupancy to be at the maximum value
that will still allow young gen sizes as set with G1ReservePercen? That 
a bit aggressive to me since it is the value that will be used until 
there is
enough data to create a better estimate.   Maybe arbitrarily add an 
extra 20%
to safe_heap_percentage?

1257 if (safe_heap_percentage < 100) {
1258 target_occupancy = G1CollectedHeap::heap()->max_capacity() * (100.0 
- safe_heap_percentage) / 100.0;
1259 }


Add a flag in place of the "2" just to make experimentation easier?

133 return (_marking_times_s.num() > 2) && (_allocation_rate_s.num() > 2);

Do you still want the comment at the end?

244 size_t const settled_ihop3 = 0; // target_size - (young_size + 
alloc_amount2/alloc_time2 * marking_time2);

Rest looks good.


On 11/5/2015 1:54 AM, Thomas Schatzl wrote:
> Hi all,
>    can I have reviews for this change that adds a G1IHOPControl instance
> that adaptively adjusts the current IHOP based on allocation rate and
> marking cycle length?
> Instead of statically setting the IHOP value (by the user at VM
> startup), this change adds adaptive IHOP control similar to CMS.
> The main change is in G1IHOPControl lines 106-121, the rest is just
> setup changes and a unit test.
> This feature, enabled by setting G1UseAdaptiveIHOP, is disabled by
> default for now. It is planned to be enabled by default in JDK-8136680,
> when more thorough testing has been conducted by SQE.
> Generally it boosts G1 throughput significantly due to the low IHOP
> default value of 45, which with that change typically gets >70, if not
> up to 80-90, decreasing pause times significantly.
> It depends on JDK-8136681 which is also out for review.
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8136678
> Webrev:
> http://cr.openjdk.java.net/~tschatzl/8136678/webrev/
> Testing:
> jprt, vm.gc with G1UseAdaptiveIHOP disabled and enabled, unit test
> Thanks,
>    Thomas

More information about the hotspot-gc-dev mailing list