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
- Juncong Lin (ORCID: https://orcid.org/0000-0001-6500-6655)
- Guilin Li (ORCID: https://orcid.org/0000-0001-7301-5391)
- Xing Gao (ORCID: https://orcid.org/0000-0002-0401-5125)
- Tang Qinan
Institutions
- Xiamen University (CN)
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