Skip to main content
QUICK REVIEW

[Paper Review] Sizeless: Predicting the optimal size of serverless functions

Simon Eismann, Long Bui|arXiv (Cornell University)|Oct 28, 2020
Cloud Computing and Resource ManagementComputer Science36 references10 citations
TL;DR

This paper proposes Sizeless, a method to predict the optimal memory size for serverless functions using only monitoring data from a single memory configuration, eliminating the need for time-consuming performance tests. It achieves a 15.3% average prediction error and selects the optimal or second-best memory size for 91.3% of functions, resulting in a 39.7% average speedup and 2.6% cost reduction on AWS.

ABSTRACT

Serverless functions are a cloud computing paradigm where the provider takes care of resource management tasks such as resource provisioning, deployment, and auto-scaling. The only resource management task that developers are still in charge of is selecting how much resources are allocated to each worker instance. However, selecting the optimal size of serverless functions is quite challenging, so developers often neglect it despite its significant cost and performance benefits. Existing approaches aiming to automate serverless functions resource sizing require dedicated performance tests, which are time-consuming to implement and maintain. In this paper, we introduce an approach to predict the optimal resource size of a serverless function using monitoring data from a single resource size. As our approach does not require dedicated performance tests, it enables cloud providers to implement resource sizing on a platform level and automate the last resource management task associated with serverless functions. We evaluate our approach on three different serverless applications, where it selects the optimal memory size for 71.7% of the serverless functions and the second-best memory size for 22.3% of the serverless functions, which results in an average speedup of 43.6% while simultaneously decreasing average costs by 10.2%.

Motivation & Objective

  • To address the challenge of manual, suboptimal memory sizing in serverless functions, which significantly impacts cost and performance.
  • To eliminate the need for dedicated performance tests in memory size optimization, which are time-consuming and hard to maintain.
  • To enable cloud providers to offer automated memory size recommendations at scale, similar to AWS Compute Optimizer.
  • To develop a model that generalizes from synthetic data to real-world serverless applications using minimal monitoring data.
  • To make serverless computing truly serverless by automating the final developer-managed resource management task: resource sizing.

Proposed method

  • A synthetic serverless function generator creates 2,000 diverse functions by combining representative code segments.
  • Resource consumption and execution time are measured across six memory sizes for each synthetic function on AWS Lambda.
  • A multi-target regression model is trained to predict execution times across all memory sizes using only monitoring data from a single memory size.
  • The model leverages execution time and resource metrics (e.g., CPU, memory, I/O) from one configuration to infer performance across others.
  • The approach is evaluated on four real-world serverless applications, using monitoring data from one memory size to predict and optimize for others.
  • The model is validated on a production application measured nine months after training, demonstrating long-term generalization.

Experimental results

Research questions

  • RQ1Can a model trained on synthetic serverless functions accurately predict execution times across multiple memory sizes using only monitoring data from a single size?
  • RQ2Can such a model identify the optimal or near-optimal memory size for real-world serverless functions without requiring dedicated performance tests?
  • RQ3To what extent does the model reduce execution time and cost compared to default or suboptimal memory configurations?
  • RQ4How well does the model generalize to real-world applications, especially when trained on synthetic data and tested months later?
  • RQ5Can this approach be deployed at scale by cloud providers to automate memory size recommendations?

Key findings

  • The model predicts execution times for other memory sizes with an average error of 15.3% based on monitoring data from a single memory size.
  • For 79.0% of serverless functions, the model selects the optimal memory size, and for 12.3%, it selects the second-best size, totaling 91.3% of functions receiving a near-optimal configuration.
  • The selected memory sizes result in an average speedup of 39.7% across the evaluated applications.
  • The approach simultaneously reduces average costs by 2.6% compared to default or suboptimal configurations.
  • The model generalizes effectively to real-world applications, including one tested nine months after the training data was collected.
  • The approach enables cloud providers to offer automated memory size recommendations without running performance tests on user functions.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.