United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7113006 G1: excessive ergo output when an evac failure happens.
JDK-7113006 : G1: excessive ergo output when an evac failure happens.

Details
Type:
Bug
Submit Date:
2011-11-17
Status:
Closed
Updated Date:
2012-03-29
Project Name:
JDK
Resolved Date:
2012-03-29
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs23
Fixed Versions:
hs23 (b10)

Related Reports
Backport:
Backport:
Relates:

Sub Tasks

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

See Description.
                                     
2011-11-17
PUBLIC COMMENTS

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

http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/bacb651cf5bf
                                     
2012-01-05
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.
                                     
2012-01-06
EVALUATION

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

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



Hardware and Software, Engineered to Work Together