7.15.10 Mixed GC
- Organization of this subsection
(1) Trigger
If the predicted collection size exceeds 10% of the Java heap area, mixed GC is scheduled as the method of the next GC. This judgment is made at the conclusion of young GC (normal) immediately following CM, or at the conclusion of mixed GC.
(2) Target
Part of the New area and the Tenured area.
(3) Processing
-
When mixed GC occurs, single-threaded region selection processing is performed together with multi-threaded Evacuation processing.
-
Mixed GC targets the New area, and some of the Tenured area as long as the estimated pause time is within the target pause time.
-
The Evacuation processing of mixed GC is the same as the Evacuation processing of young GC with respect to the New area. For details, see 7.15.8 Young GC.
-
When the Tenured area is added as a GC target, mixed GC re-allocates the in-use objects in the Tenured region to another Tenured region.
-
If the predicted collection size still exceeds 10% of the Java heap area after mixed GC, mixed GC is selected again as the next GC, with young GC executed as usual if the requirements for mixed GC are not met.
(4) Processing results
- Eden area:
-
The objects are collected and the area is left empty. The Eden area is resized after GC has completed.
- Survivor area:
-
The objects in the From space are collected and the space is left empty. The Survivor area is resized after GC has completed.
- Tenured area:
-
Objects determined to have long-term utility are moved to the Tenured area.
Objects in the area added as a GC target are collected.
- Humongous area:
-
Unchanged.
- Metaspace area:
-
Unchanged.
- Free area:
-
The Free area increases or decreases in size as a result of the resizing that occurs after GC.
(5) Pausing of applications
Applications are paused.
(6) Relationship with other GC methods
CM: Not executed during mixed GC.
Young GC: Not executed during mixed GC.
Full GC: If the requirements for Full GC are met while mixed GC is in progress, mixed GC is canceled and Full GC is executed.
(7) Supplementary notes
-
Related options
You can use the -XX:ParallelGCThreads option to change that number of threads involved in evacuation. By increasing the number of threads, you can reduce the time mixed GC takes to complete. If you do not specify this option, the number of threads is based on the number of CPUs recognized by the OS. For details about the -XX:ParallelGCThreads option, see 14.5 Java HotSpot VM options that can be specified in Cosminexus in the uCosminexus Application Server Definition Reference Guide.
-
Confirmation method
You can confirm that mixed GC has occurred when Mixed GC appears as the GC type in the log file. The TargetTenured item shows the size of the Tenured area selected by mixed GC. The Reclaimable item shows the estimated size of collectable objects. For details about how to interpret this information, see -XX:[+|-]HitachiVerboseGC (Option for extended verbosegc information output) in the uCosminexus Application Server Definition Reference Guide.
[VG1]<Wed Jun 12 11:21:10 2013>[Mixed GC 899070K/899072K(1048576K)->501742K/501760K(1048576K), 0.0931560 secs][Status:-][G1GC::Eden: 389120K(389120K)->0K(397312K)][G1GC::Survivor: 41984K->41984K][G1GC::Tenured: 459776K->459776K][G1GC::Humongous: 2048K->2048K][G1GC::Free: 609536K->607232K][Metaspace: 3634K(4492K, 4492K)->3634K(4492K, 4492K)][class space: 356K(388K, 388K)->356K(388K, 388K)][cause:G1EvacuationPause][RegionSize: 1024K][Target: 0.2000000 secs][Predicted: 0.2495800 secs][TargetTenured: 2048K][Reclaimable: 17703K(1.69%)][User: 0.0156250 secs][Sys: 0.0312500 secs][IM: 729K, 928K, 0K][TC: 509][DOE: 16K, 171][CCI: 2301K, 49152K, 2304K]