Friday, February 14, 2025

Ubuntu 25.04 is now sched_ext ready

Ubuntu 25.04 Plucky Puffin now ships a linux-generic kernel based on 6.12, which means that sched_ext is supported out of the box! 🎉

This allows Ubuntu users to easily run multiple pluggable BPF schedulers at runtime, without needing to recompile a custom kernel.

Check your kernel version first

Before diving in, make sure you are actually running a 6.12 (or newer) kernel:

$ uname -r

If you see something like this:

6.12.0-15-generic

You’re good to go!

Examples

You can install and run scx_bpfland, a scheduler designed to improve system responsiveness:

$ cargo install scx_bpfland
$ sudo ~/.cargo/bin/scx_bpfland

Then simply press CTRL+c to stop the program and restore the default kernel scheduler.

If you’re looking for a scheduler optimized for gaming, you can try scx_lavd:

$ cargo install scx_lavd
$ sudo ~/.cargo/bin/scx_lavd

For audio, multimedia, or soft real-time workloads, scx_flash might be a better fit:

$ cargo install scx_flash
$ sudo ~/.cargo/bin/scx_flash

Alternatively, you can try scx_rusty, a hybrid scheduler with a user-space load-balancer written in Rust:

$ cargo install scx_rusty
$ sudo ~/.cargo/bin/scx_rusty

And if you’re feeling brave, you can try scx_rustland, a scheduler fully implemented in Rust that runs as a regular user-space process:

$ cargo install scx_rustland
$ sudo ~/.cargo/bin/scx_rustland

That’s it! You’re now running a sched_ext scheduler on your Ubuntu system.

What’s next?

Apart from always improving and optimizing these schedulers, we are also focusing at better integrating them into the major Linux distributions, through proper packaging, etc.

In the future, it would be nice to have application-driven schedulers, where apps can directly request a specific scheduler, that is automatically loaded by a system daemon. For example, imagine Steam automatically loading scx_lavd, Chrome requesting scx_bpfland, or a web server reverting to the default kernel scheduler, all of this dynamically, adapting to the particular workload's needs.