[论文解读] Sizeless: Predicting the optimal size of serverless functions
该论文提出Sizeless方法,仅通过单一内存配置的监控数据即可预测无服务器函数的最佳内存大小,从而无需耗时的性能测试。其平均预测误差为15.3%,在91.3%的函数中选中最佳或次佳内存大小,使AWS上的平均速度提升39.7%,成本降低2.6%。
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%.
研究动机与目标
- 解决无服务器函数中手动且次优的内存大小配置问题,该问题显著影响成本与性能。
- 消除内存大小优化中对专用性能测试的需求,此类测试耗时且难以维护。
- 使云提供商能够规模化提供自动化内存大小推荐,类似AWS Compute Optimizer。
- 开发一种模型,仅使用少量监控数据即可从合成数据泛化到真实世界的无服务器应用。
- 通过自动化开发人员最后需手动管理的资源管理任务——资源大小配置,真正实现无服务器计算。
提出的方法
- 使用合成无服务器函数生成器,通过组合代表性代码片段生成2,000个多样化函数。
- 在AWS Lambda上,对每个合成函数在六种内存大小下测量资源消耗和执行时间。
- 训练一个多目标回归模型,仅使用单一内存大小的监控数据,预测所有内存大小下的执行时间。
- 该模型利用单一配置下的执行时间与资源指标(如CPU、内存、I/O)推断其他配置下的性能表现。
- 该方法在四个真实世界的无服务器应用上进行评估,使用单一内存大小的监控数据预测并优化其他配置。
- 该模型在训练九个月后于一个生产应用上进行验证,证明其长期泛化能力。
实验结果
研究问题
- RQ1在仅使用单一内存大小监控数据的前提下,基于合成无服务器函数训练的模型能否准确预测多种内存大小下的执行时间?
- RQ2此类模型能否在无需专用性能测试的情况下,为真实世界的无服务器函数识别出最佳或接近最佳的内存大小?
- RQ3与默认或次优内存配置相比,该模型在执行时间与成本方面能降低多少?
- RQ4当模型在合成数据上训练并在数月后测试时,其在真实应用上的泛化能力如何?
- RQ5云提供商能否将此方法规模化部署,以自动化提供内存大小推荐?
主要发现
- 基于单一内存大小的监控数据,该模型对其他内存大小的执行时间预测平均误差为15.3%。
- 在79.0%的无服务器函数中,该模型选中了最佳内存大小;在12.3%的函数中选中了次佳大小,合计91.3%的函数获得了接近最优的配置。
- 所选内存大小使所评估应用的平均速度提升39.7%。
- 与默认或次优配置相比,该方法同时将平均成本降低2.6%。
- 该模型能有效泛化到真实世界应用,包括在收集训练数据九个月后仍表现良好的一个生产应用。
- 该方法使云提供商能够在不运行用户函数性能测试的前提下,提供自动化内存大小推荐。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。