一句话:提出 RainbowCake,以分层容器预热/保活和共享感知缓存决策,降低无服务器冷启动延迟与内存浪费。
无服务器计算通过自包含容器交付函数,但容器启动带来严重的冷启动延迟。全量容器缓存虽能缓解,但近期研究表明部分容器缓存与容器共享更优;然而前者难以彻底消除冷启动,后者因容器过度打包造成内存浪费。本文提出 RainbowCake,一种分层容器预热与保活技术,在共享感知下以最小内存浪费缓解冷启动。它将标准容器启动过程划分为三个阶段,分别管理不同容器层,并用共享感知的事件驱动算法实时决策分层缓存,从而容忍调用突发。在 OpenWhisk 集群与真实负载上的实验表明,相比先进方案,函数启动延迟降低 68%,内存浪费减少 77%。
Serverless computing has grown rapidly as a new cloud computing paradigm that promises ease-of-management, cost-efficiency, and auto-scaling by shipping functions via self-contained virtualized containers. Unfortunately, serverless computing suffers from severe cold-start problems---starting containers incurs non-trivial latency. Full container caching is widely applied to mitigate cold-starts, yet has recently been outperformed by two lines of research: partial container caching and container sharing. However, either partial container caching or container sharing techniques exhibit their drawbacks. Partial container caching effectively deals with burstiness while leaving cold-start mitigation halfway; container sharing reduces cold-starts by enabling containers to serve multiple functions while suffering from excessive memory waste due to over-packed containers. This paper proposes RainbowCake, a layer-wise container pre-warming and keep-alive technique that effectively mitigates cold-starts with sharing awareness at minimal waste of memory. With structured container layers and sharing-aware modeling, RainbowCake is robust and tolerant to invocation bursts. We seize the opportunity of container sharing behind the startup process of standard container techniques. RainbowCake breaks the container startup process of a container into three stages and manages different container layers individually. We develop a sharing-aware algorithm that makes event-driven layer-wise caching decisions in real-time. Experiments on OpenWhisk clusters with real-world workloads show that RainbowCake reduces 68% function startup latency and 77% memory waste compared to state-of-the-art solutions.
@inproceedings{YuRFTLZWP24,
title = {RainbowCake: Mitigating Cold-starts in Serverless with Layer-wise Container Caching and Sharing},
author = {Hanfei Yu and Rohan Basu Roy and Christian Fontenot and Devesh Tiwari and Jian Li and Hong Zhang and Hao Wang and Seung-Jong Park},
booktitle = {ASPLOS},
year = {2024},
doi = {10.1145/3617232.3624871}
}