Help Rather Than Recycle: Alleviating Cold Startup in Serverless Computing Through Inter-Function Container Sharing

In serverless computing, each function invocation is executed in a container (or a Virtual Machine), and container cold startup results in long response latency. We observe that some functions suffer from cold container startup, while the warm containers of other functions are idle. Based on the observation, other than booting a new container for a function from scratch, we propose to alleviate the cold startup by re-purposing a warm but idle container from another function. We implement a container management scheme, named Pagurus , to achieve the purpose. Pagurus comprises an intra-function manager for replacing an idle warm container to be a container that other functions can use without introducing additional security issues, an inter-function scheduler for scheduling containers between functions, and a sharing-aware function balancer at the cluster-level for balancing the workload across different nodes. Experiments using Azure serverless traces show that Pagurus alleviates 84.6% of the cold startup, and the cold startup latency is reduced from hundreds of milliseconds to 16 milliseconds if alleviated. Abstract Our artifact includes the prototype implementation of Zygote-based mechanism in Pagurus, 10 masked applications (including 38 functions) benchmarks, and mapped functions from Azure Trace. The artifact provides experiment workflow scripts to perform the measurement.

[1]  Rohan Basu Roy,et al.  IceBreaker: warming serverless functions better with heterogeneity , 2022, ASPLOS.

[2]  Quan Chen,et al.  FaaSFlow: enable efficient workflow execution for function-as-a-service , 2022, ASPLOS.

[3]  Minyi Guo,et al.  The Serverless Computing Survey: A Technical Primer for Design Architecture , 2021, ACM Comput. Surv..

[4]  Quan Chen,et al.  RunD: A Lightweight Secure Container Runtime for High-density Deployment and High-concurrency Startup in Serverless Computing , 2022, USENIX Annual Technical Conference.

[5]  Minyi Guo,et al.  QoS-Aware and Resource Efficient Microservice Deployment in Cloud-Edge Continuum , 2021, 2021 IEEE International Parallel and Distributed Processing Symposium (IPDPS).

[6]  Prateek Sharma,et al.  FaasCache: keeping serverless computing alive with greedy-dual caching , 2021, ASPLOS.

[7]  Marios Kogias,et al.  Benchmarking, analysis, and optimization of serverless function snapshots , 2021, ASPLOS.

[8]  Purushottam Kulkarni,et al.  Xanadu: Mitigating cascading cold starts in serverless function chain deployments , 2020, International Middleware Conference.

[9]  Yubin Xia,et al.  Characterizing serverless platforms with serverlessbench , 2020, SoCC.

[10]  Albert Y. Zomaya,et al.  Automated Fine-Grained CPU Cap Control in Serverless Computing Platform , 2020, IEEE Transactions on Parallel and Distributed Systems.

[11]  Han Dong,et al.  SEUSS: skip redundant paths to make serverless fast , 2020, EuroSys.

[12]  Yubin Xia,et al.  Catalyzer: Sub-millisecond Startup for Serverless Computing with Initialization-less Booting , 2020, ASPLOS.

[13]  Ricardo Bianchini,et al.  Serverless in the Wild: Characterizing and Optimizing the Serverless Workload at a Large Cloud Provider , 2020, USENIX Annual Technical Conference.

[14]  Kai Ma,et al.  DADI: Block-Level Image Service for Agile and Elastic Application Deployment , 2020, USENIX Annual Technical Conference.

[15]  Qiong Wu,et al.  Adaptive Function Launching Acceleration in Serverless Computing Platforms , 2019, 2019 IEEE 25th International Conference on Parallel and Distributed Systems (ICPADS).

[16]  Christoforos E. Kozyrakis,et al.  Centralized Core-granular Scheduling for Serverless Functions , 2019, SoCC.

[17]  David Wentzlaff,et al.  Architectural Implications of Function-as-a-Service Computing , 2019, MICRO.

[18]  Dejan S. Milojicic,et al.  Fast in-memory CRIU for docker containers , 2019, MEMSYS.

[19]  Mainak Adhikari,et al.  A Survey on Scheduling Strategies for Workflows in Cloud Environment and Emerging Trends , 2019, ACM Comput. Surv..

[20]  Christina Delimitrou,et al.  X-Containers: Breaking Down Barriers to Improve Performance and Isolation of Cloud-Native Containers , 2019, ASPLOS.

[21]  Peng Wu,et al.  Replayable Execution Optimized for Page Sharing for a Managed Runtime Environment , 2019, EuroSys.

[22]  David A. Patterson,et al.  Cloud Programming Simplified: A Berkeley View on Serverless Computing , 2019, ArXiv.

[23]  Joseph M. Hellerstein,et al.  Serverless Computing: One Step Forward, Two Steps Back , 2018, CIDR.

[24]  Marin Litoiu,et al.  Optimizing serverless computing: introducing an adaptive function placement algorithm , 2019, CASCON.

[25]  Kshitij Doshi,et al.  Agile Cold Starts for Scalable Serverless , 2019, HotCloud.

[26]  Ion Stoica,et al.  Shuffling, Fast and Slow: Scalable Analytics on Serverless Infrastructure , 2019, NSDI.

[27]  Ion Stoica,et al.  Numpywren: Serverless Linear Algebra , 2018, ArXiv.

[28]  Andrea C. Arpaci-Dusseau,et al.  SOCK: Rapid Task Provisioning with Serverless-Optimized Containers , 2018, USENIX Annual Technical Conference.

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

[30]  David G. Andersen,et al.  Putting the "Micro" Back in Microservice , 2018, USENIX Annual Technical Conference.

[31]  Zahir Tari,et al.  A Model Predictive Controller for Managing QoS Enforcements and Microarchitecture-Level Interferences in a Lambda Platform , 2018, IEEE Transactions on Parallel and Distributed Systems.

[32]  Mohamed Mohamed,et al.  Improving Docker Registry Design Based on Production Workload Analysis , 2018, FAST.

[33]  Perry Cheng,et al.  Serverless Computing: Current Trends and Open Problems , 2017, Research Advances in Cloud Computing.

[34]  Paul R. Brenner,et al.  Serverless Computing: Design, Implementation, and Performance , 2017, 2017 IEEE 37th International Conference on Distributed Computing Systems Workshops (ICDCSW).

[35]  Andrea C. Arpaci-Dusseau,et al.  Serverless Computation with OpenLambda , 2016, HotCloud.

[36]  Andrea C. Arpaci-Dusseau,et al.  Slacker: Fast Distribution with Lazy Docker Containers , 2016, FAST.

[37]  Michela Taufer,et al.  A Two-Tiered Approach to I/O Quality of Service in Docker Containers , 2015, 2015 IEEE International Conference on Cluster Computing.

[38]  Eric A. Brewer,et al.  Kubernetes and the path to cloud native , 2015, SoCC.

[39]  Selmin Nurcan,et al.  Bi-criteria Workflow Tasks Allocation and Scheduling in Cloud Computing Environments , 2012, 2012 IEEE Fifth International Conference on Cloud Computing.

[40]  Rajkumar Buyya,et al.  Article in Press Future Generation Computer Systems ( ) – Future Generation Computer Systems Cloud Computing and Emerging It Platforms: Vision, Hype, and Reality for Delivering Computing as the 5th Utility , 2022 .

[41]  Paul G. Spirakis,et al.  Weighted random sampling with a reservoir , 2006, Inf. Process. Lett..

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