All articles
Sixteen guides, grouped by topic. Each one lists the official documentation it is based on.
Memory
- OutOfMemoryError: Direct buffer memory and MaxDirectMemorySize
The off-heap NIO buffer limit, its default, and how to measure and fix direct memory use.
- The JIT code cache: ReservedCodeCacheSize and "CodeCache is full"
Default sizes, the segmented code cache, monitoring and when to raise the limit.
- GC roots and Java memory leaks
What keeps objects alive, the usual accidental references, and tracing a leak to its root.
- Taking and reading a Java heap dump
jcmd, jmap, HeapDumpOnOutOfMemoryError and Eclipse Memory Analyzer.
- Metaspace explained
Class metadata, MaxMetaspaceSize, the compressed class space and class loader leaks.
- The AI memory squeeze: DRAM prices, cloud costs and what it changes for JVM teams
Sourced memory price figures, the cost of a gigabyte in the cloud, and how to need fewer of them.
- Native Memory Tracking
Why the JVM uses more than -Xmx, baselines and diffs, and what NMT cannot see.
Garbage collection
- Choosing a HotSpot garbage collector
Serial, Parallel, G1, ZGC and Shenandoah, and what the JVM picks by default.
- Tuning G1 in production
Heap size, pause target, IHOP, humongous objects and the flags to leave alone.
- Reading GC logs with -Xlog:gc
Unified logging setup, legacy flag mapping and the patterns that matter.
Threads & CPU
- Reading Java thread dumps
jcmd Thread.print and jstack, thread states, lock lines and deadlocks.
- High CPU in a Java process: finding the thread
top -H, the nid in thread dumps, and profiling with Flight Recorder.
- Virtual threads in production
JEP 444, pinning before and after JDK 24, and what to monitor.
Production
- The JVM in containers
UseContainerSupport, MaxRAMPercentage and a memory budget that avoids the OOM killer.
- Keeping AI products affordable
Batching, quantisation and caching, and sizing the Java services around a model.
- Java Flight Recorder and JDK Mission Control
Continuous recordings, on-demand dumps and reading .jfr files.