The EEVDF scheduler (Earliest Eligible Virtual Deadline First) is the default CPU scheduler for normal processes in the Linux kernel since version 6.6, released in late 2023. It decides which runnable task gets the CPU next by choosing, among tasks that have not received more than their fair share, the one whose virtual deadline is earliest.
EEVDF replaced the selection logic of the Completely Fair Scheduler (CFS) while keeping its weight-based model of fairness. The algorithm itself dates from a 1995 academic paper by Ion Stoica and Hussein Abdel-Wahab; Peter Zijlstra adapted it for Linux to give latency-sensitive tasks a principled way to run sooner without hand-tuned heuristics.
How EEVDF selects the next task
EEVDF combines two tests: eligibility decides which tasks may run, and the virtual deadline decides which eligible task runs first. Both are expressed in virtual time, which advances more slowly for tasks with higher weight, so heavier tasks receive proportionally more real CPU time.
Each task tracks its lag, the difference between the CPU service it should have received in an ideal fair system and the service it actually received. A task with lag of zero or more is eligible, because it is owed time or is exactly even. Each task also has a requested time slice; its virtual deadline equals its eligible time plus the slice divided by its weight. The scheduler picks the eligible task with the smallest virtual deadline.
The table below defines the quantities that drive these decisions.
| Quantity | Meaning | Effect on scheduling |
|---|---|---|
| Weight | Share derived from the nice value | Higher weight slows virtual time growth |
| Virtual runtime | Weighted CPU time consumed | Compared with the queue average |
| Lag | Ideal service minus received service | Non-negative lag makes a task eligible |
| Slice | Requested run length per turn | Shorter slice gives an earlier deadline |
| Virtual deadline | Eligible time plus slice over weight | Earliest eligible deadline runs next |
In the kernel, runnable tasks are kept in an augmented red-black tree, which lets the scheduler find the earliest eligible deadline in logarithmic time rather than scanning every task.
Weights, nice values and time slices
EEVDF keeps the same nice-to-weight table that CFS used. A task at nice 0 has a weight of 1024, and each nice step changes the weight by roughly 25 percent, which corresponds to about a 10 percent change in CPU share between two competing tasks.
The slice controls latency, not total bandwidth. A task that asks for a short slice gets an earlier deadline and therefore runs sooner, but it also runs for a shorter period each time, so its long-run share stays defined by weight. The default base slice is 0.75 ms, scaled up with the number of CPUs to a few milliseconds on larger systems.
| Parameter change | Long-run CPU share | Response latency |
|---|---|---|
| Lower nice value | Increases | Improves indirectly |
| Higher nice value | Decreases | Worsens indirectly |
| Shorter requested slice | Unchanged | Improves directly |
| Longer requested slice | Unchanged | Worsens, fewer context switches |
Since kernel 6.12, a task can request a custom slice through sched_setattr, giving applications such as audio servers an explicit latency hint instead of relying on a lower nice value.
EEVDF compared with the Completely Fair Scheduler
The main difference is that CFS always ran the task with the smallest virtual runtime, then relied on several heuristics and tunables to decide when a waking task could preempt the current one. EEVDF replaces those heuristics with the eligibility and deadline rules, which give provable latency bounds.
| Aspect | Completely Fair Scheduler | EEVDF scheduler |
|---|---|---|
| Selection rule | Smallest virtual runtime | Earliest eligible virtual deadline |
| Latency control | Wakeup preemption heuristics | Per-task slice and deadline |
| Main tunables | sched_latency, min_granularity, wakeup_granularity | base_slice only |
| Sleeper handling | Placement heuristics on wakeup | Lag preserved and decayed |
| Fairness model | Weight-based | Weight-based, unchanged |
EEVDF applies only to the SCHED_NORMAL and SCHED_BATCH policies. Real-time policies such as SCHED_FIFO and SCHED_RR, and the SCHED_DEADLINE class, are handled by separate scheduling classes and always take precedence over normal tasks.
Lag handling and sleeping tasks
A difficult part of any fair scheduler is what to do with a task that sleeps and wakes up. EEVDF remembers the lag a task had when it left the run queue and restores it on wakeup, so a task cannot gain an unfair burst merely by sleeping.
Later kernels added delayed dequeue: a task with negative lag that goes to sleep stays logically on the queue until its lag returns to zero. This prevents tasks from escaping their debt by sleeping briefly, a pattern that otherwise lets them reclaim time they have already consumed.
Practical impact, tuning and common misconceptions
For most workloads, the switch to EEVDF was largely invisible, with small latency improvements for interactive tasks. Some throughput-oriented benchmarks showed regressions after the change, mainly from more frequent preemption, and several were addressed in later kernel releases.
Administrators can inspect the base slice in the scheduler debug interface, but changing it is rarely the right first step. Process priority, CPU affinity and cgroups usually solve contention problems more predictably. The table below corrects frequent misunderstandings.
| Misconception | Reality |
|---|---|
| EEVDF is a real-time scheduler | It serves normal tasks; real-time classes are separate |
| A shorter slice grants more CPU time | It improves latency, while weight sets the share |
| Old CFS tunables still apply | Most were removed in kernel 6.6 |
| EEVDF replaced all of CFS | Load balancing and group scheduling largely remain |
| Sleeping tasks get bonus priority | Lag is preserved, so sleeping earns no extra credit |
The simple explanation
A computer usually has more programs wanting to run than processor cores to run them, so the system keeps taking turns. The EEVDF scheduler is the referee that decides whose turn comes next.
It follows two rules. First, only programs that have not already had more than their fair share may go. Second, among those, the one with the most urgent finishing time goes first. Programs that ask for short turns, such as a music player, get served quickly, while long-running jobs still receive their full share over time.
How it is used in practice
A developer workstation running Linux 6.12 compiles a large project with 16 parallel jobs while the user joins a video call. All the compiler processes and the audio server run under the normal policy, so EEVDF arbitrates between them.
The audio server wakes every few milliseconds, runs briefly and sleeps again. Because it uses little CPU, it is almost always eligible with non-negative lag, and its short requested slice gives it an early virtual deadline, so it is picked within a fraction of a millisecond after waking. The compiler processes, which consume full slices, receive the remaining CPU time in proportion to their weights. The result is that the build finishes in about the same time as on an idle desktop while the call audio stays free of dropouts, without any manual change to nice values.