SFS: Smart OS Scheduling for Serverless Functions

Yuqi Fu, Li Liu, Haoliang Wang, Yue Cheng, Songqing Chen
9/4/2022
cs.OS

Official code: ds2-lab/SFS (14 stars, Python, last commit 2022-12-15).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

ds2-lab/SFSOfficial100%

SFS: A Smart OS Scheduler for Serverless Function Workloads (SC'22)

146Python, PerlAug 23, 20223 years ago

Similar Papers

Cite this paper

@article{fu2022sfs,
  title  = {SFS: Smart OS Scheduling for Serverless Functions},
  author = {Yuqi Fu and Li Liu and Haoliang Wang and Yue Cheng and Songqing Chen},
  year   = {2022},
  eprint = {2209.01709},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2209.01709}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2209.01709.svg)](https://codeofpaper.com/paper/2209.01709)

Discussion