IHOP's Top Priority: Avoiding Costly Full GCs for ML

The primary goal of proactive IHOP tuning for ML workloads is to prevent expensive 'stop-the-world' Full GCs, which can cause application pauses 10-100 times longer than normal young GCs, severely impacting the latency and throughput of real-time machine learning inference and training.

The top 3

  1. Top 3 G1GC Flags to Proactively Prevent Full GCs: Optimize G1GC for ML by tuning `-XX:InitiatingHeapOccupancyPercent` (IHOP) from its default 45% to trigger concurrent marking earlier, increasing `-XX:G1ReservePercent` (default 10%) to provide buffer space against evacuation failures, and setting a realistic `-XX:MaxGCPauseMillis` (default 200ms) to guide G1's adaptive behavior and avoid heap exhaustion.
  2. Top 3 Triggers for G1GC Full GCs in ML Workloads: Even with G1GC, Full GCs can be triggered by evacuation failures (heap too small), concurrent marking not finishing in time (allocation rate too high), and excessive humongous objects leading to fragmentation.
  3. Essential Metrics to Detect Impending G1GC Full GCs: Proactively identify potential Full GCs by monitoring key metrics like overall heap occupancy, old generation usage, humongous object allocation rates, and GC pause times, often visible through GC logs or JMX.

Sources

Open the full topic