paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Uncovering Hidden Memory Costs for Garbage Collection

揭示垃圾回收隐藏的内存开销
OOPSLA 10(OOPSLA2)2026匹配度 1/10 · 该论文研究 Java 垃圾回收在内存系统上的隐藏开销与测量方法,属于运行时/体系结构方向,与用户关注的静态分析、LLM/Agent、浮点程序分析和贝叶斯程序分析均无直接交集。引用 0 inbox
Sudhanshu Agarwal, Saugata Ghose
crossref: 2026-10-02

AI 速览

一句话:提出结合真实硬件与周期精确模拟的低开销测量方法,量化六种现代 Java GC 对内存系统的隐藏开销。

垃圾回收是现代托管语言的关键组成部分,其设计需在内存占用、并发性与性能间权衡,而现有聚合运行时指标难以刻画 GC 对内存系统的细粒度性能与能耗影响。本文提出一种低开销测量方法,结合真实硬件上的隔离线程监控与校准的周期精确模拟,对六种现代 Java GC 的内存系统开销进行细粒度分析。研究发现:(1) 所有 GC 压力水平下,GC 对 L3 缓存访问的开销显著高于 L1;(2) GC 加载平均服务时间更长,且随 GC 压力降低而增加;(3) GC 访问通常不提升应用缓存命中率,预取应用数据的收益被 GC 与应用干扰抵消;(4) 现代高并发 GC 因工作负载触发的 L2 硬件预取而产生大量无用预取。该工作揭示了现有指标未能捕获的 GC 内存系统开销,并推动面向内存系统的 GC 优化。

问题
现代垃圾回收器的设计依赖聚合运行时指标,但这些指标难以捕捉 GC 执行对内存系统造成的细粒度性能与能耗影响,导致相关开销被隐藏。
方法
提出一种低开销测量方法,将真实硬件上的隔离线程监控与经过校准的周期精确模拟相结合,从而对 GC 的内存系统行为进行细粒度分析。
评估
将该方法应用于六种现代 Java GC,在不同 GC 压力水平下量化其内存系统开销,并归纳出关于 L3 缓存访问、加载服务时间、应用缓存命中率及无用预取的四项观察。
原文摘要(Abstract)

Garbage collection is an essential part of modern managed languages, such as Java, that are used in billions of devices and in a large variety of settings. Multiple garbage collectors (GCs) have been developed over the last several decades, in an attempt to optimize across a complex design space that includes memory footprint for GC metadata, thread concurrency with the mutator (i.e., the application), performance, and the footprint of stale data. While aggregate runtime metrics have been used to guide modern GC design, it has been difficult to use such metrics to capture the fine-grained performance and energy impact that GC execution has on the memory system. We develop a novel low-overhead methodology for measuring the cost of GCs, by combining isolated thread monitoring using a combination of real hardware and calibrated cycle-accurate simulation, which allows us to perform fine-grained analysis of modern GC overheads. We use our methodology to make several observations about the overheads of six modern Java GCs on the memory system, including: (1) the GCs introduce a substantially higher overhead on L3 cache accesses compared to L1 cache accesses at all levels of GC pressure analyzed; (2) GC loads require more time on average to be serviced, a cost that increases with reduction in GC pressure; (3) GC accesses generally do not improve application cache hits, as the potential benefits of prefetching application data are counteracted by GC–application interference; and (4) modern highly-concurrent GCs account for most of the useless prefetching due to L2 hardware prefetching triggered by workload execution. Our work highlights the assumed memory system overheads of GC not captured by existing metrics, and aims to encourage future work in optimizing GCs for the memory system.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot12127,
  title = {Uncovering Hidden Memory Costs for Garbage Collection},
  author = {Sudhanshu Agarwal and Saugata Ghose},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {OOPSLA2},
  year = {2026},
  doi = {10.1145/3839473}
}