FlexHeap: Dynamic I/O-Aware Heap Resizing for Managed Applications
summary
FlexHeap is a G1 heap-resizing implementation in OpenJDK 21 G1 that measures GC lost cycles and per-mutator I/O stalls via eBPF sched_switch to repartition a fixed DRAM budget between heap and OS page cache. It uses GC-phase intervals, history-based cost prediction, and a sigmoid-proportional shrink step that respects Eden targets. On a 32-core 256 GB DRAM server with NVMe, it improves Elasticsearch throughput ~30% and Spark ~33%, and beats Vertical G1 by about 50% vs VG1.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:26DRAM partitioning challenge
- 3:14FlexHeap resizing design
- 8:15GC and IO stall overheads
- 9:19Evaluation setup
- 10:00Elasticsearch results
- 11:26Workload adaptation
- 12:08Spark SQL impact
- 12:51Conclusion
- 13:36Q&A








