cpuset and TOP
#1
Hi Agent Kith,
I'm keen to do more with CPU affinity. Ultimately, it would be great if there was something like a 3rd group that could reserve a CPU for special user defined PIDs or IRQs.
[I'm ignorant about any differences between PIDs and IRQs in this context]

First up, could you modify TOP to show the last used CPU?
Currently, I ssh TOP, hit F, scroll down to P, hit space and then escape to see this info in Terminal.

The main consumer of CPU power in my system is irq/127-xhci_hc
I'm guessing this relates to the USB output to my DAC. That is the one for which I'd like to separately assign a CPU core.

For many weeks, I have assigned CPU#3 to User, leaving #0, #1 & #2 for System. Initially when I started playing with cpuset and monitoring last used CPU, I saw that IRQ127-xh followed system (CPU#0, 1 or 2). Later it seemed to always follow User (always on CPU#3 for weeks once stopped making changes in cpuset).  Today, I changed to CPU#2 & CPU#3 for User and notiiced that IRQ127-xh was using the system cores again. Back to User=CPU#3 only...IRQ still using System cores...restart...now IRQ pinned to User CPU#3.

Perhaps this is why I didn't hear much immediate effect when playing with cpuset but felt SQ was improved long-term.

Cheers,
JD
Reply

#2
(02-Sep-2018, 10:57 AM)JD1 Wrote: Hi Agent Kith,
I'm keen to do more with CPU affinity. Ultimately, it would be great if there was something like a 3rd group that could reserve a CPU for special user defined PIDs or IRQs.
[I'm ignorant about any differences between PIDs and IRQs in this context]

First up, could you modify TOP to show the last used CPU?
Currently, I ssh TOP, hit F, scroll down to P, hit space and then escape to see this info in Terminal.
TOP is kind of dumb that way. You can however, save your current view by pressing 'W'. However I believe this will be overwritten next time you install a firmware as I believe I used TOP to display somethiing different from the default (cannot remember what that is now).

(02-Sep-2018, 10:57 AM)JD1 Wrote: The main consumer of CPU power in my system is irq/127-xhci_hc
I'm guessing this relates to the USB output to my DAC. That is the one for which I'd like to separately assign a CPU core.
At the moment you can't do this in the GUI. I'd improve on this in the future, but until then, you can just run cpuset from the commandlinei to partition the processes the way you want it.

My 2c though, the idea though is not to isolate the cores to give them 'maximum availability'. It is to make sure the memory regions used by your music processes etc can be 'transferred efficiently' across each other. e.g. it makes sense to assign everything related to music to a single core, so that the CPU can hopefully make it more efficient to transfer the pages from one to another.

Placing them in seperate CPUs may defeats the purpose in terms of effiency.. However, there's always a chance something inefficient may actually sound better..

Hopefully I can improve on this GUI so you guys can tweak it to whatever you like to find the sound you live. Thumbs Up

(02-Sep-2018, 10:57 AM)JD1 Wrote: For many weeks, I have assigned CPU#3 to User, leaving #0, #1 & #2 for System. Initially when I started playing with cpuset and monitoring last used CPU, I saw that IRQ127-xh followed system (CPU#0, 1 or 2). Later it seemed to always follow User (always on CPU#3 for weeks once stopped making changes in cpuset).  Today, I changed to CPU#2 & CPU#3 for User and notiiced that IRQ127-xh was using the system cores again. Back to User=CPU#3 only...IRQ still using System cores...restart...now IRQ pinned to User CPU#3.
This sounds like a bug, I'd look into it when I can.. In theory the kernel don't do hyper threading, but just in case - do you have hyper threading on? If yes, can you disable that?

[quote="JD1" pid='1857' dateline='1535857037']
Perhaps this is why I didn't hear much immediate effect when playing with cpuset but felt SQ was improved long-term.
This cpuset feature is a big change in my setup.. As always, it's a YMMV thing. For now, if you can manually experiment with cpu sets in the command line.. And let me know what works best for you.. Then I'd see if I can find a good user interface to make this work.
Snakeoil Operating System - Music, your way!
Reply

#3
Thanks for the reply AK.

I have hyper-threading disabled in BIOS.

Yes I believe you about sharing a core. Single core for user sounded best to me. I'm still speculating that it worked better for you because you also have all system processes on a single core. Worst for me was when I tried 2 cores for each.

Could you lead me in the right direction about using ssh to set CPU affinities?

Cheers,
JD
Reply

#4
(02-Sep-2018, 01:54 PM)JD1 Wrote: Thanks for the reply AK.

I have hyper-threading disabled in BIOS.

Yes I believe you about sharing a core. Single core for user sounded best to me. I'm still speculating that it worked better for you because you also have all system processes on a single core. Worst for me was when I tried 2 cores for each.

Could you lead me in the right direction about using ssh to set CPU affinities?

Cheers,
JD

CPUset is slightly different to CPU affinities... The former is assigning a group of CPU into a group, and then you can define what processes to run in that group. To make it work with what you want you would probably need to define four CPUsets, one for each core.

Here's the tutorial on how to use cset to set things up:

https://github.com/lpechacek/cpuset/blob...torial.txt

Play around with it and see what happens. If there is a problem just reset the PC and all should be working again.
Snakeoil Operating System - Music, your way!
Reply

#5
Thanks for the tips AK. I've been playing around with cset. More learning commands than listening to music so only 1st impressions but I'm liking this: irq/127-xhci_hc plus Squeezelie-R2 on one core and the 4 other LMS/SL PIDs on another. BTW; irq/127 seems to start off in system cpuset, even when it was using the user core. Moving that one was my biggest challenge.


[Image: Screen_Shot_2018_09_03_at_6_12_40_pm.png]
[Image: Screen_Shot_2018_09_03_at_6_11_48_pm.png]
[-] The following 1 user Likes JD1's post:
  • agent_kith
Reply



Bookmarks

Possibly Related Threads…
Thread Author Replies Views Last Post
  Extending cpuset to include user processes Snoopy8 6 1,934 13-Dec-2022, 02:03 PM
Last Post: Snoopy8



Users browsing this thread:
1 Guest(s)

[-]
Our Sponsors

[-]
Welcome
You have to register before you can post on our site.

Username/Email:


Password:





[-]
Latest Threads
Howto setup resampling in Logitech Media...
Last Post: Coacharnold
18-Nov-2024 12:06 AM
» Replies: 7
» Views: 5799
Dropping Measurements, Hello High-End.
Last Post: agent_kith
26-Oct-2024 09:02 AM
» Replies: 12
» Views: 445
Very happy to have Sankeoil......! mpd w...
Last Post: run51
24-Oct-2024 05:35 AM
» Replies: 9
» Views: 1678
SO no soundcard detected - RPI Pi4 snake...
Last Post: run51
21-Oct-2024 10:55 PM
» Replies: 4
» Views: 105
download
Last Post: Snoopy8
19-Oct-2024 05:52 AM
» Replies: 1
» Views: 105
Full proces to instal snakeiol 100% work...
Last Post: audioluthier
11-Oct-2024 02:32 AM
» Replies: 9
» Views: 336
A network protocol designed for CAS
Last Post: hkphantomgtr
10-Oct-2024 09:48 PM
» Replies: 0
» Views: 85
CAS with "Single Core"
Last Post: hkphantomgtr
06-Oct-2024 08:32 AM
» Replies: 2
» Views: 116
MPD player not working
Last Post: Snoopy8
27-Sep-2024 11:54 AM
» Replies: 7
» Views: 218
LMS playing DFF files sampling rate
Last Post: Snoopy8
16-Sep-2024 07:45 PM
» Replies: 5
» Views: 151

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


Powered By MyBB, © 2002-2024. Theme © Melroy van den Berg.