You are previewing Optimizing Java.
O'Reilly logo
Optimizing Java

Book Description

Currently, no books exist that focus on the practicalities of Java application performance tuning, as opposed to the theory and internals of Java virtual machines. This practical guide is the "missing link" that aims to move Java performance tuning from the realm of guesswork and folklore to an experimental science.

Table of Contents

  1. Preface
  2. 1. Optimization and Performance Defined
    1. Java Performance - The Wrong Way
    2. Performance as an Experimental Science
    3. A Taxonomy for Performance
      1. Throughput
      2. Latency
      3. Capacity
      4. Utilisation
      5. Efficiency
      6. Scalability
      7. Degradation
      8. Connections between the observables
    4. Reading performance graphs
  3. 2. Overview of the JVM
    1. Overview
    2. Code Compilation and Bytecode
    3. Interpreting and Classloading
    4. Introducing HotSpot
    5. JVM Memory Management
    6. Threading and the Java Memory Model
    7. The JVM and the operating system
  4. 3. Hardware & Operating Systems
    1. Introduction to Modern Hardware
    2. Memory
      1. Memory Caches
    3. Modern Processor Features
      1. Translation Lookaside Buffer
      2. Branch Prediction and Speculative Execution
      3. Hardware Memory Models
    4. Operating systems
      1. The Scheduler
      2. A Question of Time
      3. Context Switches
    5. A simple system model
    6. Basic Detection Strategies
    7. Context switching
    8. Garbage Collection
    9. I/O
      1. Kernel Bypass I/O
      2. Mechanical Sympathy
    10. Virtualisation
  5. 4. Performance Testing Patterns and Antipatterns
    1. Types of Performance Test
      1. Latency Test
      2. Throughput Test
      3. Load Test
      4. Stress Test
      5. Endurance Test
      6. Capacity Planning Test
      7. Degradation Test
    2. Best Practices Primer
      1. Top-Down Performance
      2. Creating a test environment
      3. Identifying performance requirements
      4. Java-specific issues
      5. Performance testing as part of the SDLC
    3. Performance Antipatterns
      1. Boredom
      2. Resume Padding
      3. Peer Pressure
      4. Lack of Understanding
      5. Misunderstood / Non-Existent Problem
      6. Distracted By Simple
      7. Description
      8. Example Comments
      9. Reality
      10. Discussion
      11. Resolutions
      12. Distracted By Shiny
      13. Description
      14. Example Comment
      15. Reality
      16. Discussion
      17. Resolutions
      18. Performance Tuning Wizard
      19. Description
      20. Example Comment
      21. Reality
      22. Discussion
      23. Resolutions
      24. Tuning By Folklore
      25. Description
      26. Example Comment
      27. Reality
      28. Discussion
      29. Resolutions
      30. Blame Donkey
      31. Description
      32. Example Comment
      33. Reality
      34. Discussion
      35. Resolutions
      36. Missing the Bigger Picture
      37. Description
      38. Example Comments
      39. Reality
      40. Discussion
      41. Resolutions
      42. UAT Is My Desktop
      43. Description
      44. Example Comment
      45. Reality
      46. Discussion
      47. Resolutions
      48. PROD-like Data Is Hard
      49. Description
      50. Example Comment
      51. Reality
      52. Discussion
      53. Resolutions
    4. Cognitive Biases and Performance Testing
      1. Reductionist Thinking
      2. Confirmation Bias
      3. Fog of war (Action Bias)
      4. Risk bias
      5. Ellsberg’s Paradox
  6. 5. Microbenchmarking and statistics
    1. Introduction to measuring Java performance
    2. Introduction to JMH
      1. Don’t microbenchmark if you can help it - a true story
      2. Heuristics for when to microbenchmark
      3. The JMH Framework
      4. Executing Benchmarks
    3. Statistics for JVM performance
      1. Types of Error
      2. Non-normal statistics
      3. Interpretation of statistics
    4. Summary