Garbage First (G1) Collector - "+XX:+UseG1GC"

This chapter provides tutorial notes and example codes on the Garbage First (G1) Collector specified by the '+XX:+UseG1GC' JVM option. Topics include introduction the G1 Collector; G1 log message format; Stop-The-World behavior of G1 Collector.

These sections are omitted from this Web preview version. To view the full content, see information on how to obtain the full version this book.

What Is Garbage First (G1) Collector

Garbage First GC Log Message Format

Maximum Logging of All Phases on Normal Young GC

Maximum Logging on Concurrent Start Young GC

Maximum Logging of All Phases on Old GC

Maximum Logging of All Phases on Full GC

"-XX:ParallelGCThreads=6" - G1 Parallel Threads

"-XX:ConcGCThreads=5" - Old GC Concurrent Threads

"-XX:G1HeapRegionSize=n" - G1 Region Size

G1 Humongous Allocation - Objects Too Large

"-Xlog:gc+age=trace" - Object Age

"-XX:+MaxTenuringThreshold=0" - Skip G1 Survivors


Table of Contents

 About This Book

 Heap Memory Area and Size Control

 JVM Garbage Collection Logging

 Introduction of Garbage Collectors

 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