Skip to the content.

[Java][JVM Logs][GC Logs][G1GC] Monday with JVM logs - G1GC Stop-the-world phases

GC logs

At the beginning of each GC cycle you can find the name of the collection at info level:

Pause Cleanup
Pause Full (G1 Evacuation Pause)
Pause Full (G1 Humongous Allocation)
Pause Full (Heap Dump Initiated GC)
Pause Full (Heap Inspection Initiated GC)
Pause Full (System.gc())
Pause Remark
Pause Young (Concurrent Start) (G1 Evacuation Pause)
Pause Young (Concurrent Start) (G1 Humongous Allocation)
Pause Young (Concurrent Start) (GCLocker Initiated GC)
Pause Young (Concurrent Start) (Metadata GC Threshold)
Pause Young (Mixed) (G1 Evacuation Pause)
Pause Young (Mixed) (G1 Humongous Allocation)
Pause Young (Mixed) (GCLocker Initiated GC)
Pause Young (Normal) (G1 Evacuation Pause)
Pause Young (Normal) (G1 Humongous Allocation)
Pause Young (Normal) (GCLocker Initiated GC)
Pause Young (Prepare Mixed) (G1 Evacuation Pause)
Pause Young (Prepare Mixed) (G1 Humongous Allocation)
Pause Young (Prepare Mixed) (GCLocker Initiated GC)

Such a collection names I have found in logs I have. Let’s try to understand what they mean. First division is the collection name. We have:

In the last brackets you can see the reason why the G1GC starts the collection:

What do we want to see in the log?

What we want to see in such a log is as many G1 Evacuation Pause caused collections as possible. What we don’t want to see:

Charts

As usual, you can present your GC performance on a chart. We can generate charts with count of each collection type, time of each collection type, count of the reason, …

Here are count charts of the JVM that had a problem with humongous allocation:

alt text

alt text

Most of the collections started with G1 Humongous Allocation reasons.

Example of a pretty healthy application:

alt text

alt text

There are some collections started with G1 Humongous Allocation reasons, but there are not a lot of them.

Another example of a healthy application:

alt text

alt text