7.15.11 Full GC
|
|
- Organization of this subsection
(1) Triggers
Full GC is executed when there is no more Free area remaining and Evacuation processing cannot secure an area to which to copy evacuated objects, or when there is not enough free space to copy an object to the Humongous area. It is also executed when there is no more free space in the Metaspace area, and when System.gc() is called.
(2) Target
New area, Tenured area, Humongous area, and Metaspace area
(3) Processing
-
Full GC is executed using a single thread after pausing the application thread.
-
When Full GC is triggered, the application pauses until GC is completed without regard to the target pause time.
-
Full GC processing is the same as the Full GC processing performed as part of serial GC. If Full GC is unable to secure the necessary free space, then an OutOfMemory exception occurs. For details, see 7.2 Mechanism of serial GC.
-
Typically, young GC and mixed GC take less time to complete than Full GC.
(4) Processing results
Eden area: The objects are collected and the area is left empty.
Survivor area: In-use objects are moved to the Tenured area and the area is left empty.
Tenured area: In-use objects are reorganized.
Humongous area: In-use objects are reorganized.
Metaspace area: In-use objects are reorganized.
Free area: Increases in size due to reclaimed regions.
(5) Pausing of applications
Applications are paused.
(6) Relationship with other GC methods
CM: Not executed during Full GC.
Young GC: Not executed during Full GC.
Mixed GC: Not executed during Full GC.
(7) Supplementary notes
-
Confirmation method
You can confirm that Full GC has occurred when Full GC appears as the GC type in the log file. Because Full GC makes no predictions regarding subsequent GC, 0 appears as the predicted pause time and predicted collection size.
[VG1]<Wed Jan 15 12:51:32 2014>[Full GC 130443K/131072K(131072K)->55462K/56320K(131072K), 2.3265610 secs][Status:-][G1GC::Eden: 0K(43008K)->0K(43008K)][G1GC::Survivor: 0K->0K][G1GC::Tenured: 131072K->56320K][G1GC::Humongous: 0K->0K][G1GC::Free: 0K->74752K][Metaspace: 3634K(4492K, 4492K)->3634K(4492K, 4492K)][class space: 356K(388K, 388K)->356K(388K, 388K)][cause:ObjAllocFail][RegionSize: 1024K][Target: 0.2000000 secs][Predicted: 0.0000000 secs][TargetTenured: 0K][Reclaimable: 0K(0.00%)][User: 2.1700000 secs][Sys: 0.0000000 secs][IM: 277185K, 261856K, 44544K][TC: 1168][DOE: 0K, 0][CCI: 5808K, 49152K, 5952K]