Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Thread Closed 
My MoOde Sound Tweaks
#11
Just a note:

#Reduce MPD and OS latency

chrt -f -p 81 $(pidof mpd)
taskset -c -p 1 $(pidof mpd)

These strings doesn't work on startup, until you set pid of MPD correctly.
#12
(12-10-2018, 04:14 PM)mactolinux Wrote: Just a note:

#Reduce MPD and OS latency

chrt -f -p 81 $(pidof mpd)
taskset -c -p 1 $(pidof mpd)

These strings doesn't work on startup, until you set pid of MPD correctly.

You don't "set pid", at least not without an awful low-level hack that I won't mention.

The system assigns the pid (process id) to mpd when it starts, after which this tweak could be applied. If mpd dies for some reason and is restarted by the watchdog, the assigned pid likely will be different, requiring the tweak to be reapplied.

Regards,
Kent
#13
Sure, I meant set pid in the bash. Which you should get before it run. Currently the string does nothing.
#14
(12-10-2018, 09:58 PM)mactolinux Wrote: Sure, I meant set pid in the bash. Which you should get before it run. Currently the string does nothing.

Very interesting....when I run the command via command line with a sudo in front it works without a hitch.

Before MPD process
[Image: mpd10_zpsp17mg8if.png]

MPD command
[Image: command_zpsrdkjokox.png]

After command
[Image: aftermpd_zpspmalzc5g.png]

CPU affinity
[Image: cpumpd_zpst5njhay3.png]

You are saying this does not work for you?

That sucks. Sad Blush

Don't know why it doesn't work for you, I've been using it for probably over 10 years ie since before the Squeezebox Touch was out, strange.
#15
(12-10-2018, 04:14 PM)mactolinux Wrote: Just a note:

#Reduce MPD and OS latency

chrt -f -p 81 $(pidof mpd)
taskset -c -p 1 $(pidof mpd)

These strings doesn't work on startup, until you set pid of MPD correctly.

Also to get them to work on "Start up" just put the path to the .sh file in the rc.local file located in /etc

Change the priority to 755 via sudo chmod 755 ****.sh and done.

Can you copy/paste a screen shot when you try the command via command line?
#16
Simple and look obvious: when you run it manually AFTER mpd has started it’s okay.

But you set up this script into startup sequence. It doesn’t run these strings from there - because mpd has not started yet. you may try and will see that mpd still has initial attributes.

That’s why those setting were mentioned in mpd config file before, this apply settings on every launch of mpd. instead of bash.
#17
nano /lib/systemd/system/mpd.service

[Service]
# Real-time / Low latency params
# ps -e -o class,rtprio,pri,nice,cmd
# for real-time scheduling policies the "nice" param is ignored and the pri column is not relevant
ExecStart=/usr/bin/taskset -c 3 /usr/local/bin/mpd --no-daemon $MPDCONF
Restart=always
# I use core 3 here, it was isolated in cmdline


# Launch params
EnvironmentFile=/etc/default/mpd
#ExecStart=/usr/local/bin/mpd --no-daemon $MPDCONF

#CPUSchedulingPolicy=other
CPUSchedulingPolicy=fifo
#CPUSchedulingPriority=43
CPUSchedulingPriority=70
Nice=-18
#18
Could you please try to play out 192/24 with FIFO setting on mpd?
#19
(12-11-2018, 05:28 AM)mactolinux Wrote: Simple and look obvious: when you run it manually AFTER mpd has started it’s okay.

But you set up this script into startup sequence. It doesn’t run these strings from there - because mpd has not  started yet. you may try and will see that mpd still has initial attributes.

That’s why those setting were mentioned in mpd config file before, this apply settings on every launch of mpd. instead of bash.

Easy fix, just tell it to sleep for a bit

sleep 25 ; sudo chrt -f -p 81 $(pidof mpd)        
sleep 35 ; taskset -c -p 1 $(pidof mpd)
#20
(12-11-2018, 05:44 AM)mactolinux Wrote: Could you please try to play out 192/24 with FIFO setting on mpd?

Sure, works no problem....my Dac supports 32/384, that works too Big Grin

[Image: 9ef569ae-a168-4bed-96c4-cb48c0c4c831_zpsfscwzeur.png]


Forum Jump: