Shabari: Delayed Decision-Making for Faster and Efficient Serverless Functions (2401.08859v2)
Abstract: Serverless computing relieves developers from the burden of resource management, thus providing ease-of-use to the users and the opportunity to optimize resource utilization for the providers. However, today's serverless systems lack performance guarantees for function invocations, thus limiting support for performance-critical applications: we observed severe performance variability (up to 6x). Providers lack visibility into user functions and hence find it challenging to right-size them: we observed heavy resource underutilization (up to 80%). To understand the causes behind the performance variability and underutilization, we conducted a measurement study of commonly deployed serverless functions and learned that the function performance and resource utilization depend crucially on function semantics and inputs. Our key insight is to delay making resource allocation decisions until after the function inputs are available. We introduce Shabari, a resource management framework for serverless systems that makes decisions as late as possible to right-size each invocation to meet functions' performance objectives (SLOs) and improve resource utilization. Shabari uses an online learning agent to right-size each function invocation based on the features of the function input and makes cold-start-aware scheduling decisions. For a range of serverless functions and inputs, Shabari reduces SLO violations by 11-73% while not wasting any vCPUs and reducing wasted memory by 64-94% in the median case, compared to state-of-the-art systems, including Aquatope, Parrotfish, and Cypress.
- Configuring provisioned concurrency. https://docs.aws.amazon.com/lambda/latest/dg/provisioned-concurrency.html.
- ffprobe. https://ffmpeg.org/ffprobe.html.
- imagemagick. https://imagemagick.org/index.php.
- Knative. https://knative.dev/docs/.
- Kubernetes. https://kubernetes.io/.
- Openfaas. https://www.openfaas.com/.
- Vowpal wabbit. https://vowpalwabbit.org/index.html.
- Firecracker: Lightweight virtualization for serverless applications. In 17th USENIX Symposium on Networked Systems Design and Implementation (NSDI 20), pages 419–434, Santa Clara, CA, February 2020. USENIX Association.
- SAND: Towards High-Performance serverless computing. In 2018 USENIX Annual Technical Conference (USENIX ATC 18), pages 923–935, Boston, MA, July 2018. USENIX Association.
- AliCloud Severless Function. https://www.alibabacloud.com/product/function-compute.
- Cherrypick: Adaptively unearthing the best cloud configurations for big data analytics. In 14th USENIX Symposium on Networked Systems Design and Implementation (NSDI 17), pages 469–482, Boston, MA, March 2017. USENIX Association.
- FaaSnap: FaaS Made Fast Using Snapshot-Based VMs. In Proceedings of the Seventeenth European Conference on Computer Systems, EuroSys ’22, page 730–746, Rennes, France, 2022. Association for Computing Machinery.
- AWS Lambda. https://aws.amazon.com/lambda/.
- Profiling functions with aws lambda power tuning. https://docs.aws.amazon.com/lambda/latest/operatorguide/profile-functions.html.
- Multimodal machine learning: A survey and taxonomy. IEEE Transactions on Pattern Analysis and Machine Intelligence, 41(2):423–443, 2019.
- Cypress: Input size-sensitive container provisioning and request scheduling for serverless platforms. In Proceedings of the 13th Symposium on Cloud Computing, SoCC ’22, page 257–272, New York, NY, USA, 2022. Association for Computing Machinery.
- With great freedom comes great opportunity: Rethinking resource allocation for serverless functions. In Proceedings of the Eighteenth European Conference on Computer Systems, EuroSys ’23, page 381–397, New York, NY, USA, 2023. Association for Computing Machinery.
- On-demand container loading in AWS lambda. In 2023 USENIX Annual Technical Conference (USENIX ATC 23), pages 315–328, Boston, MA, July 2023. USENIX Association.
- Sebs: A serverless benchmark suite for function-as-a-service computing. In Proceedings of the 22nd International Middleware Conference, Middleware ’21, page 64–78, New York, NY, USA, 2021. Association for Computing Machinery.
- Catalyzer: Sub-Millisecond Startup for Serverless Computing with Initialization-Less Booting. In Proceedings of the Twenty-Fifth International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS ’20, page 467–481, Lausanne, Switzerland, 2020. Association for Computing Machinery.
- Google cloud functions. https://cloud.google.com/functions/.
- Slacker: Fast distribution with lazy docker containers. In 14th USENIX Conference on File and Storage Technologies (FAST 16), pages 181–195, Santa Clara, CA, February 2016. USENIX Association.
- Boki: Stateful Serverless Computing with Shared Logs. In Proceedings of the ACM SIGOPS 28th Symposium on Operating Systems Principles, SOSP ’21, page 691–707, Virtual Event, Germany, 2021. Association for Computing Machinery.
- Cloud programming simplified: A berkeley view on serverless computing. Technical Report UCB/EECS-2019-3, EECS Department, University of California, Berkeley, Feb 2019.
- Hermod: Principled and practical scheduling for serverless functions. In Proceedings of the 13th Symposium on Cloud Computing, SoCC ’22, page 289–305, New York, NY, USA, 2022. Association for Computing Machinery.
- Executing Microservice Applications on Serverless, Correctly. Proc. ACM Program. Lang., 7(POPL), jan 2023.
- Jiffy: Elastic Far-Memory for Stateful Serverless Analytics. EuroSys ’22, page 697–713, Rennes, France, 2022. Association for Computing Machinery.
- Functionbench: A suite of workloads for serverless cloud function service. In 2019 IEEE 12th International Conference on Cloud Computing (CLOUD), pages 502–504, 2019.
- Pocket: Elastic ephemeral storage for serverless analytics. In 13th USENIX Symposium on Operating Systems Design and Implementation (OSDI 18), pages 427–444, Carlsbad, CA, October 2018. USENIX Association.
- Faastlane: Accelerating Function-as-a-Service workflows. In 2021 USENIX Annual Technical Conference (USENIX ATC 21), pages 805–820. USENIX Association, July 2021.
- Apiary: A DBMS-Integrated Transactional Function-as-a-Service Framework, 2023.
- Fisc: A Large-scale Cloud-native-oriented File System. In 21st USENIX Conference on File and Storage Technologies (FAST 23), pages 231–246, Santa Clara, CA, February 2023. USENIX Association.
- Golgi: Performance-aware, resource-efficient function scheduling for serverless computing. In Proceedings of the 2023 ACM Symposium on Cloud Computing, SoCC ’23, page 32–47, New York, NY, USA, 2023. Association for Computing Machinery.
- RunD: A lightweight secure container runtime for high-density deployment and high-concurrency startup in serverless computing. In 2022 USENIX Annual Technical Conference (USENIX ATC 22), pages 53–68, Carlsbad, CA, July 2022. USENIX Association.
- Faasflow: Enable efficient workflow execution for function-as-a-service. In Proceedings of the 27th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS ’22, page 782–796, Lausanne, Switzerland, 2022. Association for Computing Machinery.
- CFS: A Distributed File System for Large Scale Container Platforms. In Proceedings of the 2019 International Conference on Management of Data, SIGMOD ’19, page 1729–1742, Amsterdam, Netherlands, 2019. Association for Computing Machinery.
- SONIC: Application-aware data passing for chained serverless applications. In 2021 USENIX Annual Technical Conference (USENIX ATC 21), pages 285–301. USENIX Association, July 2021.
- ORION and the three rights: Sizing, bundling, and prewarming for serverless DAGs. In 16th USENIX Symposium on Operating Systems Design and Implementation (OSDI 22), pages 303–320, Carlsbad, CA, July 2022. USENIX Association.
- Lambdaobjects: Re-aggregating storage and execution for cloud computing. In Proceedings of the 14th ACM Workshop on Hot Topics in Storage and File Systems, HotStorage ’22, page 15–22, Virtual Event, 2022. Association for Computing Machinery.
- Microsoft Azure Functions. https://azure.microsoft.com/en-us/services/functions/.
- Parrotfish: Parametric regression for optimizing serverless functions. In Proceedings of the 2023 ACM Symposium on Cloud Computing, SoCC ’23, page 177–192, New York, NY, USA, 2023. Association for Computing Machinery.
- Kevin P. Murphy. Probabilistic Machine Learning: An introduction. MIT Press, 2022.
- Ofc: An opportunistic caching system for faas platforms. In Proceedings of the Sixteenth European Conference on Computer Systems, EuroSys ’21, page 228–244, New York, NY, USA, 2021. Association for Computing Machinery.
- SOCK: Rapid task provisioning with Serverless-Optimized containers. In 2018 USENIX Annual Technical Conference (USENIX ATC 18), pages 57–70, Boston, MA, July 2018. USENIX Association.
- Apache OpenWhisk. https://openwhisk.apache.org/.
- Shuffling, fast and slow: Scalable analytics on serverless infrastructure. In 16th USENIX Symposium on Networked Systems Design and Implementation (NSDI 19), pages 193–206, Boston, MA, February 2019. USENIX Association.
- Halfmoon: Log-Optimal Fault-Tolerant Stateful Serverless Computing. In Proceedings of the 29th Symposium on Operating Systems Principles, SOSP ’23, page 314–330, Koblenz, Germany, 2023. Association for Computing Machinery.
- Faa$t: A transparent auto-scaling cache for serverless applications. In Proceedings of the ACM Symposium on Cloud Computing, SoCC ’21, page 122–137, Seattle, WA, USA, 2021. Association for Computing Machinery.
- Icebreaker: Warming serverless functions better with heterogeneity. In Proceedings of the 27th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS ’22, page 753–767, Lausanne, Switzerland, 2022. Association for Computing Machinery.
- Lukewarm serverless functions: Characterization and optimization. In Proceedings of the 49th Annual International Symposium on Computer Architecture, ISCA ’22, page 757–770, New York, New York, 2022. Association for Computing Machinery.
- Serverless in the wild: Characterizing and optimizing the serverless workload at a large cloud provider. In 2020 USENIX Annual Technical Conference (USENIX ATC 20), pages 205–218. USENIX Association, July 2020.
- Fireworks: A Fast, Efficient, and Safe Serverless Framework Using VM-Level Post-JIT Snapshot. In Proceedings of the Seventeenth European Conference on Computer Systems, EuroSys ’22, page 663–677, Rennes, France, 2022. Association for Computing Machinery.
- Atoll: A scalable low-latency serverless platform. In Proceedings of the ACM Symposium on Cloud Computing, SoCC ’21, page 138–152, New York, NY, USA, 2021. Association for Computing Machinery.
- Cntr: Lightweight OS containers. In 2018 USENIX Annual Technical Conference (USENIX ATC 18), pages 199–212, Boston, MA, July 2018. USENIX Association.
- Owl: Performance-aware scheduling for resource-efficient function-as-a-service cloud. In Proceedings of the 13th Symposium on Cloud Computing, SoCC ’22, page 78–93, New York, NY, USA, 2022. Association for Computing Machinery.
- Borg: the next generation. In EuroSys’20, Heraklion, Crete, 2020.
- Expedited Data Transfers for Serverless Clouds, 2023.
- Benchmarking, analysis, and optimization of serverless function snapshots. In Proceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS’21). ACM, 2021.
- FaaSNet: Scalable and fast provisioning of custom serverless container runtimes at alibaba cloud function compute. In 2021 USENIX Annual Technical Conference (USENIX ATC 21), pages 443–457. USENIX Association, July 2021.
- Peeking behind the curtains of serverless platforms. In 2018 USENIX Annual Technical Conference (USENIX ATC 18), pages 133–146, Boston, MA, July 2018. USENIX Association.
- Ben Wegbreit. Mechanical program analysis. Commun. ACM, 18(9):528–539, sep 1975.
- No provisioned concurrency: Fast RDMA-codesigned remote fork for serverless computing. In 17th USENIX Symposium on Operating Systems Design and Implementation (OSDI 23), pages 497–517, Boston, MA, July 2023. USENIX Association.
- Faasrank: Learning to schedule functions in serverless platforms. In 2021 IEEE International Conference on Autonomic Computing and Self-Organizing Systems (ACSOS), pages 31–40, 2021.
- Wharf: Sharing Docker Images in a Distributed File System. In Proceedings of the ACM Symposium on Cloud Computing, SoCC ’18, page 174–185, Carlsbad, CA, USA, 2018. Association for Computing Machinery.
- Aquatope: Qos-and-uncertainty-aware resource management for multi-stage serverless workflows. In Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 1, ASPLOS 2023, page 1–14, New York, NY, USA, 2022. Association for Computing Machinery.