Tenured Generation Collection - Major GC
This section describes basic steps of a Tenured Generation Collection, also called a Major GC, which uses a simple 3-step Mark-Sweep-Compact algorithm on the entire Tenured Generation.
The basic algorithm used in Major GC is called Mark-Sweep-Compact,
which consists of 3 steps:
- Mark - Identify which objects are still live in the Tenured Generation and mark them.
- Sweep - Identify and remove garbage by sweeping over the entire Tenured Generation.
- Compact - Move live objects towards the beginning of the generation to combine fragmented free spaces
into a single contiguous chunk at the end of the generation.
The Mark-Sweep-Compact algorithm is very straightforward as illustrated in the picture below:
Table of Contents
About This Book
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, Z
Serial Collector - "+XX:+UseSerialGC"
Parallel Collector - "+XX:+UseParallelGC"
Concurrent Mark-Sweep (CMS) Collector - "+XX:+UseConcMarkSweepGC"
Garbage First (G1) Collector - "+XX:+UseG1GC"
The Z Garbage Collector (ZGC) - "+XX:+UseZGC"
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
Garbage Collection Performance Test Summary
Full Version in PDF/EPUB