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)


CpuSet Feature While Using Upmpdcli
#11
(11-Oct-2020, 05:25 PM)agent_kith Wrote:
(09-Oct-2020, 06:22 PM)PeteCallaghan Wrote: There seemed to be multiple mpd processes, so a loop was needed to catch them all:
 
Code:
 
pids=$(pgrep mpd)
for pid in $pids
do
chrt -r -p 99 $pid
cset proc --move  --threads --toset=user --force --pid=$pid
done
In theory you don't have to do this, just find the main PID, and the --threads option will move all threads to the CPUSet.

But, that's really dependent on how MPD works.. e.g. if MPD fork a thread on playback, there is always a chance this script will not work.. i.e. MPD starts, and the script moves the threads to the CPU Set, and when you play, MPD fork another thread, this is not trapped by the script as it happens after the fact..

There's prob a way to fix this, but I havn't investigate deeply enough yet... The current script, while brutally simple, actually yield quite a good audio improvement.. But I've mostly tested this in LMS and Squeezelite..

Please continue to explore this and let me know your progress, I'll incorporate your work into the next release too. Thumbs Up

Some progress. I now have a crude but reliable process for applying the script after a reboot. 

I add a line to crontab that waits for 10 minutes after a reboot and then applies the script:
 
Code:
#crontab-e
@reboot sleep 600; sh [path to script file]/mpdpriority.sh

I have not experimented with shorter sleep times, as this seems pretty reliable.

I'll research how to follow up your point about forked threads, to see if I can find any and see if they are allocated to the correct CPU set
Reply


Messages In This Thread
CpuSet Feature While Using Upmpdcli - by ekpln - 05-Oct-2020, 07:02 PM
RE: CpuSet Feature While Using Upmpdcli - by ekpln - 07-Oct-2020, 04:04 AM
RE: CpuSet Feature While Using Upmpdcli - by PeteCallaghan - 09-Nov-2020, 01:32 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [SOLVEDupmpdcli unable to start Snoopy8 7 2,365 09-May-2025, 08:16 PM
Last Post: Amph
  Cannot install upmpdcli Raspberry Pi5 carlodim 3 701 19-Jan-2025, 12:48 PM
Last Post: Snoopy8
  [SOLVEDCPUset not working in Ubuntu 22.04 Snoopy8 17 6,562 12-Dec-2023, 07:02 PM
Last Post: uglymusic
  upmpdcli mpd and LMS -- set up help! pathetic 13 5,426 23-Nov-2023, 06:32 PM
Last Post: patricia1066
  Problems installing Upmpdcli koko6969koki 3 1,734 10-Mar-2023, 06:37 AM
Last Post: Snoopy8



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: 2035
[split] Possible To Load Snakeoil OS in ...
Last Post: Snoopy8
09-Jun-2025 06:43 AM
» Replies: 14
» Views: 1519
Snakeoil 1.4.3 (High End U3)
Last Post: hkphantomgtr
05-Jun-2025 03:58 PM
» Replies: 67
» Views: 8909
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: 655
Work In Progress: 1.4.4
Last Post: hkphantomgtr
29-May-2025 11:44 PM
» Replies: 44
» Views: 4981
SQ difference - Raspberry Pi vs x86_64?
Last Post: Snoopy8
27-May-2025 02:16 PM
» Replies: 42
» Views: 5414
Snakeoil 1.4.0 (High End)
Last Post: aabman
25-May-2025 11:35 AM
» Replies: 93
» Views: 14870
new install issues
Last Post: carlodim
23-May-2025 09:56 AM
» Replies: 42
» Views: 4397
Is this project still alive?
Last Post: agent_kith
20-May-2025 03:11 PM
» Replies: 10
» Views: 1169

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