Java 8 GC Tutorials - Herong's Tutorial Examples - v1.03, by Dr. Herong Yang
Collector Combinations: Serial, Parallel, Concurrent, G1
This section describes different garbage collector combinations supported by Java 8 HotSpot: Serial, Parallel, Concurrent, and G1.
In previous sections, we discussed garbage collectors for Young generation and Tenured generation independently:
Now let's look dependencies and compatibilities of garbage collectors. As of Java 8, HotSpot JVM can support the following 5 combinations of garbage collectors:
GC Combination Minor GC Major GC Thread
-------------- -------- ------- ------
Serial Serial Serial 1
-XX:+UseSerialGC Stop-the-world Stop-the-world
Parallel Parallel Scavenge Parallel Old
-XX:+UseParallelGC Mostly Parallel Mostly Parallel Multi
-XX:+UseParallelOldGC Stop-the-world Stop-the-world
Concurrent Parallel New CMS
-XX:+UseConcMarkSweepGC Mostly Parallel Mostly Parallel Multi
Stop-the-world Mostly concurrent
Concurrent Old only Serial CMS
-XX:+UseConcMarkSweepGC Mostly Parallel Mostly Parallel Multi
-XX:-UseParNewGC Stop-the-world Mostly concurrent
Garbage First (G1) Garbage First Garbage First Multi
-XX:+UseG1GC Mostly Parallel Mostly Parallel
Stop-the-world Mostly concurrent
Note that:
Next, we will discuss each GC combination individually.
Table of Contents
Heap Memory Area and Size Control
JVM Garbage Collection Logging
►Introduction of Garbage Collectors
JVM Memory Manager - Garbage Collector
Generational Garbage Collection in HotSpot
Young Generation Collection - Minor GC
Young Generation Collectors - Serial, PS, ParNew, G1
Tenured Generation Collection - Major GC
Tenured Generation Collectors - Serial, ParOldGen, CMS, G1
►Collector Combinations: Serial, Parallel, Concurrent, G1
Serial Collector - "+XX:+UseSerialGC"
Parallel Collector - "+XX:+UseParallelGC"
Concurrent Mark-Sweep (CMS) Collector - "+XX:+UseConcMarkSweepGC"
Garbage First (G1) Collector - "+XX:+UseG1GC"
Object References and Garbage Collection
Garbage Collection Performance Test Program
Performance Tests on Serial Collector
Performance Tests on Parallel collector
Performance Tests on Concurrent collector
Performance Tests on G1 collector