Serverless computing has seen rapid adoption due to its high scalability and flexible, pay-as-you-go billing model. In serverless, developers structure their services as a collection of functions, sporadically invoked by various events like clicks. High inter-arrival time variability of function invocations motivates the providers to start new function instances upon each invocation, leading to significant cold-start delays that degrade user experience. To reduce cold-start latency, the industry has turned to snapshotting, whereby an image of a fully-booted function is stored on disk, enabling a faster invocation compared to booting a function from scratch. This work introduces vHive, an open-source framework for serverless experimentation with the goal of enabling researchers to study and innovate across the entire serverless stack. Using vHive, we characterize a state-of-the-art snapshot-based serverless infrastructure, based on industry-leading Containerd orchestration framework and Firecracker hypervisor technologies. We find that the execution time of a function started from a snapshot is 95% higher, on average, than when the same function is memory-resident. We show that the high latency is attributable to frequent page faults as the function's state is brought from disk into guest memory one page at a time. Our analysis further reveals that functions access the same stable working set of pages across different invocations of the same function. By leveraging this insight, we build REAP, a light-weight software mechanism for serverless hosts that records functions' stable working set of guest memory pages and proactively prefetches it from disk into memory. Compared to baseline snapshotting, REAP slashes the cold-start delays by 3.7x, on average.
翻译:无服务器的计算由于其高度可缩缩和灵活、付现即付的计费模式而迅速被采用。在无服务器中,开发者将其服务设置为功能集合,由点击等各种事件零星引用。高到抵达时间的功能变化性促使提供商在每次出勤时开始新的功能,导致大量冷启动延迟,从而降低用户的经验。为了减少冷启动缓存,该行业转向了快照,将一个完全启动的功能图像存储在盘中,从而使得比从零开始功能启动的功能更快的引用。这项工作引入了 VHive,这是一个用于服务器无服务器实验的开放源框架,目的是让研究人员在整个服务器堆中学习和创新。我们使用 vhive,根据工业领先的集装箱调控框架和Firecrcracker Expervisor 技术, 我们发现,从一个快速的软存储存储时间开始,比正常运行的快95%要高,而当此功能是內存的。我們在一次內存的內存時, 我們的內存的內存的內存功能是一個內存。