Parallel Collector GC Log Message Format

This section describes the GC log message format of HotSpot JVM Parallel Collector.

Before doing any testing with the Parallel Collector, let's look at log messages generated by the Parallel Collector first:

herong> java -Xms40m -Xmx80m -XX:+UseParallelGC \
   -Xlog:gc=info,gc+heap=info GarbageCollection

[0.013s][info][gc] Using Parallel
   -- This message indicates that Parallel Collector was used

[0.359s][info][gc,heap] GC(0) PSYoungGen: 10240K->1504K(11776K)
[0.359s][info][gc,heap] GC(0) ParOldGen: 0K->1843K(27648K)
[0.359s][info][gc     ] GC(0) Pause Young (Allocation Failure)
                              10M->3M(38M) 5.280ms
   -- A Young (Minor) GC occurred
      PSYoungGen stands for Parallel Scavenge Young Generation
      ParOldGen stands for Parallel Old Generation

1   40370176   28669696   11700480
2   40370176   27052752   13317424

[0.515s][info][gc,heap] GC(1) PSYoungGen: 11674K->1504K(22016K)
[0.515s][info][gc,heap] GC(1) ParOldGen: 1843K->5817K(27648K)
[0.515s][info][gc     ] GC(1) Pause Young (Allocation Failure)
                              13M->7M(48M) 5.666ms
   -- Another Young (Minor) GC occurred

3   50855936   42620520   8235416
21   50855936   22985224   27870712
[0.527s][info][gc,heap] GC(2) PSYoungGen: 21908K->1504K(22016K)
[0.527s][info][gc,heap] GC(2) ParOldGen: 5565K->25951K(27648K)
[0.527s][info][gc     ] GC(2) Pause Young (Allocation Failure)
                              26M->26M(48M) 16.139ms
   -- Another Young (Minor) GC occurred

[0.546s][info][gc,heap] GC(3) PSYoungGen: 1504K->0K(25600K)
[0.546s][info][gc,heap] GC(3) ParOldGen: 25951K->25256K(54784K)
[0.546s][info][gc     ] GC(3) Pause Full (Ergonomics)
                              26M->24M(78M) 19.756ms
   -- Followed by a Full (Major) GC


As you can see, the Parallel Collector log message format is identical to the Serial Collector, except that different GC algorithms are used:

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"

 What Is Parallel Collector

Parallel Collector GC Log Message Format

 Log Message Types from Parallel Collector

 "--Xlog:gc+task+time=debug" - Print GC Threads

 "-XX:ParallelGCThreads" - # of Threads

 Parallel Collector Stops Application for Minor/Major GC

 PSYoungGen Collector Using Tenuring Age

 Parallel Collector Changing NewRatio and SurvivorRatio

 Parallel Collector Adaptive Size Policy

 Adaptive Size Policy Log Messages

 "-Xlog:gc+ergo=trace" - Minor GC Report

 Adaptive Size Policy Changed Survivor Space

 Adaptive Size Policy Changed Eden Space

 Adaptive Size Policy for Best Latency

 Parallel Collector Stopped using Young Generation

 Adaptive Size Policy for Best Throughput

 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