G1 collector stays on small young-generation size longer than expected after concurrent cycle

Thomas Schatzl thomas.schatzl at oracle.com
Wed Oct 30 08:14:28 PDT 2013


Hi,

On Mon, 2013-10-28 at 16:50 +0100, Wolfgang Pedot wrote:
> Hello,
> 
> I have spend quite some time tuning G1 for my use case now and I am 
> generally pleased with the results (ignoring PermGen for now). I do have 
> a question of understanding about the automatic sizing of 
> young-generation though, here are parts of my GC-log (only 
> Date/Timestamp and sizes):
> 
>
> 2013-10-28T15:59:44.685+0100: 21501.573: [GC pause (young)
>     [Eden: 648.0M(648.0M)->0.0B(648.0M) Survivors: 96.0M->96.0M Heap: 
> 7911.3M(14.6G)->7293.7M(14.6G)]
>[...]
> 2013-10-28T16:01:04.700+0100: 21581.588: [GC pause (young)
>     [Eden: 6368.0M(6368.0M)->0.0B(6208.0M) Survivors: 88.0M->176.0M 
> Heap: 13.8G(14.6G)->7858.4M(14.6G)]
> 
> Predicted and real pause-times for those collects are well below the 
> pause-target (~120ms vs 300ms) and mixed collects have stopped, is there 
> another reason to keep young-gen small during that time? I can provide 
> the full log if it helps.

This seriously looks like a bug. Unfortunately in that area of the code
(I think around G1CollectorPolicy::update_young_list_target_length())
there is absolutely no good logging.

Could you try running with -XX:+PrintAdaptiveSizePolicy and send the
relevant log snippet? Maybe it gives some useful information at the end
of mixed gcs.

> Relevant parameters:
> 
> /opt/jdk1.7.0_45/bin/java -Xmx15000M -Xms15000M  -XX:+UseG1GC 
> -XX:MaxGCPauseMillis=300 -XX:G1HeapRegionSize=8m 
> -XX:+ParallelRefProcEnabled -XX:InitiatingHeapOccupancyPercent=64 
> -XX:G1ReservePercent=5 -XX:G1MixedGCLiveThresholdPercent=70 
> -XX:G1HeapWastePercent=5
> 
> I have been playing around with the percentages because we had to many 
> inefficient concurrent cycles and heap is rather tight.
> I manually set the region-size to 8MB because the heap-size is close to 
> 16GB.

The defaults are typically somewhat conservative, and should have no
impact on this behavior.

Thanks,
  Thomas



More information about the hotspot-gc-use mailing list