TIL using realtimekit you can get high nice levels for your programs as a user. how to set your current shell to nice -11:
$ busctl call org.freedesktop.RealtimeKit1 /org/freedesktop/RealtimeKit1 org.freedesktop.RealtimeKit1 MakeThreadHighPriorityWithPID tti -- $$ 0 '-11'
replace $$ with your PID if you don't want the current shell to be changed
you can even make some programs realtime, as long as they limit their maximum usage. so with a python session that you've run this in:
you can run from another shell:
$ busctl call org.freedesktop.RealtimeKit1 /org/freedesktop/RealtimeKit1 org.freedesktop.RealtimeKit1 MakeThreadRealtimeWithPID ttu -- 32630 0 20
replace 32630 with your python programs' PID and now it gets 200ms of execution time every period
each task having an equal amount of time can be a bit silly so linux will group tasks by default, or this can be done using cgroups. idk much about SCHED_DEADLINE but it's even harder than realtime
@jookia For realtime audio SCHED_FIFO is or at least was popular.
@murks yeah that's what i'm refering to as 'realtime' here
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!