IHOP's Dynamic Link to Allocation Rate

The optimal -XX:InitiatingHeapOccupancyPercent (IHOP) directly depends on your ML application's object allocation rate; a lower IHOP (e.g., 30-35%) prevents Full GCs in high-allocation scenarios, while default 45% or higher suits low-allocation workloads.

The top 3

  1. Adaptive IHOP: G1GC's Dynamic Threshold for Allocation: Since Java 9, G1GC features 'Adaptive IHOP,' which automatically adjusts the Initiating Heap Occupancy Percent by observing marking cycle durations and old generation allocation rates. This dynamic mechanism aims to optimize when concurrent marking starts, preventing premature or delayed garbage collections.
  2. Tuning IHOP: Manual Control for High Allocation Workloads: For applications with consistently high allocation rates that lead to Full GCs, manual IHOP tuning is crucial. Disabling adaptive behavior with `-XX:-G1UseAdaptiveIHOP` and setting `-XX:InitiatingHeapOccupancyPercent` to a lower value (e.g., 30-35%) can force concurrent marking to start earlier, preventing old generation overflow.
  3. Humongous Objects: IHOP's Unexpected Allocation Triggers: Large 'humongous' objects (over 50% of a region size) are directly allocated to the old generation and can prematurely trigger G1GC's initial mark phase if the IHOP threshold is exceeded. Historically, adaptive IHOP calculations could be skewed by short-lived humongous objects, leading to an erroneously low IHOP and excessive concurrent cycles, a bug resolved in JDK 11.0.13.

Sources

Open the full topic