I was experimenting with CPU isolation and it seems I get a way more stable experience (no xruns) under load when I keep all my "non-audio"-stuff on a seperate CPU. Since the "isolcpus" kernel parameter approach is problematic for this because the scheduler doesnt load balance the isolated cores, I get good results using croups (v2). Heres my script to do it on my 4 core:
Code: Select all
#!/bin/bash
systemctl set-property --runtime system.slice AllowedCPUs=0
systemctl set-property --runtime user.slice AllowedCPUs=0
mkdir /sys/fs/cgroup/shield
echo 1-3 > /sys/fs/cgroup/shield/cpuset.cpus
echo $1 > /sys/fs/cgroup/shield/cgroup.procs
Run as root, give it a user shell PID as argument (you can find it using "echo $$") and all processes launched from this shell will operate on the reserved CPUs, uninterrupted by any system- or user-daemons
Let me know what you think,
I will put it on github once I make it a little nicer, just a proof of concept so far