Peek Under the Hood of the Complex but Fascinating Java Virtual Machine
Dive into the intricacies of JVM performance with JVM Performance Engineering, the essential guide for seasoned Java developers eager to demystify the JVM. Focusing on the OpenJDK HotSpot VM, this book provides insights into cutting-edge Java performance techniques and trends.
Distinguished Java Champion Monica Beckwith blends theoretical insights and practical tools--encompassing case studies, applications, use-case diagrams, and process flow charts--to demonstrate diagnostic techniques, performance methodologies, and optimizations.
This manual is a portal to excelling in Java performance engineering, offering Java developers, system architects, and software engineers the tools to foster career advancement and success with Java applications.
Examine the evolving Java type system, from lambda expressions to the advent of records and sealed classes, and explore how Project Valhalla aims to further optimize performance
Leverage the Unified JVM Logging Interface for enhanced diagnostics, monitoring, and performance testing, featuring the novel asynchronous logging mechanism
Grasp the intricate relationship between JVM and hardware, mastering end-to-end Java performance optimization techniques
Gain deep insights into JVM's garbage collection and memory management, examining the pivotal Garbage First and Z GCs--and how they are shaping the Java performance landscape
Explore efficient deployment strategies and techniques to accelerate JVM readiness, leveraging class data sharing, ahead-of-time compilation, and innovations like GraalVM and upcoming Project Leyden
Embark on an exploration of the synergy between the JVM and exotic hardware like GPUs and FPGAs and revel in the potential of Project Panama and TornadoVM in high-computational scenarios such as machine learning and data analytics
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
【One-Line Pitch】
A working engineer's tour of how the OpenJDK HotSpot VM actually behaves — from JIT tiering and GC choices to startup, virtual threads, and GPU/FPGA experiments — for Java developers who already ship code and now need to explain and fix its runtime behavior.
【Book Arc】
- **Opening (~0%–10%)**: Frames the book's scope and the author's vantage point (AMD, Sun, Microsoft), then sets up the JVM's dual identity — language evolution and execution engine — as the lens for everything that follows.
- **Early (~10%–35%)**: Builds the runtime foundation: interpreter vs. JIT, `-XX:+PrintCompilation` output, tiered compilation T0–T4, inline caches and monomorphic→megamorphic call sites, deoptimization, and generational GC vocabulary. Also walks Java's version history (1.1 through 17) as a performance story rather than a feature list.
- **Middle (~35%–55%)**: Turns to the type system as a performance surface — generics, lambdas, sealed and hidden classes, records, and how Project Valhalla aims to change memory layout. Excerpts here thin out, so treat this stage as conceptual framing.
- **Late (~55%–80%)**: Moves into operational territory: GC selection (G1, ZGC), memory management trade-offs, the Unified JVM Logging interface with asynchronous logging, and the shift from thread-per-task to virtual threads for scalability.
- **Ending (~80%–100%)**: Closes on time-to-steady-state — startup phases, class data sharing, AOT, GraalVM, Project Leyden — then exotic hardware: LWJGL, Aparapi, Project Sumatra, TornadoVM, and Project Panama's Vector and Foreign Function & Memory APIs.
【Key Takeaways】
- **Compilation is a ladder, not a switch** (Early): T0 interpretation through T4 server compilation, with profiling collected at client tiers — this is why warm-up behavior differs so much from steady state.
- **Call-site shape drives dispatch cost** (Early): Monomorphic, bimorphic, and megamorphic sites are handled differently, and adding a new subtype can force deoptimization — a concrete reason to watch type profiles in hot paths.
- **Language features are performance decisions** (Middle): Records, sealed and hidden classes, and eventually Valhalla's value types change object layout and hierarchy control, not just syntax.
- **GC choice is a latency/throughput trade, not a default** (Late): G1 and ZGC are presented as different answers to pause-time and reclamation problems; string deduplication is one example of a targeted heap-size reduction.
- **Logging is a first-class diagnostic surface** (Late): The Unified JVM Logging interface, including asynchronous logging, is positioned as the practical entry point for monitoring and performance testing.
- **Startup and steady state are separate problems** (Ending): Class data sharing, AOT, GraalVM, and Leyden target time-to-readiness, which is distinct from peak throughput tuning.
- **Virtual threads change the concurrency model** (Late): The progression from one-to-one thread mapping to thread-per-request to virtual threads reframes scalability limits for request-heavy services.
- **Off-heap hardware is arriving** (Ending): Panama's Vector API and Foreign Function & Memory API, plus TornadoVM and HAT/Babylon on the horizon, signal where JVM performance work is heading.
【Reading Tips】
- Deep-read the early compilation and GC chapters — they are the vocabulary the rest of the book assumes; skim the Java version history if you lived through it.
- Keep a JVM running alongside the `-XX:+PrintCompilation` and logging material; the book's value compounds when you match log lines to your own workload.
- Treat the type-system middle as conceptual: excerpts are thin there, so follow the Valhalla thread rather than expecting implementation detail.
- Read the startup and exotic-hardware chapters as a roadmap of where to invest next, not as recipes you can apply immediately.
- Note the author's hardware background (NUMA, SPARC, Arm ports) — it explains why hardware/JVM interaction gets more weight than pure API tuning.
【Coverage Limits】
Excerpts concentrate on the preface, table of contents, and early chapters; the middle type-system and later GC/logging/virtual-thread chapters are represented mainly by headings and fragments, so specific tuning parameters and case-study results are not covered here.
Excerpt 1
olving strategies for optimizing Java applications, making this chapter an invaluable resource for developers looking to navigate today’s cloud native enviro...
cache (a structure to track the call site’s type profile). Next, we change the call site to a bimorphic call site by randomly assigning an AdultLicense or Te...
etter option for you. This technology is ideal for complex applications that require both flexibility and scalability. However, it can be more difficult to l...
, security, and stability. Such improvements contribute to the effectiveness of unified logging, as a more stable and secure system is always beneficial for...
ck on Object 1 are depicted in a clear, sequential manner. Concurrently, Thread 1 enters a waiting state, demonstrating its dependency on the lock held by Th...
order, preventing potential data inconsistencies or errors. Performance Engineering Methodology: A Dynamic and Detailed Approach 147 for the G1 GC’s mixed co...
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Add Tag
Enter tag name (max 50 characters)
Share E-Book
JVM Performance Engineering Inside OpenJDK and the HotSpot Java Virtual Machine (Monica Beckwith)(Z-Library) (1)
Scan QR code with your phone to access
Copy the link or scan the QR code to access this e-book on your phone
Share to WeChat Moments
JVM Performance Engineering Inside OpenJDK and the HotSpot Java Virtual Machine (Monica Beckwith)(Z-Library) (1)
Scan the QR code with WeChat to open this book
Tap the ··· menu in the top-right corner
Choose Share to Moments
You are already in WeChat. Tap ··· in the top-right corner and choose Share to Moments.
Share E-Book via Email
Please enter email address
Donation Statistics
¥.00
Total Donations
0
Donation Count
JVM Performance Engineering Inside OpenJDK and the HotSpot Java Virtual Machine (Monica Beckwith)(Z-Library) (1)
Find Your Favorite Books
Only registered users can comment after logging in. Comments need to be reviewed by administrators before being displayed
Loading comments...
Reply to Comment
Edit Comment