This guide provides instructions for running the SCX schedulers as a systemd service and checking its logs.
At the very beginning, configure the /etc/default/scx file:
in the SCX_SCHEDULER variable, select the scheduler you are interested in
in the SCX_FLAGS variable, specify the flags you want to add. To do this, execute and read what flags you can add.
scx_SCHEDNAME --help
To start the SCX scheduler at boot, you need to run the systemd service as root. Here are the steps:
systemctl enable scx.service
systemctl start scx.service
Alternatively, you can use a shortened version of these commands:
systemctl enable --now scx.service
systemctl status scx.service
It is possible to override the global scx settings using systemd environment variables SCX_SCHEDULER_OVERRIDE
and SCX_FLAGS_OVERRIDE
.
Example:
systemctl set-environment SCX_SCHEDULER_OVERRIDE=scx_rustland systemctl set-environment SCX_FLAGS_OVERRIDE="-s 10000" systemctl restart scx
If you want to restore the default value from the /etc/default/scx
file execute:
systemctl unset-environment SCX_SCHEDULER_OVERRIDE systemctl unset-environment SCX_FLAGS_OVERRIDE systemctl restart scx
The SCX schedulers do not log to the default journald namespace. Instead, they save logs in a dedicated sched-ext
namespace. This is where you should look for information about possible errors.
journalctl --namespace=sched-ext
journalctl --namespace=sched-ext --list-boots
journalctl --namespace=sched-ext --disk-usage