paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Towards a Serverless Java Runtime

迈向 Serverless Java 运行时
ASE 2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE)2021匹配度 1/10 · 该论文属于 Java 运行时/JIT/AOT 编译优化,目标是加速启动与预热,与用户关注的静态分析、LLM/Agentic 程序分析、浮点程序分析及贝叶斯程序分析均无直接关系。虽然涉及编译与运行时,但不涉及用户当前追的核心问题。引用 3 inbox
Yifei Zhang, Tianxiao Gu, Xiaolin Zheng, Lei Yu, Wei Kuai, Sanhong Li
crossref: 2026-09-12

AI 速览

一句话:系统化复用 JVM 运行时数据(JIT profile、AOT 代码与 CDS),显著加速 Java 应用启动与预热。

JVM 存在启动慢与预热慢的问题:每次运行同一应用都要重新构建类元数据、方法 profile 数据以及即时编译(JIT)生成的原生代码。已有技术如类数据共享(CDS)与提前编译(AOT)分别致力于复用类元数据与编译代码,但彼此独立开发、难以相互借力。本文提出系统性复用 JVM 运行时数据的方法:首先实现 JWarmup,记录并复用 JIT 编译数据(含已编译方法及其 profile 数据);随后将 JIT 编译数据馈入 AOT 编译器以执行 profile 引导优化(PGO);并进一步整合现有 CDS 与 AOT 技术共同优化启动。在真实应用上的评估表明,该方法可将应用启动性能提升 41.35%,同时能提前触发 JIT 编译并降低峰值时段的 CPU 负载。

问题
JVM 每次运行都需重建类元数据、方法 profile 与 JIT 编译代码,导致启动与预热缓慢;现有 CDS、AOT 等技术各自独立,无法协同复用运行时数据。
方法
提出并实现 JWarmup 记录与复用 JIT 编译数据(编译方法及其 profile),再将其作为输入驱动 AOT 编译器进行 profile 引导优化(PGO),并整合 CDS 与 AOT 共同优化启动。
评估
在真实应用上进行评估,应用启动性能提升 41.35%,并能提前触发 JIT 编译、降低峰值时段的 CPU 负载。
原文摘要(Abstract)

Java virtual machine (JVM) has the well-known slow startup and warmup issues. This is because the JVM needs to dynamically create many runtime data before reaching peak performance, including class metadata, method profile data, and just-in-time (JIT) compiled native code, for each run of even the same application. Many techniques are then proposed to reuse and share these runtime data across different runs. For example, Class Data Sharing (CDS) and Ahead-of-time (AOT) compilation aim to save and share class metadata and compiled native code, respectively. Unfortunately, these techniques are developed independently and cannot leverage the ability of each other well. This paper presents an approach that systematically reuses JVM runtime data to accelerate application startup and warmup. We first propose and implement JWarmup, a technique that can record and reuse JIT compilation data (e.g., compiled methods and their profile data). Then, we feed JIT compilation data to the AOT compiler to perform profile-guided optimization (PGO). We also integrate existing CDS and AOT techniques to further optimize application startup. Evaluation on real-world applications shows that our approach can bring a 41.35% improvement to the application startup. Moreover, our approach can trigger JIT compilation in advance and reduce CPU load at peak time.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot6615,
  title = {Towards a Serverless Java Runtime},
  author = {Yifei Zhang and Tianxiao Gu and Xiaolin Zheng and Lei Yu and Wei Kuai and Sanhong Li},
  booktitle = {ASE},
  year = {2021},
  doi = {10.1109/ase51524.2021.9678709}
}