大自由带来大机会:重新思考无服务器函数的资源分配
With Great Freedom Comes Great Opportunity: Rethinking Resource Allocation for Serverless Functions
摘要:
当前的无服务器产品为用户提供了有限的灵活性,可以通过将内存和CPU资源耦合在一起或根本不提供旋钮来配置分配给其函数调用的资源。这些配置选项简化了代表用户的资源分配决策,但同时也造成了资源效率低下的部署。在本文中,我们采取原则性的方法来解决无服务器函数的资源分配问题,允许以自动的方式进行这种选择,从而实现性能和成本的最佳组合。特别是,我们系统地探讨了分离内存和CPU资源分配以及支持使用不同VM类型所带来的机会。我们在性能和成本之间找到了丰富的权衡空间。提供商可以通过多种方式使用这一点:从向用户公开所有这些参数,到从用户那里获得对性能和成本的偏好,或者简单地以较低的成本提供相同的性能。这种灵活性还可以使提供商优化其资源利用率,并实现具有可预测性能的经济高效的服务。我们的研究结果表明,通过解耦内存和CPU分配,有可能比当前无服务器产品中常见的预设耦合配置降低高达40%的执行成本。同样,正确选择VM实例类型可以提供高达50%的执行时间。此外,我们证明,提供商可以利用不同的实例类型相同的功能,以最大限度地提高资源利用率,同时提供性能的10-20%的最佳资源配置为每个相应的功能。
英文摘要:
Current serverless offerings give users a limited degree of flexibility for configuring the resources allocated to their function invocations by either coupling memory and CPU resources together or providing no knobs at all. These configuration choices simplify resource allocation decisions on behalf of users, but at the same time, create deployments that are resource inefficient. In this paper, we take a principled approach to the problem of resource allocation for serverless functions, allowing this choice to be made in an automatic way that leads to the best combination of performance and cost. In particular, we systematically explore the opportunities that come with decoupling memory and CPU resource allocations and also enabling the use of different VM types. We find a rich trade-off space between performance and cost. The provider can use this in a number of ways: from exposing all these parameters to the user, to eliciting preferences for performance and cost from users, or by simply offering the same performance with lower cost. This flexibility can also enable the provider to optimize its resource utilization and enable a cost-effective service with predictable performance. Our results show that, by decoupling memory and CPU allocation, there is potential to have up to 40% lower execution cost than the preset coupled configurations that are the norm in current serverless offerings. Similarly, making the correct choice of VM instance type can provide up to 50% better execution time. Furthermore, we demonstrate that providers can utilize different instance types for the same functions to maximize resource utilization while providing performance within 10-20% of the best resource configuration for each respective function.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。