Concurrent Mark-Sweep Collector GC Log Message Format

This section describes the log message format of HotSpot JVM Concurrent Mark-Sweep (CMS) Collector.

Before doing any testing with the Concurrent Mark-Sweep (CMS) Collector, let's look at log messages generated by the Concurrent Mark-Sweep Collector first:

C:\herong>java -Xms2m -Xmx64m -XX:+UseConcMarkSweepGC
   -Xlog:gc,gc+heap=info GarbageCollection
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was
deprecated in version 9.0 and will likely be removed in a future release.

[info][gc] Using Concurrent Mark Sweep

[info][gc,heap] GC(0) ParNew: 987K->128K(1152K)
[info][gc,heap] GC(0) CMS: 0K->737K(1344K)

[info][gc] GC(0) Pause Young (Allocation Failure) 0M->0M(2M) 4.756ms

[info][gc] GC(1) Pause Initial Mark 1M->1M(2M) 0.442ms
[info][gc] GC(1) Concurrent Mark
[info][gc] GC(1) Concurrent Mark 1.446ms
[info][gc] GC(1) Concurrent Preclean
[info][gc] GC(1) Concurrent Preclean 0.039ms
[info][gc] GC(1) Pause Remark 1M->1M(2M) 0.799ms
[info][gc] GC(1) Concurrent Sweep
[info][gc] GC(1) Concurrent Sweep 0.159ms
[info][gc] GC(1) Concurrent Reset
[info][gc] GC(1) Concurrent Reset 0.244ms
[info][gc,heap] GC(1) Old: 737K->737K(1344K)

[info][gc,heap] GC(2) ParNew: 1152K->126K(1152K)
[info][gc,heap] GC(2) CMS: 737K->1658K(2056K)
[info][gc] GC(2) Pause Young (Allocation Failure) 1M->1M(3M) 1.440ms

[info][gc] GC(3) Pause Initial Mark 1M->1M(3M) 0.192ms
[info][gc] GC(3) Concurrent Mark
[info][gc] GC(3) Concurrent Mark 0.979ms
[info][gc] GC(3) Concurrent Preclean
[info][gc] GC(3) Concurrent Preclean 0.027ms
[info][gc] GC(3) Pause Remark 1M->1M(3M) 0.580ms
[info][gc] GC(3) Concurrent Sweep
[info][gc] GC(3) Concurrent Sweep 0.319ms
[info][gc] GC(3) Concurrent Reset
[info][gc] GC(3) Concurrent Reset 0.038ms
[info][gc,heap] GC(3) Old: 1658K->1656K(2764K)

1   2555904   826608   1729296

With the help from this blog: Understanding CMS GC Logs, by Poonam Bajaj, here is how I read those extra log messages generated by the Concurrent Mark-Sweep (CMS) Collector:

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"

 What Is Concurrent Mark-Sweep (CMS) Collector

Concurrent Mark-Sweep Collector GC Log Message Format

 Reduce Stop-The-World with Concurrent Mark and Sweep

 Parallel New (ParNew) Collector for Minor GC

 ParNew Collector - Tenuring Age Distribution

 Maximium Logging of All Phases on Young GC

 "-XX:ParallelGCThreads=6" - Young GC Parallel Threads

 "-XX:MaxTenuringThreshold=0" - Tenuring Objects Immediately

 "-XX:CMSInitiatingOccupancyFraction=20" - Initiate CMS

 Maximium Logging of All Phases on Old GC

 Maximium Logging of All Phases on Full GC

 "-XX:ParallelGCThreads=6" - Old GC Parallel Threads

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

 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