How the Linux scheduler deals with many cores
Summary
Hackaday checks the claim of an eight-core limit and explains time slices, scheduler domains and scaling assumptions in a nuanced way. The change under discussion was about fifteen years old. Linux runs in production on large systems with many CPUs.
Ideas
- A constant limits certain time slice calculations to eight CPUs.
- The scheduler nevertheless supports systems with considerably more cores.
- Load balancing works across hierarchical scheduler domains.
Insights
- A single constant in the code does not prove a system limit.
- Performance criticism needs measurements and an understanding of the complete algorithm.
Recommendations
- Check sensational claims against the source code and with benchmarks.
- Measure scheduler behaviour under the actual workload.
References
Links to the original source and the Web Archive open in a new tab.