⚙️

JVM Performance Engineering

Bytecode, the JIT, garbage collection, and the monitoring tools that turn a vague "it feels slow" into a measured, fixed root cause -- built around a production incident, not a list of JVM flags.

Practice interview questions on this topic →
1

JVM Performance Fundamentals

beginner

Why Java application performance is a separate discipline from code correctness, how the JVM actually runs your bytecode through an interpreter and two just-in-time compilers, and why understanding the platform underneath your code is not the same thing as premature optimization.

2

JVM Configuration and Startup

intermediate

How to actually configure a JVM for a real service: sizing the heap with -Xms and -Xmx, choosing a garbage collector, the startup flags that come up constantly in practice, and how all of this affects a Spring Boot application's time-to-first-request.

3

JVM Memory Architecture

intermediatePro

A deep, precise model of where data actually lives inside a running JVM: the stack versus the heap, what really happens when you pass an object to a method, why final doesn't make an object immutable, how handing out a raw reference becomes a correctness bug, and the two specialized memory regions -- Metaspace and the String pool -- that sit outside the stack/heap picture entirely.

4

Garbage Collection Fundamentals

advancedPro

What 'Java is a managed language' actually means mechanically: how the JVM proves an object is truly unreachable, why the heap is split into generations built around the observation that most objects die young, and a tour of the major collectors -- Serial, Parallel, G1, ZGC and Shenandoah -- and the specific problem each one exists to solve.

5

Garbage Collection Tuning

advancedPro

Moving from knowing what the collectors do to actually tuning one for a real workload: the G1 flags that matter in practice, when a pause-time goal justifies reaching for ZGC instead, how to read a GC log without guessing, and a worked scenario that diagnoses a GC problem from its symptoms rather than from theory alone.

6

Heap Monitoring and JFR

advancedPro

Moving from GC theory to actually looking at a running JVM: live heap monitoring with VisualVM and jcmd, capturing and reading a heap dump to find a leak, Java Flight Recorder (JFR) fundamentals, and a Spring Boot production incident worked end-to-end with these tools.

7

JMH Benchmarking and Collections Performance

advancedPro

Why naive timing with System.currentTimeMillis() lies to you about real Java performance, how JMH (Java Microbenchmark Harness) measures correctly despite JIT warmup and dead code elimination, and what properly measured benchmarks actually reveal about ArrayList vs LinkedList and HashMap vs TreeMap -- the measurement half of a question the Collections category's 'Choosing the Right Collection' topic already answers from the choosing side.

8

GraalVM and Modern JVM Choices

advancedPro

A practical look at ahead-of-time compilation with GraalVM native-image versus the standard JIT, the startup-time and memory tradeoffs that decide which one a team should actually ship, and a short survey of other modern JVM options (checkpoint-restore, alternative JVM implementations) worth knowing about even if you never reach for them.

9

Coding Choices That Move the Needle

advancedPro

Everyday coding patterns that genuinely matter to JVM performance at scale: avoiding needless allocation in hot paths, StringBuilder versus concatenation in loops, primitive arrays versus boxed collections, and escape analysis — the JIT mechanism that sometimes lets an object skip the heap entirely — tied together with a worked before/after optimization of a realistic hot-path method.

10

Production Postmortem: Diagnosing a Degrading Service

advancedPro

A capstone incident narrative that ties the whole JVM Performance category together: a service that looked perfectly healthy in staging starts degrading under real production load, and the fix comes from working through heap dumps, GC logs, and JFR recordings in exactly the order a real on-call engineer would reach for them.

11

JVM Performance Interview Deep Dive

advancedPro

A capstone topic tying the JVM Performance category together through the lens of the questions that actually get asked in interviews: why an app feels slow for its first few seconds, how to investigate a production memory leak, the real difference between a minor and a major GC, what -Xmx actually controls, and when a senior engineer would genuinely reach for G1 over ZGC.