TeraHeap: Reducing Memory Pressure in Managed Big Data Frameworks
Iacovos G. Kolokasis, Giannos Evdorou, Shoaib Akram, Christos Kozanitis, Anastasios Papagiannis, Foivos S. Zakkak, Polyvios Pratikakis, Angelos Bilas
Abstract
Big data analytics frameworks, such as Spark and Giraph, need to process and cache massive amounts of data that do not always fit on the managed heap. Therefore, frameworks temporarily move long-lived objects outside the managed heap (off-heap) on a fast storage device. However, this practice results in (1) high serialization/deserialization (S/D) cost and (2) high memory pressure when off-heap objects are moved back to the heap for processing.
In this paper, we propose TeraHeap, a system that eliminates S/D overhead and expensive GC scans for a large portion of the objects in big data frameworks. TeraHeap relies on three concepts. (1) It eliminates S/D cost by extending the managed runtime (JVM) to use a second high-capacity heap (H2) over a fast storage device. (2) It offers a simple hint-based interface, allowing big data analytics frameworks to leverage knowledge about objects to populate H2. (3) It reduces GC cost by fencing the garbage collector from scanning H2 objects while maintaining the illusion of a single managed heap.
We implement TeraHeap in OpenJDK and evaluate it with 15 widely used applications in two real-world big data frameworks, Spark and Giraph. Our evaluation shows that for the same DRAM size, TeraHeap improves performance by up to 73% and 28% compared to native Spark and Giraph, respectively. Also, it provides better performance by consuming up to 4.6× and 1.2× less DRAM capacity than native Spark and Giraph, respectively. Finally, it outperforms Panthera, a state-of-the-art garbage collector for hybrid memories, by up to 69%.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 69ecd5d2-9558-403b-9f0a-282eb9022a13Cited by top-tier papers2
- More Apps, Faster Hot-Launch on Mobile Devices via Fore/Background-aware GC-Swap Co-designJiacheng Huang, Yunmo Zhang, Junqiao Qiu, Yu Liang et al.ASPLOS 2024 · 12 citations
- DShuffle: DPU-Optimized Shuffle Framework for Large-scale Data ProcessingChen Ding, Sicen Li, Kai Lu, Ting Yao et al.USENIX ATC 2025 · 2 citations
Builds on7
- An Empirical Guide to the Behavior and Use of Scalable Persistent MemoryJian Yang, Juno Kim, Morteza Hoseinzadeh, Joseph Izraelevitz et al.FAST 2020 · 470 citations
- TMO: transparent memory offloading in datacentersJohannes Weiner, Niket Agarwal, Dan Schatzberg, Leon Yang et al.ASPLOS 2022 · 103 citations
- Optimizing Memory-mapped I/O for Fast Storage DevicesAnastasios Papagiannis, Giorgos Xanthakis, Giorgos Saloustros, Manolis Marazakis et al.USENIX ATC 2020 · 68 citations
- Optimus Prime: Accelerating Data Transformation in ServersArash Pourhabibi Zarandi, Siddharth Gupta, Hussein Kassir, Mark Sutherland et al.ASPLOS 2020 · 43 citations
- A Specialized Architecture for Object Serialization with Applications to Big Data AnalyticsJaeyoung Jang, Sungjun Jung, Sunmin Jeong, Jun Heo et al.ISCA 2020 · 32 citations
Related papers
- FlexHeap: Dynamic I/O-Aware Heap Resizing for Managed ApplicationsIacovos G. Kolokasis, Shoaib Akram, Foivos S. Zakkak, Polyvios Pratikakis et al.PLDI 2026
- JPDHeap: A JVM Heap Design for PM-DRAM MemoriesLitong You, Tianxiao Gu, Shengan Zheng, Jianmei Guo et al.DAC 2021 · 2 citations
- MTM: Rethinking Memory Profiling and Migration for Multi-Tiered Large MemoryJie Ren, Dong Xu, Junhee Ryu, Kwangsik Shin et al.EuroSys 2024 · 31 citations
- MegaMmap: Blurring the Boundary Between Memory and Storage for Data-Intensive WorkloadsLuke Logan, Anthony Kougkas, Xian-He SunSC 2024 · 3 citations
- Cost-Efficient LLM Training with Lifetime-Aware Tensor Offloading via GPUDirect StorageZiqi Yuan, Haoyang Zhang, Yirui Eric Zhou, Apoorve Mohan et al.NeurIPS 2025 · 7 citations
