login
Home / Papers / Towards a Serverless Java Runtime

Towards a Serverless Java Runtime

3 Citations•2021•
Yifei Zhang, Tianxiao Gu, Xiaolin Zheng
2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE)

This paper proposes and implements JWarmup, a technique that can record and reuse JIT compilation data to accelerate application startup and warmup, and integrates existing CDS and AOT techniques to further optimize application startup.

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.