Part VIII — JVM Internals and Performance

Unlock JVM performance through deep understanding of garbage collection, compilation strategies, and modern profiling tools.

What You'll Learn

Tune the JVM intelligently, not blindly. Understand modern garbage collection algorithms and their trade-offs, leverage Just-In-Time compilation and profiling, reduce startup time with Class Data Sharing, and use Java Flight Recorder for production-grade observability.

Chapters in This Part

Chapter 26. Garbage Collectors

Explore modern GC algorithms: G1GC, ZGC, and Shenandoah. Understand generational collection, pause time objectives, memory region strategies, and how to choose and tune collectors for your workload without creating GC chaos.

Chapter 27. JIT and Compilation

Learn how the tiered compilation strategy balances startup time and peak performance. Understand compiler optimization techniques, inlining decisions, and how to interpret JIT compilation logs to diagnose performance issues.

Chapter 28. Class Data Sharing

Reduce startup time and memory footprint with Class Data Sharing (CDS). Learn how to generate CDS archives, configure runtime behavior, and integrate CDS into deployment pipelines for faster application startup.

Chapter 29. Java Flight Recorder

Master Java Flight Recorder (JFR)—a lightweight, high-fidelity profiling tool built into the JVM. Learn event recording, continuous monitoring, and post-mortem analysis techniques that reveal performance issues without visible overhead.