United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6604422 G1: re-use half-promoted regions
JDK-6604422 : G1: re-use half-promoted regions

Details
Type:
Enhancement
Submit Date:
2007-09-13
Status:
Resolved
Updated Date:
2010-04-04
Project Name:
JDK
Resolved Date:
2009-04-02
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
hs15 (b04)

Related Reports
Backport:
Backport:
Backport:
Backport:
Relates:
Relates:
Relates:

Sub Tasks

Description
Currently, G1 discards the last region promoted to after an evacuation pause and it does not re-use it during the next evacuation pause. This can result in a lot of half-full regions residing in the heap. We should ensure that the last region promoted to during an evacuation pause is also the first region promoted to during the subsequent evacuation pause. This was, G1 will utilize the heap a bit better.

                                    

Comments
EVALUATION

See Comments.
                                     
2007-12-03
EVALUATION

A did a quick test and, interestingly, my fix for this bug does not seem to be affecting how often marking cycles happen (i.e., two runs, one with and one without the fix, do the same number of marking cycles and those cycles are similarly spaced apart). It actually makes sense, as in both cases, the marking cycle is initiated when the used space in the heap is over a given limit. However, in the run without the fix, some of the space that is free, resides in several half-full regions that we might not be able to allocate from Whereas, in the run with the fix, the space that is free resides in more totally empty regions. So, the latter case has less of a chance of getting a concurrent marking failure (as there's actually more free space available for allocation). So, the fix is still worth incorporating.
                                     
2008-02-22
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/6c4cea9bfa11
                                     
2009-03-16



Hardware and Software, Engineered to Work Together