United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6679764 enable parallel compaction by default
JDK-6679764 : enable parallel compaction by default

Details
Type:
Enhancement
Submit Date:
2008-03-25
Status:
Closed
Updated Date:
2012-04-25
Project Name:
JDK
Resolved Date:
2012-02-21
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs13
Fixed Versions:
hs23 (b13)

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

Sub Tasks

Description
Server-class machine ergonomics was introduced in jdk5.  If the machine upon which
the jvm is running is powerful enough (currently, at least 2 physical cores plus
at least 2gb of memory), the server jvm is invoked using the parallel scavenger
rather than the serial scavenger.  Currently the old gen collector used is
serial mark-sweep-compact.  Now that the parallel old gen collector is mature,
we should change to using it instead.

                                    

Comments
EVALUATION

The argument-processing semantics are simple, but not completely trivial.  The current behavior is that if -XX:+UseParallelOldGC is specified on the command-line, it automatically enables -XX:+UseParallelGC (parallel young gc).  This should be preserved.  This RFE adds the behavior that when -XX:+UseParallelGC is enabled, either by ergonomics or explicitly on the command line, that -XX:+UseParallelOldGC is also enabled.

The only question is what the arg processing code should do with the command line:

    java -XX:-UseParallelOldGC -XX:+UseParallelGC ...

The relevant point is that -XX:-UseParallelOldGC occurs before -XX:+UseParallelGC.  The convention for hotspot argument processing is "last one wins" and one could  reasonably interpret -XX:+UseParallelGC as implying -XX:+UseParallelOldGC.  Doing so would cause the above command line to enable UseParallelOldGC.  While it's reasonable, it's not particularly intuitive or user friendly.  I think the best choice for the above command line would be to disable UseParallelOldGC.
                                     
2008-04-14
EVALUATION

What I actually had in mind was for server ergo to set UseParallelOldGC, which
would set UseParallelGC automatically.  I think that if only UseParallelGC is
specified on the command line, the user should still get what he/she gets now,
which is serial old + parallel young.  If both UseParallelOldGC and
UseParallelGC are specified in any order, the same thing happens as now, which is
parallel old + parallel young.

Inother words, I think that everything should work exactly as it does now,
except that server ergo should set UseParallelOldGC rather than UseParallelGC.
                                     
2008-04-14
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/24cae3e4cbaa
                                     
2012-02-03
EVALUATION

After review and some discussion, went with the solution in the first entry:  if UseParallelGC is enabled, then enable UseParallelOldGC (unless it has been otherwise disabled via the command line or rc file).  Relatedly, if UseParallelOldGC is enabled, then enable UseParallelGC (this is done unconditionally, since UseParallelOldGC requires UseParallelGC).
                                     
2012-02-03
EVALUATION

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

The information has been added to the Java SE 7u4 Release Notes as a JVM feature.
                                     
2012-04-25



Hardware and Software, Engineered to Work Together