HyperFork: Improving Serverless Latency and Throughput Through Virtual Machine Flash-Cloning

Serverless computing provides a simple model for executing computations in response to triggers. In many serverless deployments, these computations are executed within virtual machines for stronger isolation and fairness guarantees. As a result, the time required to boot a new virtual machine is a significant contributor to the latency of a serverless application. To minimize the latency introduced by the boot process, we propose an alternative paradigm in which new virtual machines are launched by flash-cloning a pre-booted machine image. To assess this scheme, we have created HyperFork, a flash-clone implementation built on top of KVM and the kvmtool virtual machine monitor. HyperFork duplicates the full machine state, including memory, disk contents, and CPU state, to the new virtual machine. For the contents of memory and disk, our implementation leverages copy-on-write optimizations exposed by the Linux kernel. We demonstrate that HyperFork reduces virtual machine cold-start times by up to 98.4% while increasing throughput by 46%–502% in serverless workloads. We discuss the optimizations employed to achieve this performance along with security and correctness implications of our approach.

[1]  Kartik Gopalan,et al.  Post-copy based live virtual machine migration using adaptive pre-paging and dynamic self-ballooning , 2009, VEE '09.

[2]  Fabrice Bellard,et al.  QEMU, a Fast and Portable Dynamic Translator , 2005, USENIX ATC, FREENIX Track.

[3]  David J. Scott,et al.  Unikernels: the rise of the virtual library operating system , 2013, CACM.

[4]  A. Kivity,et al.  kvm : the Linux Virtual Machine Monitor , 2007 .

[5]  Ole Agesen,et al.  A comparison of software and hardware techniques for x86 virtualization , 2006, ASPLOS XII.

[6]  Marianne Shaw,et al.  Denali: a scalable isolation kernel , 2002, EW 10.

[7]  Eyal de Lara,et al.  SnowFlock: rapid virtual machine cloning for cloud computing , 2009, EuroSys '09.

[8]  No License,et al.  Intel ® 64 and IA-32 Architectures Software Developer ’ s Manual Volume 3 A : System Programming Guide , Part 1 , 2006 .

[9]  R. Sternberg,et al.  The fork in the road , 2017, Behavioral and Brain Sciences.

[10]  Christina Delimitrou,et al.  Bolt: I Know What You Did Last Summer... In The Cloud , 2017, ASPLOS.

[11]  Stephan Müller Linux Random Number Generator , 2017 .

[12]  Rusty Russell,et al.  virtio: towards a de-facto standard for virtual I/O devices , 2008, OPSR.

[13]  Mengyuan Li,et al.  Peeking Behind the Curtains of Serverless Platforms , 2018, USENIX Annual Technical Conference.

[14]  Marianne Shaw,et al.  Denali: Lightweight Virtual Machines for Distributed and Networked Applications , 2001 .

[15]  Michael Vrable,et al.  Scalability, fidelity, and containment in the potemkin virtual honeyfarm , 2005, SOSP '05.