Aisle between two rows of black server racks with small status lights in a supercomputing centre

Field guides for JVM operators

When production stops, the JVM already knows why.

Heap dumps, thread dumps, GC logs, Native Memory Tracking, Flight Recorder: the evidence is built into the JDK. The Safepoint explains how to collect it, how to read it and which flags actually change the outcome, with every option checked against the official documentation.

Photo: Derrick Coetzee, Wikimedia Commons, CC0

Start from the symptom

Paste-able error messages, mapped to the guide that explains them

Several laptop memory modules with black chips and gold contacts lying on a light surface In focus · Memory

OutOfMemoryError: Direct buffer memory, and what MaxDirectMemorySize really defaults to

The heap looks healthy, the process dies anyway. How NIO direct buffers are limited, why the default follows -Xmx, why -XX:+DisableExplicitGC makes things worse, and how to find who holds the buffers.

Read the guide
01 / memory

Memory

Heap, direct buffers, Metaspace, code cache and native memory: where a JVM's footprint goes and how to find a leak.

All memory guides
02 / gc

Garbage collection

Choosing a collector, tuning G1 and reading the unified GC log without guesswork.

All GC guides
03 / threads

Threads & CPU

Thread dumps, runaway CPU, locks and virtual threads.

All thread guides
04 / ops

Production

Running the JVM in containers, sizing the services around AI models and recording what the JVM does with Flight Recorder.

All production guides

How these guides are written

Each guide starts from a symptom seen in production and ends with commands you can run. Option names, defaults and behaviours are taken from primary sources: the java, jcmd and jfr reference pages, the HotSpot tuning and troubleshooting guides, JDK Enhancement Proposals and the OpenJDK source. Each guide lists them at the end.

Defaults change between JDK releases. Where a behaviour depends on the version, the guide says which release introduced or changed it. When in doubt, ask the JVM itself: java -XX:+PrintFlagsFinal -version prints every option with its effective value. More on the method on the about page; the full list is on all articles.