JVM Performance

This module dives deep into the internal mechanics of the Java Virtual Machine (JVM) to help you write high-performance applications. You will move beyond basic tuning flags and understand how the JVM actually executes and manages your code.

We cover the latest garbage collection algorithms (ZGC, Shenandoah) designed for sub-millisecond pauses, dissect the Just-In-Time (JIT) compilation process to understand how your code is optimized at runtime, and master profiling tools like Java Flight Recorder and Async Profiler to diagnose bottlenecks in production.

1. Module Contents

  1. JVM Architecture
    • Understand the Classloader subsystem and the delegation model.
    • Visualize Memory Areas: Stack (Thread-Local) vs Heap (Shared).
    • Learn the role of the Execution Engine.
  2. Garbage Collection
    • Master the Generational Hypothesis.
    • Compare G1, ZGC, and Shenandoah collectors.
    • Understand Stop-The-World events and how to minimize them.
  3. JIT Compilation
    • Deep dive into Tiered Compilation (C1 vs C2).
    • Visualize Inlining, Escape Analysis, and Dead Code Elimination.
    • Understand Deoptimization and JIT warm-up.
  4. Profiling Tools
    • Master Java Flight Recorder (JFR) for low-overhead production profiling.
    • Use Async Profiler to identify safe-point bias and native code bottlenecks.
    • Analyze Flame Graphs to pinpoint CPU and allocation hotspots.
  5. Module Review
    • Key takeaways, interactive flashcards, and a cheat sheet for JVM performance tuning.