SPES: Towards Optimizing Performance-Resource Trade-Off for Serverless Functions
Cheryl Lee, Zhouruixing Zhu, Tianyi Yang, Yintong Huo, Yuxin Su, Pinjia He, Michael R. Lyu
TL;DR
The paper addresses the persistent cold-start latency in serverless Function-as-a-Service by proposing SPES, a differentiated scheduler that leverages invocation pattern analysis to predict and provision function instances. SPES categorizes functions into five deterministic types and uses adaptive strategies to handle concept drift, including a co-occurrence-based correlation metric to connect unknown/infrequently invoked functions with known ones. The approach yields substantial improvements in the 75th percentile cold-start rate (approximately 49.77% reduction) and wasted memory time (approximately 56.43% reduction) compared with baselines, while maintaining modest overhead. By enabling accurate next-invocation prediction without extensive training data, SPES offers a scalable, developer-free mechanism to optimize latency-resource trade-offs in real-world serverless deployments, with publicly available code for reproducibility and further study.
Abstract
As an emerging cloud computing deployment paradigm, serverless computing is gaining traction due to its efficiency and ability to harness on-demand cloud resources. However, a significant hurdle remains in the form of the cold start problem, causing latency when launching new function instances from scratch. Existing solutions tend to use over-simplistic strategies for function pre-loading/unloading without full invocation pattern exploitation, rendering unsatisfactory optimization of the trade-off between cold start latency and resource waste. To bridge this gap, we propose SPES, the first differentiated scheduler for runtime cold start mitigation by optimizing serverless function provision. Our insight is that the common architecture of serverless systems prompts the concentration of certain invocation patterns, leading to predictable invocation behaviors. This allows us to categorize functions and pre-load/unload proper function instances with finer-grained strategies based on accurate invocation prediction. Experiments demonstrate the success of SPES in optimizing serverless function provision on both sides: reducing the 75th-percentile cold start rates by 49.77% and the wasted memory time by 56.43%, compared to the state-of-the-art. By mitigating the cold start issue, SPES is a promising advancement in facilitating cloud services deployed on serverless architectures.
