一句话:λ-trim 用静态分析、计费感知性能分析与去膨胀,按成本优先级消除冗余代码以优化无服务器冷启动。
论文关注无服务器应用冷启动中长期被忽视的一环:函数初始化的货币成本。函数初始化通常被视为用户责任,但它可计费,且在实际机器学习应用中占冷启动货币成本的 50% 以上。为降低这一开销,作者提出 λ-trim:一个在保持正确性的前提下消除 Python 无服务器应用中冗余代码的系统。为最大化成本收益,λ-trim 利用无服务器典型计费模型,优先处理对延迟与内存占用影响显著的模块。其自动化流水线由静态分析器、面向无服务器计费模型定制的性能分析器以及去膨胀器组成,优化后的应用可直接部署在无服务器平台上,从而显著降低冷启动的延迟与成本。
In this paper, we focus on an often-overlooked component of serverless application cold starts: monetary costs and Function Initialization. Traditionally considered the user's responsibility, Function Initialization is billable and accounts for more than 50% of the monetary cost associated with cold starts in real-world machine-learning applications. We introduce λ-trim a system that optimizes Python serverless applications by eliminating redundant code while maintaining correctness. To maximize cost savings, λ-trim leverages the typical serverless pricing model to prioritize modules that significantly impact latency and memory usage. λ-trim features an automated pipeline comprising a static analyzer, a profiler specialized for the serverless pricing model, and a debloater. The optimized application can be directly deployed on serverless platforms, leading to substantial reductions in both latency and cost for cold starts.
@inproceedings{LiuPL025,
title = {<scp>λ-trim:</scp>
Optimizing Function Initialization in Serverless Applications With Cost-driven Debloating},
author = {Xuting Liu and Spyros Pavlatos and Yuhao Liu and Vincent Liu},
booktitle = {ASPLOS},
year = {2025},
doi = {10.1145/3676642.3736129}
}