- EverythingDevOps
- Posts
- 🐧A Major Change Inside The Linux Scheduler
🐧A Major Change Inside The Linux Scheduler
Technical Notes From Jubril
Tech moves fast, but you're still playing catch-up?
That's exactly why 100K+ engineers working at Google, Meta, and Apple read The Code twice a week.
Here's what you get:
Curated tech news that shapes your career - Filtered from thousands of sources so you know what's coming 6 months early.
Practical resources you can use immediately - Real tutorials and tools that solve actual engineering problems.
Research papers and insights decoded - We break down complex tech so you understand what matters.
All delivered twice a week in just 2 short emails.
Hey there,
It's Jubrillll!!!!!!
A few weeks ago, I posted on LinkedIn about exploring the Linux process scheduler, specifically the shift from CFS to EEVDF in kernel 6.6. The response caught me off guard. My DMs filled up with questions, stories from engineers dealing with latency issues, and requests to go deeper.
So I figured, why not expand on it here?
For those who didn't catch the original post, here's the screenshot

Was this email forwarded to you? Subscribe here to get your weekly updates directly into your inbox.
How CFS managed processes
Central to how linux determines what process runs on the CPU is a scheduling algorithm that makes use of “policies” to determine how much time, resources and priority any given process is allocated.
Linux Scheduling polices
Scheduling policies define how runnable tasks are ordered and under what rules they compete for CPU time. While the scheduler implementation (CFS or EEVDF) determines how fairness is computed, scheduling policies determine which class of tasks the scheduler is dealing with and the constraints it must respect.
Linux divides scheduling into normal (processes which are time-shared) and real-time domains, with policies mapped to distinct scheduler classes.
SCHED_NORMAL (SCHED_OTHER)
SCHED_NORMAL is the default policy for most user-space processes. Under CFS, tasks in this class competed based on virtual runtime (vruntime), with niceness values influencing how quickly vruntime advanced relative to other tasks.
With EEVDF, the same policy now maps to tasks receiving virtual deadlines derived from their weight (niceness) and eligibility window, but the goal remains unchanged: proportional CPU sharing with reasonable interactivity.
SCHED_BATCH
SCHED_BATCH is a variant of normal scheduling intended for CPU-bound, non-interactive workloads. Tasks in this class are deprioritized for wake-up latency and interactivity, allowing the scheduler to favor throughput over responsiveness.
Batch tasks still participate in fair scheduling but are less likely to preempt interactive workloads. This makes it useful for background jobs where completion time matters more than responsiveness.
SCHED_IDLE
SCHED_IDLE represents the lowest possible scheduling priority. Tasks in this class are only scheduled when no other runnable tasks exist on the CPU.
This policy is explicitly designed for work that should never interfere with normal system activity.
Real-time scheduling: SCHED_FIFO and SCHED_RR
Real-time policies are slightly different. Processes scheduled with real-time policies always take precedence over normal scheduling classes.
SCHED_FIFO (First-In, First-Out) schedules tasks strictly by priority. Once a task is running, it continues executing until it blocks, yields, or is preempted by a higher-priority real-time task. There is no time for slicing.
SCHED_RR (Round-Robin) is similar to FIFO but introduces a fixed time quantum, allowing tasks of equal priority to rotate execution.
Running cat /proc/sys/kernel/sched_rr_timeslice_ms yielded the following output on ubuntu 24.04 yielded the following output

Meaning every 100ms the CFS scheduler will perform a context switch and allow another process to execute. It is also important to note that this value does not represent the time slice used by the Completely Fair Scheduler (CFS). The sched_rr_timeslice_ms parameter applies only to the real-time Round Robin scheduler (SCHED_RR). It defines how long a real-time task (task that requires low latency such as audio processing) may run before the kernel rotates to the next task of equal priority.
For normal user processes managed by CFS (SCHED_OTHER), Linux does not use a fixed time slice. Instead, CFS dynamically allocates CPU time based on system load and task priority, using a fairness model driven by virtual runtime (vruntime). Context switches occur in response to timer interrupts, task wakeups, blocking events, or preemption conditions, rather than when a fixed quantum expires.

Did you find this issue interesting? |
And it’s a wrap!
See you Friday for the week’s news, upcoming events, and opportunities.
If you found this helpful, share this link with a colleague or fellow DevOps engineer.
Divine Odazie
Founder of EverythingDevOps

