The JVM hub · Java · Kotlin

Articles on the JVM

Profiling, memory and garbage collection, runtime and production, Java and Kotlin architecture. Written from real problems seen in production.

All articles

Reading GC logs without external tools A gc.log file can be read by hand. Once you can decode the summary line and the region-by-region breakdown, you can spot a problem before opening any profiler. Memory and garbage collector Virtual threads in production: what actually breaks Since JDK 24, synchronized no longer pins the carrier thread. Most articles online still tell you to avoid it. What actually breaks in production is somewhere else. Runtime and production Tuning the JVM in a container An app that runs fine locally but gets killed on Kubernetes is almost always a story of misread cgroup limits and a badly sized heap. What to tune, and why. Runtime and production Diagnosing a memory leak with a heap dump When memory climbs and never comes back down, the heap dump holds every object in the heap. The job is to find which one keeps all the memory, and why the GC can't free it. Memory and garbage collector Reading a thread dump with jstack The JDK tool that photographs the state of every thread in a live JVM. Enough to see in seconds who is stuck, on what, and why. Profiling and performance Tuning the JVM garbage collector GC tuning starts with deciding what you optimise and reading the logs, not with copying flags from a forum. A tour of the levers that actually matter. Memory and garbage collector Observability with Micronaut: metrics, traces, and the context-propagation trap Wiring Micrometer, OpenTelemetry and structured logs into Micronaut, plus the one thing that quietly breaks everything: losing the propagated context when you hand work to another thread. Runtime and production Hexagonal architecture and how to implement it in Spring Boot Ports & adapters, concretely: a domain with no Spring annotations, ports as interfaces, and Spring demoted to an adapter. With the package layout. Architecture and design How to read a flamegraph Width = time, height = stack depth, and above all: the horizontal axis is not time. The reading grid in a few minutes. Profiling and performance Profiling the JVM with async-profiler A sampling profiler that doesn't lie about safepoints, runs in production with minimal overhead, and outputs a flamegraph directly. Profiling and performance

Why this site

Information about the JVM is scattered: a blog post, a Stack Overflow answer, a GC flag in old documentation. This site puts it in one place.

Each article starts from a specific problem: latency going up, a memory leak, a flamegraph that is hard to read. It explains what to look at, with which tools, and how to read the result.