Profile-Guided Optimization of Cold Starts in Serverless Applications with ColdSpy
Ali Al Zein · Deep Blue (University of Michigan) · 2024
Serverless computing offers significant benefits over past traditional execution models, promis- ing efficient resource utilization, cost-effectiveness, and extreme elasticity. Despite its benefits, serverless applications face challenges due to the ephemeral nature of serverless functions, leading to ”cold-start” latencies. Prior research has addressed cold-start latencies by designing novel container techniques such as container caching, sharing, and memory optimizations. However, none of the research has explored a measurement-based approach to identify code-level inefficiencies that cause significant cold-start latencies. In this research, we first investigate serverless applications to identify the common inefficient library initialization and usage patterns that result in significant cold-start latency. We further generalize the patterns and propose a novel dynamic program analysis tool, ColdSpy, to detect the inefficiency and guide the developers for optimization. Guided by ColdSpy, we optimize five real-world serverless applications resulting in the reduction of cold starts up to 42% in AWS Lambda.