Multi-resource Fair Scheduler in Linux
MetadataShow full item record
Resource management is one of the main responsibilities of operating systems. In Linux, the Completely Fair Scheduler (CFS) allocates CPU time to processes, allowing them to share CPU time. Although effective in allocating CPU time, CFS does not consider the consumption of other system resources (e.g., memory bandwidth, I/O devices, and power supply). It has been shown that the contention on memory bandwidth has a significant impact on the performance of processes. A proper solution for memory bandwidth allocation should consist of a source throttling part and a memory request scheduler. In this work, we consider the multi-resource fair scheduling problem. We focus on CPU and memory bandwidth as the main resources. We take a software-hardware co-design approach to design and implement our proposed multi-resource fair scheduler, Dominant Resource Fair Queueing Scheduler (DRFQS). First, we propose simple modifications to the memory controller to monitor memory bandwidth usage per process and schedule memory requests. Second, we propose DRFQS to replace the CFS in Linux. DRFQS schedules processes based on the dominant resource fair queueing (DRFQ) method. DRFQS utilizes the memory monitoring module and controls the memory scheduler in the modified memory controller. We implement our proposed memory controller design in the gem5 simulator and implement our CPU scheduler based on Brain Fuck Scheduler (BFS) in the Linux kernel v4.8. We evaluate our design and implementation by: (i) measuring allocation of CPU time and mmoery bandwidth, and comparing them with the desired allocations, (ii) running benchmarks under memory bandwidth contention and comparing their performance with the original hardware and software and with our proposed modifications. Our evaluation demonstrates that our design guarantees fairness while achieving high performance. We reduce the running time of memory-intensive benchmarks under memory bandwidth contention by close to 50%.
Cite this version of the work
Zehan Gao (2022). Multi-resource Fair Scheduler in Linux. UWSpace. http://hdl.handle.net/10012/18842