- cpuset does not stop IRQs from using the user cpuset (CPUs 2,3). Ideally, to reduce latency, IRQs should be on a different CPU to the music player. My workaround is to edit
/etc/default/irqbalance and set IRQBALANCE_BANNED_CPUS=C (hex mask value, run in CPUs 0,1 not in CPUs 2,3)
- This may help with setting a new cpuset for a user process. CamillaDSP was started as a system process at boot. Manually shifted using
sudo cset proc --move --toset=user --pid 723 --threads
Confirmed move worked using cset shield --shield -vCode:cset: "user" cpuset of CPUSPEC(2-3) with 11 tasks running
USER PID PPID SPPr TASK NAME
-------- ----- ----- ---- ---------
root 723 1 Sf70 [camilladsp]
root 738 1 Sf70 [camilladsp]
root 746 1 Sf70 [camilladsp]
root 747 1 Sf70 [AlsaPlayback]
root 748 1 Sf70 [AlsaCapture]
root 2125 1 Soth [mpd]
root 2174 1 Soth [io]
root 2175 1 Sf40 [rtio]
root 2178 1 Soth [player]
root 2182 1 Soth [decoder]
root 2387 1 Sf40 [output]
cset: done - Some issues with existing cpuset, a few player processes were not shifted to the user cpuset
LMS + Squeezlite R2 : squeeze2upnp-x8 (using DLNA/UPnP bridge) remained in the system cpuset
LMS + upmpdcli : squeeze2upnp-x8, mpd remained in the system cpuset
Minimserver : uses Java which remained in the system cpuset
*****
Added 22-Jun
A few more notes
- Can move a few more kernel processes from user to system cpuset using
sudo cset shield -k on
While I heard no discernible difference with SQ, for completeness, should include this.
- With upmpdcli, it is not possible to shift the underlying mpd process from system to user cpuset. Given that upmpdcli is only a wrapper and the work is done by mpd, cpuset may not provide a SQ benefit for upmpdcli?
- Tried dedicating a cpu to LMS and another cpu to Squeezelite R2. No difference in SQ to running both LMS and Squeezelite R2 in same cpu.
- Similarly no difference in SQ with mpd and CamillaDSP running on same cpu or on separate individual cpus.
- However, with cpu intensive servers like Roon or HQplayer, there may be a benefit in running their players on a seperate cpu? Someone should test this.
- If mympd is enabled (coming in next release), should shift it from system to user cpuset. I do not use mympd and will disable it.