We are moving! New user registrations to this forum is now closed. Posting here will be disabled eventually. Please go to the new community for your Snakeoil OS support and other discussions. (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
#3
Some more information for next release of cpuset:
  1. 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)
  2. 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 -v  
    Code:
    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
  3. 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
Can confirm SQ improved with shifting IRQs to system cpuset and CamillaDSP to user cpuset.

*****
Added 22-Jun

A few more notes
  1.  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.
  2. 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?
  3. 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.
  4. Similarly no difference in SQ with mpd and CamillaDSP running on same cpu or on separate individual cpus.
  5. 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.
  6. 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.
[-] The following 2 users Like Snoopy8's post:
  • agent_kith, hkphantomgtr
Reply


Bookmarks

Messages In This Thread
RE: Extending cpuset to include user processes - by Snoopy8 - 20-Jun-2021, 07:15 PM

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



Users browsing this thread: 1 Guest(s)
[-]
Our Sponsors

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

[-]
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.