Log Message Types from Serial Collector

This section describes 4 types of log messages generated from the Serial Collector with the '-XX:+PrintGCDetails'.

If you run your application using the Serial Collector (-XX:+UseSerialGC) with the "-XX:+PrintGCDetails" logging option, you may see the following types of log messages:

1. A pure Young generation GC message (Minor GC) - The message contains one "DefNew" sub-message only. For example:

0.118: [GC (Allocation Failure) 
   0.118: [DefNew: 3517K->245K(4928K), 0.0028658 secs] 
   3517K->3317K(15872K), 0.0030244 secs] 
  

2. A pair of Young generation GC and Tenured generation GC message - The message contains one "DefNew" sub-message and one "Tenured" sub-message. This GC should be called Full GC, because the full heap memory, both Young generation and Tenured generation are cleanup up. For example:

0.130: [GC (Allocation Failure) 
   0.130: [DefNew: 4427K->245K(4928K), 0.0033457 secs]
   0.134: [Tenured: 11264K->11508K(11972K), 0.0010920 secs] 
   11596K->11508K(16900K), 
   [Metaspace: 1560K->1560K(4480K)], 0.0046203 secs] 
  

3. A pure Tenured generation GC message (Major GC) - The message contains one "Tenured" sub-message. Unfortunately, this Major GC is labeled as "Full GC" in the log file. For example:

0.857: [Full GC (Allocation Failure) 
   0.857: [Tenured: 174333K->120060K(174784K), 0.0335095 secs] 
   251495K->120060K(253440K), 
   [Metaspace: 1561K->1561K(4480K)], 0.0336008 secs] 
   [Times: user=0.03 sys=0.00, real=0.03 secs] 

4. A pair of Young generation GC and Tenured generation GC message "promotion failed" - The message contains one "DefNew (promotion failed)" sub-message and one "Tenured" sub-message. This GC should be called Full GC too, because the full heap memory, both Young generation and Tenured generation are cleanup up. For example:

0.398: [GC (Allocation Failure) 
   0.398: [DefNew (promotion failed) : 
      68941K->77138K(78656K), 0.0382889 secs]
   0.436: [Tenured: 174332K->129277K(174784K), 0.0394795 secs] 
      195144K->129277K(253440K), 
   [Metaspace: 1561K->1561K(4480K)], 0.0779003 secs]
   [Times: user=0.06 sys=0.02, real=0.08 secs] 

I don't know the reason why "promotion failed" is included in the log message.

Last update: 2018.

Table of Contents

 About This Book

 Heap Memory Area and Size Control

 JVM Garbage Collection Logging

 Introduction of Garbage Collectors

Serial Collector - "+XX:+UseSerialGC"

 What Is Serial Collector

 GC Log Message Format for Serial Collector

 GC Log Message Examples of Serial Collector

Log Message Types from Serial Collector

 Serial Collector Stops Application for Minor/Major GC

 Usage Report on Heap Memory Areas

 Default NewRatio - Old vs. New Generation

 "-XX:NewRatio" - Ratio of Tenured and "new" Generation

 "-XX:SurvivorRatio" - Ratio of Eden and Survivor Space

 Serial GC Tracing - Tight Heap

 Serial GC Tracing - Plenty of Heap

 Serial GC Tracing - Aged Live Objects

 Serial GC Tracing - Tenuring Threshold

 "-XX:TargetSurvivorRatio" - Second Tenuring Condition

 Serial GC Tracing - Tenuring Threshold Controlled

 "-XX:+NeverTenure" and "-XX:+AlwaysTenure" not Working

 Minor GC Triggering Condition of Serial Collector

 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

 Garbage Collection Performance Test Summary

 Outdated Tutorials

 References

 Full Version in PDF/EPUB