Lune

PLDI2026顶会

FlexHeap: Dynamic I/O-Aware Heap Resizing for Managed Applications

Iacovos G. Kolokasis, Shoaib Akram, Foivos S. Zakkak, Polyvios Pratikakis, Angelos Bilas

摘要

Popular JVM-based search and analytics systems, such as Elasticsearch and Spark, rely on the OS page cache (I/O cache) to accelerate storage access. However, dividing memory between the JVM heap and the I/O cache creates a trade-off: enlarging the heap reduces garbage collection (GC) overhead but starves the I/O cache, while shrinking it improves I/O performance but raises GC cost. Existing heap resizing mechanisms ignore I/O and thus fail to address this trade-off, resulting in inefficient memory utilization and degraded performance. In this paper, we propose FlexHeap, a heap resizing mechanism for Garbage First (G1), the default OpenJDK garbage collector, that dynamically partitions a fixed DRAM budget between the JVM heap and the I/O cache. Between GC intervals, it estimates the CPU time lost to GC and to I/O stalls and repartitions DRAM to reduce their combined cost. FlexHeap relies on three concepts: (1) It makes resizing decisions using G1 collection boundaries. (2) It uses a history-based approach to estimate the cost of GC and I/O stalls for the future intervals. (3) It uses an adaptive resizing step that scales with changes in the combined cost. We implement FlexHeap in OpenJDK 21’s G1 garbage collector and evaluate it on two widely used systems: the Elasticsearch search engine and the Spark analytic framework. Compared to the G1 heap resizing mechanism, FlexHeap improves performance by an average of 30 % in Elasticsearch and by an average of 33 % in Spark. It outperforms Vertical G1, a state-of-the-art enhancement to the default G1 heap resizing mechanism, that returns unused memory to the OS eagerly, by 50 % on average in throughput, demonstrating that JVM heap resizing needs to consider I/O overhead in search and analytics applications.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper9

  1. Borg: the next generationMuhammad Tirmazi, Adam Barker, Nan Deng, Md E. Haque 等EuroSys 2020 · 323 次引用
  2. TMO: transparent memory offloading in datacentersJohannes Weiner, Niket Agarwal, Dan Schatzberg, Leon Yang 等ASPLOS 2022 · 103 次引用
  3. Optimizing Memory-mapped I/O for Fast Storage DevicesAnastasios Papagiannis, Giorgos Xanthakis, Giorgos Saloustros, Manolis Marazakis 等USENIX ATC 2020 · 68 次引用
  4. DAOS: Data Access-aware Operating SystemSeongjae Park, Madhuparna Bhowmik, Alexandru UtaHPDC 2022 · 19 次引用
  5. Memory-mapped I/O on steroidsAnastasios Papagiannis, Manolis Marazakis, Angelos BilasEuroSys 2021 · 19 次引用

相关 Paper

  1. JPDHeap: A JVM Heap Design for PM-DRAM MemoriesLitong You, Tianxiao Gu, Shengan Zheng, Jianmei Guo 等DAC 2021 · 2 次引用
  2. TeraHeap: Reducing Memory Pressure in Managed Big Data FrameworksIacovos G. Kolokasis, Giannos Evdorou, Shoaib Akram, Christos Kozanitis 等ASPLOS 2023 · 15 次引用
  3. Bridging the performance gap for copy-based garbage collectors atop non-volatile memoryYanfei Yang, Mingyu Wu, Haibo Chen, Binyu ZangEuroSys 2021 · 9 次引用
  4. Uncovering Hidden Memory Costs for Garbage CollectionSudhanshu Agarwal, Saugata GhoseOOPSLA 2026
  5. Low-latency, high-throughput garbage collectionWenyu Zhao, Stephen M. Blackburn, Kathryn S. McKinleyPLDI 2022 · 24 次引用
黄昏的海面,两侧是细线勾勒的悬崖