Realtime
Scheduling in Linux
Basic clarification of Linux RealtimeKit, rtkitctl, and chrt. Learn how to manage low-latency process scheduling for audio and multimedia workflows safely.
1. RealtimeKit & PID Basics
On Linux, the PID of a running process can be found with:
A more flexible alternative is:
RealtimeKit, usually provided by the rtkit package and the rtkit-daemon service, is a Linux D-Bus system service. It allows normal user applications to request realtime scheduling in a safer way, without running the whole application as root.
RealtimeKit is commonly used by audio and multimedia software where low latency is important. Typical examples are audio servers and audio applications using PipeWire, PulseAudio, JACK-related components, or similar low-latency audio workflows.
The rtkitctl utility
The important clarification is that rtkitctl is mainly a control utility for the RealtimeKit daemon itself. It is not normally used to manually move an arbitrary process PID into realtime scheduling.
Common rtkitctl commands include:
rtkitctl –reset-known
rtkitctl –reset-all
rtkitctl –suspend
rtkitctl –resume
rtkitctl –exit
sudo rtkitctl --move 12345
2. Using chrt
For manually changing the scheduling policy of an existing process, the correct tool is usually chrt.
To check the current scheduler policy of a process:
To set process 12345 to SCHED_RR with realtime priority 50:
# Short form:
sudo chrt -p -r 50 12345
If the process has multiple threads and you want to apply the change to all of them:
# Short form:
sudo chrt -a -p -r 50 12345
To reset the process back to the normal Linux scheduling policy:
3. Scheduling Policies & Priorities
Scheduling policies
- SCHED_OTHER / SCHED_NORMAL: The default Linux scheduling policy for normal applications.
- SCHED_BATCH: Intended for non-interactive CPU-bound tasks where latency is not important.
- SCHED_IDLE: Intended for very low-priority tasks that should only run when the CPU is otherwise idle.
- SCHED_RR: Realtime round-robin scheduling policy. Threads with the same realtime priority share CPU time in time slices. This is often useful for audio and multimedia workloads.
- SCHED_FIFO: Realtime first-in, first-out scheduling policy. A running SCHED_FIFO thread continues until it blocks, exits, yields, or is preempted by a higher-priority realtime thread. This can be risky if misused, because a badly behaving realtime thread can make the system unresponsive.
Realtime priority range
For SCHED_RR and SCHED_FIFO, the realtime priority range is:
Maximum priority: 99
Priority 0 is not valid for SCHED_RR or SCHED_FIFO. Normal scheduling policies such as SCHED_OTHER, SCHED_BATCH and SCHED_IDLE use priority 0.
4. Compatibility & Installation
Linux distribution compatibility
This applies to common Linux distributions such as Debian, Ubuntu, Linux Mint, Fedora, RHEL, Rocky Linux, AlmaLinux, Arch, Manjaro, EndeavourOS and openSUSE, assuming systemd, D-Bus and rtkit are available.
It is not a good fit for WSL, Android, minimal containers, or non-Linux systems such as macOS or BSD.
Installation examples
Debian, Ubuntu, Linux Mint:
Fedora, RHEL, Rocky Linux, AlmaLinux:
Arch, Manjaro, EndeavourOS:
openSUSE:
5. Service Management & Summary
Checking the RealtimeKit service
Start it manually if needed:
Enable it at boot if your distribution does not already manage it automatically:
Practical recommendation
For modern Linux audio and low-latency work, the preferred approach is to let the audio application or audio server request realtime scheduling through RealtimeKit. Use chrt mainly for testing, debugging, or special manual tuning.