For garbage first collector, young gc means performing gc in young generation only and mixed gc would clean both young and old generation.
So what is full gc? Why it lasts longer than mixed gc?
I've done some searching but I didn't find any post that explains full gc.
Full GC is an important phase in the garbage collection process. During this full GC phase, garbage is collected from all the regions in the JVM heap (Young, Old, Perm, Metaspace). During this phase, the JVM is paused.
G1 GC uses the Snapshot-At-The-Beginning (SATB) algorithm, which takes a snapshot of the set of live objects in the heap at the start of a marking cycle. The set of live objects is composed of the live objects in the snapshot, and the objects allocated since the start of the marking cycle.
One difference is that G1 is a compacting collector. Also, G1 offers more predictable garbage collection pauses than the CMS collector, and allows users to specify desired pause targets. As with CMS, G1 is designed for applications that require shorter GC pauses.
Two types of gas chromatography are encountered: gas-solid chromatography (GSC) and gas-liquid chromatography (GLC).
Under normal conditions G1 should only run young and mixed collections to meet its pause time goals.
Full GCs are a fallback mechanism and likely to violate those goals. They occur when mixed GCs aren't able to keep up with allocations, when a humongous allocation could not be satisifed or when a GC is requested with System.gc()
and some other conditions.
Logging with -XX:+PrintGCDetails
should include a cause for full collections.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With