paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Iso: Request-Private Garbage Collection

Iso:请求私有的垃圾回收
PLDI 9(PLDI)2025匹配度 2/10 · 该论文属于运行时与内存管理方向,研究 Java 请求私有垃圾回收与 mark-region 堆,与用户关注的静态分析、LLM/Agentic 程序分析、浮点程序分析及贝叶斯程序分析均无直接关联;仅在 PL 系统、工业负载和基准设计上有很弱的交集。引用 1 inbox
Tianle Qiu, Stephen M. Blackburn
crossref: 2026-09-10

AI 速览

一句话:提出 Iso——首个面向 Java 的请求私有垃圾回收器,用 mark-region 堆与机会式复制显著降低请求型服务的 GC 开销。

大型、营收关键的 Java 服务对延迟、吞吐与内存极为敏感,而 Java 类型系统不暴露不可变性,使对象移动与线程局部回收难以兼得。作者观察到一类重要的服务器应用是按请求组织的:对象生命周期与请求生命周期强绑定,多数对象仅在其被分配的请求内可见,而全局操作是可扩展响应性的主要瓶颈。若能在请求私有范围内回收,即可兼顾响应性与效率,但难点在于请求私有回收无法安全移动可能被请求外引用的对象,而移动对象又是现代高性能收集器的基本要求。Iso 基于 mark-region 堆结构,采用机会式复制解决无不可变性语言中实用的线程局部回收问题,并动态跟踪对象可见性。论文首次详细分析 Java 工作负载在 thread-local 回收下的行为,指出既有基准的不足并提出新基准。评估显示可见性跟踪开销仅 2%(Tomcat、Spring 等),在适度堆下执行时间比 OpenJDK 默认的 G1 分别快 32% 与 22%。

问题
大规模请求型 Java 服务的 GC 开销是首要问题:对象生命周期与请求绑定且多为请求私有,但请求私有回收无法安全移动可能被外部引用的对象,而 Java 类型系统不暴露不可变性,无法借其规避该困境。
方法
设计并实现 Iso:基于 mark-region 堆结构,用机会式复制(opportunistic copying)在无可用不可变性的语言中实现实用的请求私有(线程局部)垃圾回收,并动态跟踪对象的可见性。
评估
在 Tomcat、Spring 等请求型工作负载上测量可见性跟踪开销(约 2%),并给出首次针对 Java 工作负载线程局部回收行为的详细分析、新基准,以及与 OpenJDK 默认收集器 G1 的执行时间对比(适度堆下分别快 32% 与 22%)。
原文摘要(Abstract)

Large-scale, revenue-critical application services are often written in Java or other memory-safe languages whose type systems do not expose immutable state. Such applications are especially exposed to garbage collection performance overheads because latency, throughput, and memory consumption are first-order concerns for service providers. We observe that: i) An important class of server applications are request-based: they scale by concurrently servicing large numbers of quasi-independent requests. ii) Object lifetimes are strongly tied to request lifetimes. iii) Most objects remain private to the request in which they were allocated. iv) Global operations are the primary impediment to responsiveness at scale. If we could perform request-private garbage collection , we might achieve both responsiveness and efficiency at scale. Unfortunately, this straightforward insight runs into significant practical problems. The most obvious of these is that a request-private collection cannot safely move objects that may be referenced outside the scope of that request, and yet moving objects is a requirement of most modern high performance collector designs. This dilemma can be sidestepped by exploiting immutability, which is unfortunately not practical in languages like Java whose type systems do not expose it. We develop Iso, a garbage collector for request-based services that exploits a mark-region heap structure to solve these impediments and deliver outstanding performance. The key contributions of this paper are that: i) We use opportunistic copying to solve the problem of practical thread-local garbage collection for languages without exploitable immutability. ii) We provide the first detailed analysis of the behavior of Java workloads with respect to thread-local collection, identify shortcomings of existing benchmarks and introduce a new one. iii) We design, implement, and evaluate Iso, a practical and effective request-private GC. We show that dynamic tracking of object visibility, a prerequisite for request-private GC, incurs an overhead of just 2% for important request-based workloads including Tomcat and Spring. Iso demonstrates that for suitable workloads, request-based garbage collection is extremely effective, outperforming OpenJDK with its default collector, G1, by 32% and 22% in execution time in a modest heap. This work presents the first request-private garbage collector for Java. It shows a promising way forward for highly responsive collection on an important class of large scale workloads.

链接与引用

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

BibTeX
@article{paperbot3148,
  title = {Iso: Request-Private Garbage Collection},
  author = {Tianle Qiu and Stephen M. Blackburn},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {9},
  number = {PLDI},
  year = {2025},
  doi = {10.1145/3729285}
}