United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-7011855 : G1: non-product flag to artificially grow the heap

Details
Type:
Enhancement
Submit Date:
2011-01-12
Status:
Closed
Updated Date:
2011-07-29
Project Name:
JDK
Resolved Date:
2011-05-10
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs20
Fixed Versions:
hs21 (b11)

Related Reports
Backport:

Sub Tasks

Description
It will be very helpful to have a non-product flag in G1 that artificially allocates regions in the heap to increase the rate at which the used space in the heap grows. This will increase the frequency of marking cycles as well as cleanup opererations and will allow us to stress test that code when we need to.

We could use specially written tests which fill up the heap quickly to achieve the same effect. But this feature will be generally more helpful as it will do the same while running any application in order to generate different loads on the marking cycle (mutation patterns, object graph shapes, etc.) and stress it in different ways.

                                    

Comments
SUGGESTED FIX

I'll introduce a develop parameter call G1DummyRegionsPerGC which specifies how many dummy regions will be allocated at the end of each GC. I use GCs here as a way to get a regular "callback" to perform the dummy region allocations. An alternative would have been to introduce a special thread that regularly issues allocation requests but that'd probably be overkill.

Another alternative might be for the parameter to be an Growth Rate (e.g., MBs/sec) and at the end of each GC to allocate enough regions to meet that rate if necessary (it might be that the application is already growing the heap at the desired rate).
                                     
2011-01-12
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/49a67202bc67
                                     
2011-04-20
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/49a67202bc67
                                     
2011-05-05



Hardware and Software, Engineered to Work Together