Part III. Had the following CPUsets (Intel NUC has 4 CPUs)
Code:
$cset set -l
cset:
Name CPUs-X MEMs-X Tasks Subs Path
------------ ---------- - ------- - ----- ---- ----------
root 0-3 y 0 y 207 4 /
player 2 y 0 n 7 0 /player
system 0 n 0 n 31 0 /system
server 3 y 0 n 5 0 /server
irq 1 y 0 n 1 0 /irq
The player CPUset ran the following mpd processes:
Code:
$ cset proc -l -s player
cset: "player" cpuset of CPUSPEC(2) with 7 tasks running
USER PID PPID SPPr TASK NAME
-------- ----- ----- ---- ---------
root 401 2 Sr55 [irq/127-eth0]
root 1082 1 Sr75 [mpd]
root 1083 1 Sr75 [io]
root 1084 1 Sr75 [rtio]
root 1090 1 Sr75 [player]
root 1091 1 Sr75 [decoder]
root 1379 1 Sr75 [output]
The server CPUset was running DSP:
Code:
$ cset proc -l -s server
cset: "server" cpuset of CPUSPEC(3) with 5 tasks running
USER PID PPID SPPr TASK NAME
-------- ----- ----- ---- ---------
root 589 1 Sr80 [camilladsp]
root 628 1 Sr80 [camilladsp]
root 631 1 Sr80 [camilladsp]
root 632 1 Sr80 [AlsaPlayback]
root 633 1 Sr80 [AlsaCapture]
The IRQ CPUset was running the USB output:
Code:
$ cset proc -l -s irq
cset: "irq" cpuset of CPUSPEC(1) with 1 task running
USER PID PPID SPPr TASK NAME
-------- ----- ----- ---- ---------
root 87 2 Sr85 [irq/124-xhci_hc]
Note that processes had increasing proprities down the music chain. IRQ for Ethernet: 55, feeding Mpd: 75, then processed by CamillaDSP:80 and output to IRQ for USB: 85. This ensured that downstream processes were always ready to accept inputs.
With IRQBalance removed, IRQs ran in CPU0 (System CPUset). The USB IRQ, which was the most CPU intensive task, ran on its own CPU. The Ethernet IRQ, being the input for mpd, ran on the same CPU. Further optimisation was done by moving some kernel threads to CPU0 using "cset proc -k -f root -t system".
In addition, had a 5.10 RT Kernel (built my own), did BIOS tweaks (removed hyperthreading, virtual machine settings, unnecessary ports & features) and ran DSP (convolution filters).
With mpd playing music, ran "cyclictest -t4 -p 90 -N -s -i 10000 -l 10000 -q" twenty times, with the following results.
Maximum latencies were typically 5 to 7 µs, which is excellent. CPU 0 had three 8 µs and one 10 µs max latency, which is not an issue because it ran everything not directly associated with music playback. However, CPU 1 (USB IRQ) and CPU 2 (mpd) had one 9 µs max latency, which suggests there could be room for improvement? Will discuss things that require further investigation in a follow up post.
In summary, delighted with the tweaks that delivered SQ improvement for SnakeOil.