We have moved! This forum is now read only. (June 03)

New community website: https://community.snakeoil-os.net (June 03)

Join us in the new community by Creating a new account. (June 04)


Extending cpuset to include user processes
#6
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.
Reply


Messages In This Thread
RE: Extending cpuset to include user processes - by Snoopy8 - 10-Aug-2021, 07:17 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  cpuset and TOP JD1 4 4,124 03-Sep-2018, 06:29 PM
Last Post: JD1



Users browsing this thread: 1 Guest(s)
[-]
Our Sponsors
{myadvertisements[zone_4]}

[-]
Latest Threads
Android Firefox issues with forum
Last Post: agent_kith
10-Jun-2025 04:45 PM
» Replies: 21
» Views: 2311
[split] Possible To Load Snakeoil OS in ...
Last Post: Snoopy8
09-Jun-2025 06:43 AM
» Replies: 14
» Views: 1674
Snakeoil 1.4.3 (High End U3)
Last Post: hkphantomgtr
05-Jun-2025 03:58 PM
» Replies: 67
» Views: 9398
Snakeoil with Ubuntu Desktop ?
Last Post: Snoopy8
02-Jun-2025 09:38 AM
» Replies: 8
» Views: 958
Add IR remote control using Flirc USB in...
Last Post: Snoopy8
31-May-2025 03:50 PM
» Replies: 5
» Views: 712
Work In Progress: 1.4.4
Last Post: hkphantomgtr
29-May-2025 11:44 PM
» Replies: 44
» Views: 5496
SQ difference - Raspberry Pi vs x86_64?
Last Post: Snoopy8
27-May-2025 02:16 PM
» Replies: 42
» Views: 5892
Snakeoil 1.4.0 (High End)
Last Post: aabman
25-May-2025 11:35 AM
» Replies: 93
» Views: 15604
new install issues
Last Post: carlodim
23-May-2025 09:56 AM
» Replies: 42
» Views: 4844
Is this project still alive?
Last Post: agent_kith
20-May-2025 03:11 PM
» Replies: 10
» Views: 1298

[-]
SnakeoilOS Mission Statement

Our mission is to create a free to use computer OS that is easy to install, intuitive to operate and play music that will connect and engage with you emotionally.

SnakeoilOS gives you the freedom to spend more time on listening, enjoying and exploring music. Wasting time on computers is now a thing of the past! Everything is constantly evolving/improving. Please check back often for updates.

If you like this project, do show your support with a small token donation. All donations collected will be used to run this website, and for purchasing new equipment for the project.