Optimizing Linux Scheduling Based on Global Runqueue with SCX

In Linux kernel version 6.6, the Earliest Eligible Virtual Deadline First (EEVDF) scheduler was introduced as the new default scheduler. However, due to its high computational complexity, it may not be suitable for all application scenarios. In cases where there are a large number of short-term tasks or frequent task communication, EEVDF can incur excessive context switch overhead and performance degradation. To address these issues, we propose a lightweight scheduling strategy named SRAND. Leveraging the programmable scheduling framework ‘sched_ext’ and employing BPF technology, we have implemented a strategy based on global and local run queues. This strategy utilizes a five-level BPF mapped queue to partition tasks with different virtual runtimes. Tasks with smaller virtual runtimes are placed into a FIFO-type global queue first, enabling priority scheduling for tasks with smaller virtual runtimes. Additionally, we monitor CPU idle states and allocate tasks in a timely manner, enhancing task responsiveness while reducing scheduling complexity. It is worth noting that our strategy integrates user-space scheduling policies into the kernel via an eBPF program loader, thus eliminating the need for kernel code modifications. By implementing the SRAND strategy, we have observed significant improvements compared to Linux's default scheduling strategy EEVDF. Specifically, our proposed strategy averages an 11.83% reduction in process context switch time and an overall performance improvement of 7.02% in stress tests, while maintaining satisfactory load balancing.

Authors

Institutions

Publication Details

Published
2024-10-06
DOI
https://doi.org/10.1109/smc54092.2024.10831230
Primary Topic
Distributed and Parallel Computing Systems
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Optimizing Linux Scheduling Based on Global Runqueue with SCX

Juncong Lin, Guilin Li, Xing Gao, Tang Qinan
Distributed and Parallel Computing Systems
article

Optimizing Linux Scheduling Based on Global Runqueue with SCX

Juncong Lin, Guilin Li, Xing Gao, Tang Qinan
article en

Abstract

In Linux kernel version 6.6, the Earliest Eligible Virtual Deadline First (EEVDF) scheduler was introduced as the new default scheduler. However, due to its high computational complexity, it may not be suitable for all application scenarios. In cases where there are a large number of short-term tasks or frequent task communication, EEVDF can incur excessive context switch overhead and performance degradation. To address these issues, we propose a lightweight scheduling strategy named SRAND. Leveraging the programmable scheduling framework ‘sched_ext’ and employing BPF technology, we have implemented a strategy based on global and local run queues. This strategy utilizes a five-level BPF mapped queue to partition tasks with different virtual runtimes. Tasks with smaller virtual runtimes are placed into a FIFO-type global queue first, enabling priority scheduling for tasks with smaller virtual runtimes. Additionally, we monitor CPU idle states and allocate tasks in a timely manner, enhancing task responsiveness while reducing scheduling complexity. It is worth noting that our strategy integrates user-space scheduling policies into the kernel via an eBPF program loader, thus eliminating the need for kernel code modifications. By implementing the SRAND strategy, we have observed significant improvements compared to Linux's default scheduling strategy EEVDF. Specifically, our proposed strategy averages an 11.83% reduction in process context switch time and an overall performance improvement of 7.02% in stress tests, while maintaining satisfactory load balancing.

Xiamen University (CN)
Openalex Percentile: Top 70%
Distributed and Parallel Computing Systems
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.