JDK-7113006 : G1: excessive ergo output when an evac failure happens.
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs23
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-11-17
  • Updated: 2021-08-04
  • Resolved: 2012-03-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8 Other
7u4Fixed 8Fixed hs23Fixed
Related Reports
Relates :  
Relates :  
Description
When the G1 ergo decision output is enabled, it reports a message when a region allocation fails. Unfortunately, when an evacuation failure happens during a GC, a region allocation is attempted for every object that cannot be moved which means that we will get a "region allocation failed" message for each object that cannot be moved, which could be 1,000s, 10,000s, etc. This is what the output looks like:

 211.693: [G1Ergonomics (CSet Construction) add young regions to CSet, eden: 154 regions, survivors: 16 regions, predicted young region time: 163.01 ms]
 211.693: [G1Ergonomics (CSet Construction) finish choosing CSet, eden: 154 regions, survivors: 16 regions, old: 0 regions, predicted pause time: 205.73 ms, target pause time: 200.00 ms]
 211.775: [G1Ergonomics (Heap Sizing) attempt heap expansion, reason: region allocation request failed, allocation request: 16384 bytes]
 211.775: [G1Ergonomics (Heap Sizing) expand the heap, requested expansion amount: 16384 bytes, attempted expansion amount: 1048576 bytes]
 211.775: [G1Ergonomics (Heap Sizing) did not expand the heap, reason: heap expansion operation failed]
 211.775: [G1Ergonomics (Heap Sizing) attempt heap expansion, reason: region allocation request failed, allocation request: 16384 bytes]
 211.776: [G1Ergonomics (Heap Sizing) expand the heap, requested expansion amount: 16384 bytes, attempted expansion amount: 1048576 bytes]
 211.776: [G1Ergonomics (Heap Sizing) did not expand the heap, reason: heap expansion operation failed]
 211.776: [G1Ergonomics (Heap Sizing) attempt heap expansion, reason: region allocation request failed, allocation request: 16384 bytes]
 211.776: [G1Ergonomics (Heap Sizing) expand the heap, requested expansion amount: 16384 bytes, attempted expansion amount: 1048576 bytes]
 ...

We should make sure we do not overwhelm the log with such excessive output.

(thanks to David Vengerov for bringing this up)

Comments
EVALUATION http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/bacb651cf5bf
22-03-2012

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/bacb651cf5bf
18-01-2012

PUBLIC COMMENTS The excessive ergo output was generated by repeated failed heap expansion attempts during a GC. I slightly expanded the scope of the CR to not only stop generating the ergo output after the first failed heap expansion but also to not re-attempt the heap expansion. If heap expansion fails once, it will probably fail again so it's pointless to keep trying. Without doing a careful and in-depth performance analysis I see a mild improvement in GC times when an alloc failure happens with this fix.
06-01-2012

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/bacb651cf5bf
05-01-2012

PUBLIC COMMENTS The ergo verbose output was introduced with 7050392: G1: Introduce flag to generate a log of the G1 ergonomic decisions.
17-11-2011

EVALUATION See Description.
17-11-2011