JVM Performance Engineering: Inside OpenJDK and the HotSpot Java Virtual Machine

Book description

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

  • Look ahead to the future of Java concurrency with Virtual Threads, and investigate runtime optimizations of string handling and concurrency, propelling Java forward

Register your product for convenient access to downloads, updates, and/or corrections as they become available. See inside for details.

Table of contents

  1. Cover Page
  2. About This eBook
  3. Halftitle Page
  4. Title Page
  5. Copyright Page
  6. Dedication Page
  7. Contents
  8. Preface
  9. Acknowledgments
    1. Editorial Guidance
    2. Chapter Contributions
    3. Mentors, Influencers, and Friends
  10. About the Author
  11. Chapter 1. The Performance Evolution of Java: The Language and the Virtual Machine
    1. A New Ecosystem Is Born
    2. A Few Pages from History
    3. Understanding Java HotSpot VM and Its Compilation Strategies
    4. HotSpot Garbage Collector: Memory Management Unit
    5. The Evolution of the Java Programming Language and Its Ecosystem: A Closer Look
    6. Embracing Evolution for Enhanced Performance
  12. Chapter 2. Performance Implications of Java’s Type System Evolution
    1. Java’s Primitive Types and Literals Prior to J2SE 5.0
    2. Java’s Reference Types Prior to J2SE 5.0
    3. Java’s Type System Evolution from J2SE 5.0 until Java SE 8
    4. Java’s Type System Evolution: Java 9 and Java 10
    5. Java’s Type System Evolution: Java 11 to Java 17
    6. Beyond Java 17: Project Valhalla
    7. Conclusion
  13. Chapter 3. From Monolithic to Modular Java: A Retrospective and Ongoing Evolution
    1. Introduction
    2. Understanding the Java Platform Module System
    3. From Monolithic to Modular: The Evolution of the JDK
    4. Continuing the Evolution: Modular JDK in JDK 11 and Beyond
    5. Implementing Modular Services with JDK 17
    6. JAR Hell Versioning Problem and Jigsaw Layers
    7. Open Services Gateway Initiative
    8. Introduction to Jdeps, Jlink, Jdeprscan, and Jmod
    9. Conclusion
  14. Chapter 4. The Unified Java Virtual Machine Logging Interface
    1. The Need for Unified Logging
    2. Unification and Infrastructure
    3. Tags in the Unified Logging System
    4. Diving into Levels, Outputs, and Decorators
    5. Practical Examples of Using the Unified Logging System
    6. Optimizing and Managing the Unified Logging System
    7. Asynchronous Logging and the Unified Logging System
    8. Understanding the Enhancements in JDK 11 and JDK 17
    9. Conclusion
  15. Chapter 5. End-to-End Java Performance Optimization: Engineering Techniques and Micro-benchmarking with JMH
    1. Introduction
    2. Performance Engineering: A Central Pillar of Software Engineering
    3. Metrics for Measuring Java Performance
    4. The Role of Hardware in Performance
    5. Performance Engineering Methodology: A Dynamic and Detailed Approach
    6. The Importance of Performance Benchmarking
    7. Conclusion
  16. Chapter 6. Advanced Memory Management and Garbage Collection in OpenJDK
    1. Introduction
    2. Overview of Garbage Collection in Java
    3. Thread-Local Allocation Buffers and Promotion-Local Allocation Buffers
    4. Optimizing Memory Access with NUMA-Aware Garbage Collection
    5. Exploring Garbage Collection Improvements
    6. Future Trends in Garbage Collection
    7. Practical Tips for Evaluating GC Performance
    8. Evaluating GC Performance in Various Workloads
    9. Live Data Set Pressure
  17. Chapter 7. Runtime Performance Optimizations: A Focus on Strings, Locks, and Beyond
    1. Introduction
    2. String Optimizations
    3. Enhanced Multithreading Performance: Java Thread Synchronization
    4. Transitioning from the Thread-per-Task Model to More Scalable Models
    5. Conclusion
  18. Chapter 8. Accelerating Time to Steady State with OpenJDK HotSpot VM
    1. Introduction
    2. JVM Start-up and Warm-up Optimization Techniques
    3. Decoding Time to Steady State in Java Applications
    4. Managing State at Start-up and Ramp-up
    5. GraalVM: Revolutionizing Java’s Time to Steady State
    6. Emerging Technologies: CRIU and Project CRaC for Checkpoint/Restore Functionality
    7. Start-up and Ramp-up Optimization in Serverless and Other Environments
    8. Boosting Warm-up Performance with OpenJDK HotSpot VM
    9. Conclusion
  19. Chapter 9. Harnessing Exotic Hardware: The Future of JVM Performance Engineering
    1. Introduction to Exotic Hardware and the JVM
    2. Exotic Hardware in the Cloud
    3. The Role of Language Design and Toolchains
    4. Case Studies
    5. Envisioning the Future of JVM and Project Panama
    6. Concluding Thoughts: The Future of JVM Performance Engineering
  20. Index
  21. Code Snippets

Product information

  • Title: JVM Performance Engineering: Inside OpenJDK and the HotSpot Java Virtual Machine
  • Author(s): Monica Beckwith
  • Release date: April 2024
  • Publisher(s): Addison-Wesley Professional
  • ISBN: 9780134659954