JVM Performance Tuning

  1. Garbage Collection Deep Dive
    1. Garbage Collection Fundamentals
      1. The Generational Hypothesis
        1. Short-lived Object Patterns
          1. Long-lived Object Patterns
            1. Generational Collection Benefits
            2. Object Lifecycle
              1. Allocation Patterns
                1. Object Aging
                  1. Promotion Criteria
                  2. Reachability Analysis
                    1. Garbage Collection Roots
                      1. Stack References
                        1. Static Variables
                          1. JNI References
                          2. Reference Types
                            1. Strong References
                              1. Soft References
                                1. Weak References
                                  1. Phantom References
                                2. Stop-the-World Pauses
                                  1. STW Event Causes
                                    1. Application Impact
                                      1. Pause Time Optimization
                                    2. Garbage Collection Algorithms
                                      1. Mark and Sweep
                                        1. Marking Phase
                                          1. Sweeping Phase
                                            1. Fragmentation Issues
                                            2. Copying Collection
                                              1. Copy Algorithm
                                                1. Space Overhead
                                                  1. Compaction Benefits
                                                  2. Mark-Compact
                                                    1. Compaction Process
                                                      1. Memory Defragmentation
                                                        1. Performance Characteristics
                                                        2. Concurrent Collection
                                                          1. Concurrent Marking
                                                            1. Concurrent Sweeping
                                                              1. Application Thread Coordination
                                                            2. Garbage Collectors
                                                              1. Serial GC
                                                                1. Single-threaded Collection
                                                                  1. Use Cases
                                                                    1. Small Applications
                                                                      1. Client Applications
                                                                      2. Performance Characteristics
                                                                        1. Configuration Options
                                                                        2. Parallel GC
                                                                          1. Multi-threaded Collection
                                                                            1. Throughput Optimization
                                                                              1. Parallel GC Tuning
                                                                                1. GC Thread Count
                                                                                  1. Adaptive Sizing Policy
                                                                                    1. GC Time Ratio
                                                                                    2. Parallel Old GC
                                                                                    3. Concurrent Mark Sweep (CMS)
                                                                                      1. Concurrent Collection Phases
                                                                                        1. Initial Mark Phase
                                                                                          1. Concurrent Mark Phase
                                                                                            1. Remark Phase
                                                                                              1. Concurrent Sweep Phase
                                                                                              2. CMS Advantages
                                                                                                1. Low Pause Times
                                                                                                  1. Concurrent Operation
                                                                                                  2. CMS Limitations
                                                                                                    1. Fragmentation Issues
                                                                                                      1. Concurrent Mode Failures
                                                                                                        1. Floating Garbage
                                                                                                        2. CMS Tuning Parameters
                                                                                                          1. CMS Deprecation
                                                                                                          2. Garbage-First (G1) GC
                                                                                                            1. Region-based Heap Layout
                                                                                                              1. Heap Regions
                                                                                                                1. Region Types
                                                                                                                  1. Humongous Objects
                                                                                                                  2. G1 Collection Cycles
                                                                                                                    1. Young Generation Collection
                                                                                                                      1. Mixed Generation Collection
                                                                                                                        1. Full GC (Fallback)
                                                                                                                        2. G1 Concurrent Phases
                                                                                                                          1. Concurrent Marking Cycle
                                                                                                                            1. Cleanup Phase
                                                                                                                            2. G1 Tuning Parameters
                                                                                                                              1. MaxGCPauseMillis
                                                                                                                                1. G1HeapRegionSize
                                                                                                                                  1. InitiatingHeapOccupancyPercent
                                                                                                                                    1. G1MixedGCCountTarget
                                                                                                                                    2. G1 Performance Characteristics
                                                                                                                                    3. Z Garbage Collector (ZGC)
                                                                                                                                      1. Ultra-low Latency Goals
                                                                                                                                        1. Concurrent Operations
                                                                                                                                          1. Concurrent Marking
                                                                                                                                            1. Concurrent Relocation
                                                                                                                                              1. Concurrent Reference Processing
                                                                                                                                              2. Colored Pointers
                                                                                                                                                1. Load Barriers
                                                                                                                                                  1. Pointer Encoding
                                                                                                                                                  2. ZGC Scalability
                                                                                                                                                    1. ZGC Configuration
                                                                                                                                                      1. ZGC Limitations
                                                                                                                                                      2. Shenandoah GC
                                                                                                                                                        1. Low-pause Collection
                                                                                                                                                          1. Concurrent Compaction
                                                                                                                                                            1. Forwarding Pointers
                                                                                                                                                              1. Brooks Pointers
                                                                                                                                                                1. Shenandoah Phases
                                                                                                                                                                  1. Shenandoah Tuning
                                                                                                                                                                  2. Epsilon GC
                                                                                                                                                                    1. No-op Collector
                                                                                                                                                                      1. Performance Testing
                                                                                                                                                                        1. Memory Allocation Only
                                                                                                                                                                      2. GC Performance Analysis
                                                                                                                                                                        1. GC Metrics
                                                                                                                                                                          1. Pause Time Measurements
                                                                                                                                                                            1. Throughput Calculations
                                                                                                                                                                              1. Allocation Rate
                                                                                                                                                                                1. Promotion Rate
                                                                                                                                                                                2. GC Logging
                                                                                                                                                                                  1. Unified JVM Logging
                                                                                                                                                                                    1. Log Tags and Levels
                                                                                                                                                                                      1. Log Output Configuration
                                                                                                                                                                                      2. Legacy GC Logging
                                                                                                                                                                                        1. PrintGC Options
                                                                                                                                                                                          1. GC Log Rotation
                                                                                                                                                                                        2. GC Log Interpretation
                                                                                                                                                                                          1. Pause Duration Analysis
                                                                                                                                                                                            1. Heap Occupancy Patterns
                                                                                                                                                                                              1. GC Cause Analysis
                                                                                                                                                                                                1. Allocation Failure Events
                                                                                                                                                                                                2. GC Analysis Tools
                                                                                                                                                                                                  1. GCViewer
                                                                                                                                                                                                    1. GCEasy
                                                                                                                                                                                                      1. GCPlot
                                                                                                                                                                                                        1. CRaC (Coordinated Restore at Checkpoint)
                                                                                                                                                                                                      2. GC Tuning Strategies
                                                                                                                                                                                                        1. Collector Selection
                                                                                                                                                                                                          1. Workload Characteristics
                                                                                                                                                                                                            1. Performance Requirements
                                                                                                                                                                                                              1. Hardware Considerations
                                                                                                                                                                                                              2. Heap Sizing for GC
                                                                                                                                                                                                                1. Young Generation Sizing
                                                                                                                                                                                                                  1. Old Generation Sizing
                                                                                                                                                                                                                    1. Total Heap Size
                                                                                                                                                                                                                    2. GC Parameter Tuning
                                                                                                                                                                                                                      1. Pause Time Goals
                                                                                                                                                                                                                        1. Throughput Targets
                                                                                                                                                                                                                          1. Memory Efficiency
                                                                                                                                                                                                                          2. GC Monitoring and Alerting
                                                                                                                                                                                                                            1. GC Performance Metrics
                                                                                                                                                                                                                              1. Alerting Thresholds
                                                                                                                                                                                                                                1. Automated Tuning