RFR (M): 8060697: Improve G1 Heap Growth Heuristics

Tom Benson tom.benson at oracle.com
Tue Nov 24 03:02:21 UTC 2015


Hi,
Here is a proposed change to the G1 heap growth code for review. I've 
added a detailed description to the CR, but here is the short version: 
After a GC pause, the average ratio of time spent in recent GC pauses vs 
overall time is computed. If it exceeds GCTimeRatio, the heap is 
expanded by a fixed amount.  With the new code, some deficiencies in the 
ratio tracking are addressed, and the expansion size is scaled according 
to how much the desired ratio is, on average, exceeded by.  The target 
ratio itself is also scaled at the lowest heap sizes.

The case that triggered this was actually JDK-8132077, where the JVM'08 
Compress benchmark saw a 40% degradation.  It was due to the heap being 
about half the size in some runs, because of the way heap growth worked.

I'm still collecting the final performance data for this version, and 
will attach it to the CR.  Earlier experimental versions showed good 
improvements in consistency of heap sizes.  A couple of benchmarks 
average a percentage point or two lower, while others improve by that 
much or more.  No growth percentage or scaling is going to be ideal for 
every test, but the goal was to maintain performance without growing too 
large. In fact, some tests now use much smaller heaps.

CR:
https://bugs.openjdk.java.net/browse/JDK-8060697
Webrev:
http://cr.openjdk.java.net/~tbenson/8060697/webrev/

Testing:
jprt, GC tests, benchmarks (specjvm'08, jbb'05, jbb'13, nosql)

Thanks,
Tom



More information about the hotspot-gc-dev mailing list