Common GC problems
Problems that show in garbage collection logs, with what they mean, how they appear in a log and what to look at next.
Java
Pause / Stop-the-world
A period during which every application thread is halted so that the collector can work on a heap that does not change under its feet.
Full GC
A stop-the-world collection of the entire heap: mark, then compact. The slowest collection; in a healthy application it is rare or absent.
Humongous object (G1)
In G1, an object whose size is at least half a region. It is allocated directly in contiguous old regions and bypasses the young generation.
Evacuation failure / to-space exhausted (G1)
G1 could not copy a live object because no free region was left to receive it. The log shows to-space exhausted.
Concurrent mode failure (CMS)
CMS only. The old generation filled up before the concurrent cycle finished, so the JVM stopped the application and ran a full compacting collection.
GC overhead limit exceeded
An OutOfMemoryError raised when the JVM spends nearly all its time in GC and recovers almost nothing.
Explicit GC (System.gc())
A collection requested by code or by a tool instead of by the collector itself, with the cause System.gc() or Diagnostic Command.
Metaspace
Native memory, outside the Java heap, holding the metadata of loaded classes: structures, methods and constant pools. It replaced the permanent generation in JDK 8.
Go
Mark assist
Marking work done by an allocating goroutine itself, when the program allocates faster than the background workers can mark.
GC CPU limiter
A safeguard added in Go 1.19 that caps the CPU time the collector can take, around 50 percent, when the memory limit is reached.
.NET
Large object heap (LOH)
A separate area for objects of 85,000 bytes or more. It is collected only together with generation 2.
GC suspension
Before most collections the runtime must suspend all managed threads. The time this takes is the suspension time.