1

can anyone explain me how is the number of young regions determined by G1 collector? The G1 paper states that "we track the fixed and per-regions costs of fully young collections via historic averaging, and use these estimates to determine the number of young regions allocated between fully young evacuation pauses" but there is no detail.

For example, given the following GC log, what does predicted young region time mean and how is it calculated? How are eden and survivors calculated?

    2015-12-30T08:04:21.124+0000: 10.424: [GC pause (young) 10.424: [G1Ergonomics (CSet Construction) start choosing CSet, _pending_cards: 281, predicted base time: 17.05 ms, remaining time: 182.95 ms, target pause time: 200.00 ms]
 10.424: [G1Ergonomics (CSet Construction) add young regions to CSet, eden: 155 regions, survivors: 5 regions, predicted young region time: 7335.19 ms]
 10.424: [G1Ergonomics (CSet Construction) finish choosing CSet, eden: 155 regions, survivors: 5 regions, old: 0 regions, predicted pause time: 7352.24 ms, target pause time: 200.00 ms]
2015-12-30T08:04:21.171+0000: 10.472: [SoftReference, 0 refs, 0.0000490 secs]2015-12-30T08:04:21.172+0000: 10.472: [WeakReference, 617 refs, 0.0000780 secs]2015-12-30T08:04:21.172+0000: 10.472: [FinalReference, 360 refs, 0.0004730 secs]2015-12-30T08:04:21.172+0000: 10.472: [PhantomReference, 1 refs, 45 refs, 0.0000210 secs]2015-12-30T08:04:21.172+0000: 10.472: [JNI Weak Reference, 0.0000120 secs], 0.0494460 secs]
   [Parallel Time: 47.1 ms, GC Workers: 13]
      [GC Worker Start (ms): Min: 10424.3, Avg: 10424.4, Max: 10424.5, Diff: 0.2]
      [Ext Root Scanning (ms): Min: 1.2, Avg: 1.6, Max: 2.0, Diff: 0.8, Sum: 21.2]
      [Update RS (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0]
         [Processed Buffers: Min: 0, Avg: 0.6, Max: 8, Diff: 8, Sum: 8]
      [Scan RS (ms): Min: 0.0, Avg: 0.0, Max: 0.3, Diff: 0.2, Sum: 0.5]
      [Code Root Scanning (ms): Min: 0.0, Avg: 0.0, Max: 0.3, Diff: 0.3, Sum: 0.3]
      [Object Copy (ms): Min: 44.4, Avg: 44.7, Max: 45.0, Diff: 0.6, Sum: 581.5]
      [Termination (ms): Min: 0.0, Avg: 0.2, Max: 0.3, Diff: 0.3, Sum: 3.0]
      [GC Worker Other (ms): Min: 0.0, Avg: 0.0, Max: 0.1, Diff: 0.1, Sum: 0.4]
      [GC Worker Total (ms): Min: 46.5, Avg: 46.7, Max: 46.8, Diff: 0.2, Sum: 606.9]
      [GC Worker End (ms): Min: 10471.1, Avg: 10471.1, Max: 10471.1, Diff: 0.1]
   [Code Root Fixup: 0.1 ms]
   [Code Root Migration: 0.3 ms]
   [Clear CT: 0.5 ms]
   [Other: 1.5 ms]
      [Choose CSet: 0.0 ms]
      [Ref Proc: 1.1 ms]
      [Ref Enq: 0.0 ms]
      [Free CSet: 0.3 ms]
   [Eden: 4960.0M(4960.0M)->0.0B(4800.0M) Survivors: 160.0M->320.0M Heap: 5142.0M(100.0G)->345.4M(100.0G)]
 [Times: user=0.60 sys=0.01, real=0.05 secs]
user2616566
  • 63
  • 1
  • 3

0 Answers0