Initialize once, start fast: application initialization at build time

Initialize once, start fast: application initialization at build time
复制标题

DOI:
10.1145/3360610
复制
发表时间:
2019-10
影响因子:
--
通讯作者:
Christian Wimmer;Codrut Stancu;Peter Hofer;V. Jovanovic;Paul Wögerer;P. Kessler;Oleg Pliss;Thomas Würthinger
Christian Wimmer;Codrut Stancu;Peter Hofer;V. Jovanovic;Paul Wögerer;P. Kessler;Oleg Pliss;Thomas Würthinger
中科院分区:
--
文献类型:
--
作者:
Christian Wimmer;Codrut Stancu;Peter Hofer;V. Jovanovic;Paul Wögerer;P. Kessler;Oleg Pliss;Thomas Würthinger

文献摘要

被引文献

相似文献

在基于语言的虚拟机中,运行时任意的程序扩展,例如Java的动态类加载,是以启动成本为代价的:高内存占用和缓慢的预热。云计算增加了启动开销。微服务和无服务器云功能导致经常启动的小型、自包含的应用程序。缓慢的启动和高内存占用直接影响云托管成本,缓慢的启动还会破坏服务水平协议。许多应用程序仅限于一组预先测试过的类,也就是说,在部署时使用封闭世界假设。对于这样的Java应用程序,GraalVM Native Image提供了快速启动和稳定的性能。GraalVM Native Image使用点到分析和堆快照的新颖迭代应用程序,然后使用优化编译器进行提前编译。初始化代码可以在构建时运行,也就是说,可执行文件可以根据特定的应用程序配置进行定制。运行时执行从一个预填充的堆开始,利用写时复制的内存共享。我们表明,与Java HotSpot VM相比,这种方法在保持峰值性能的同时,将启动性能提高了两个数量级。这使得Java应用程序比Go应用程序和V8 JavaScript虚拟机有更好的启动性能。
Arbitrary program extension at run time in language-based VMs, e.g., Java's dynamic class loading, comes at a startup cost: high memory footprint and slow warmup. Cloud computing amplifies the startup overhead. Microservices and serverless cloud functions lead to small, self-contained applications that are started often. Slow startup and high memory footprint directly affect the cloud hosting costs, and slow startup can also break service-level agreements. Many applications are limited to a prescribed set of pre-tested classes, i.e., use a closed-world assumption at deployment time. For such Java applications, GraalVM Native Image offers fast startup and stable performance. GraalVM Native Image uses a novel iterative application of points-to analysis and heap snapshotting, followed by ahead-of-time compilation with an optimizing compiler. Initialization code can run at build time, i.e., executables can be tailored to a particular application configuration. Execution at run time starts with a pre-populated heap, leveraging copy-on-write memory sharing. We show that this approach improves the startup performance by up to two orders of magnitude compared to the Java HotSpot VM, while preserving peak performance. This allows Java applications to have a better startup performance than Go applications and the V8 JavaScript VM.