SFS: Smart OS Scheduling for Serverless Functions

SFS: Smart OS Scheduling for Serverless Functions
复制标题

DOI:
10.1109/sc41404.2022.00047
复制
发表时间:
2022-09
期刊:
SC22: International Conference for High Performance Computing, Networking, Storage and Analysis
影响因子:
--
通讯作者:
Yuqi Fu;Li Liu;Haoliang Wang;Yue Cheng;Songqing Chen
Yuqi Fu;Li Liu;Haoliang Wang;Yue Cheng;Songqing Chen
中科院分区:
其他
文献类型:
--
作者:
Yuqi Fu;Li Liu;Haoliang Wang;Yue Cheng;Songqing Chen

文献摘要

相似文献

通过允许开发人员编写细粒度的无服务器或云功能,无服务器计算提供了一种构建和扩展云应用程序的新方法。云功能的执行时间通常很短,从几毫秒到数百秒不等。但是,由于公有云深度整合导致的资源争夺,功能的执行时间可能会大大延长,无法准确反映功能的真实资源使用情况。我们观察到,对于开源FaaS平台(OpenLambda),函数持续时间可能高度不可预测,其放大幅度超过50倍。我们的实验表明,云功能主机服务器的操作系统调度策略对性能有至关重要的影响。默认的Linux调度器CFS(完全公平调度器)忽略了工作负载,经常在上下文切换短的函数,从而导致一个比它们的服务时间长得多的转换时间。我们提出SFS(智能函数调度器),它完全在用户空间中工作,并精心编排现有的Linux FIFO和CFS调度器,以接近最短剩余时间优先(SRTF)。SFS使用两级调度,无缝地将新的FILTER策略与Linux CFS结合在一起,以换取长函数持续时间的增加,从而显著提高短函数的性能。我们在Linux用户空间中实现SFS,并将其移植到OpenLambda。评价结果表明,与CFS相比,SFS显著提高了短功能的持续时间,对较长功能的影响较小。
Serverless computing enables a new way of building and scaling cloud applications by allowing developers to write fine-grained serverless or cloud functions. The execution duration of a cloud function is typically short-ranging from a few milliseconds to hundreds of seconds. However, due to resource contentions caused by public clouds' deep consolidation, the function execution duration may get significantly prolonged and fail to accurately account for the function's true resource usage. We observe that the function duration can be highly unpredictable with huge amplification of more than 50× for an open-source FaaS platform (OpenLambda). Our experiments show that the OS scheduling policy of cloud functions' host server can have a crucial impact on performance. The default Linux scheduler, CFS (Completely Fair Scheduler), being oblivious to workloads, frequently context-switches short functions, causing a turnaround time that is much longer than their service time. We propose SFS (Smart Function Scheduler), which works entirely in the user space and carefully orchestrates existing Linux FIFO and CFS schedulers to approximate Shortest Remaining Time First (SRTF). SFS uses two-level scheduling that seamlessly combines a new FILTER policy with Linux CFS, to trade off increased duration of long functions for significant performance improvement for short functions. We implement SFS in the Linux user space and port it to OpenLambda. Evaluation results show that SFS significantly improves short functions' duration with a small impact on relatively longer functions, compared to CFS.