论文标题
SFS:无服务器功能的智能操作系统调度
SFS: Smart OS Scheduling for Serverless Functions
论文作者
论文摘要
无服务器计算通过允许开发人员编写细粒度无服务器或云功能来构建和扩展云应用程序的新方法。云功能的执行持续时间通常是从几毫秒到数百秒的短距离。但是,由于由公共云的深层整合引起的资源争议,该功能执行持续时间可能会大大延长,并且无法准确地说明该函数的真实资源使用情况。我们观察到,对于开源FAAS平台(Openlambda)的大量扩增,功能持续时间可能是无法预测的。我们的实验表明,云功能的主机服务器的OS调度策略可能会对性能产生至关重要的影响。默认的Linux调度程序CFS(完全公平的调度程序)遗忘了工作负载,经常上下文切换短功能,导致周转时间比其服务时间更长。 我们建议使用SFS(智能功能调度程序),该SFS完全在用户空间中工作,并仔细协调现有的Linux FIFO和CFS调度程序,以大约最短剩余时间(SRTF)。 SFS使用两级调度,将新的过滤器策略与Linux CFS无缝结合在一起,以换取长时间功能的增加持续时间,从而显着改善短函数。我们在Linux用户空间中实现{\ proj}并将其移植到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 50x 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 {\proj} 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.