with what settings does it make the big improvement?
With my hardware, it performs best when I allocate just one CPU to the shield, and set a priority of 10 to MPD and Spotify Connect.
When comparing settings that disable priorities, you should force a restart of the music processes between changes, to ensure that the default priorities are restored.
However, I recommend you carefully test different settings by ear in your own system.
Can you please send a screenshot?
On my RPI 3B+ / Volumio 3.175 and MPD shield on reproduction stuttering when i play heavy DSD file like this:
I’ve tried to set different priority values with no luck.
I guess MPD needs more than one processor to process this more intensive load. Have you tried with MPD shield off but priority enabled?
I’ve tried with CPU 2 to 3 and it seems to work. Thank you!
These are my settings now, do you suggest any changes? I don’t know if I’ve set something inconsistently or wrong
No inconsistencies there. I have alternated between enabling spotify priority and disabling it.
I could not hear a big difference between priorities of less than 50, but above 50 seemed to be worse than disabling priority.
My impression is that enabling the shield contributes more than enabling the priority, for both MPD and Spotify.
Thank you very much for your dad screenshot.
I was already wondering how you can prioritize Spottify Connect. I use Qobuz and unfortunately the option is not available for this.
It would be very good how Qobuz could also be prioritized.
Would the adjustment also be possible for Qobuz?
Ah great, thanks for the explanation!
So where it says “user group cpus” - those aren’t actually CPUs - they’re threads. Which is fine. Now when we allocate 1, 2, or 3 threads to user group, what happens with the rest of them? Like what’s the logic there does anyone know?
(I’ve had 0 to 2 (3 threads out of 4 total) allocated forever and never had issues).
The plug-in uses the linux cpuset shield command. This command separates all logical CPUs into two groups: ‘user’ and ‘system’.
The plug-in uses this command to allocate the configured CPUs to the ‘user’ group, leaving the other CPUs in the ‘system’ group.
So if you have configured 0-2 with the plug-in, then CPUs 0-2 will be in the user group and 3 in the system group.
The music service processes and their child processes are assigned by the plug-in to the user group.
Just an Idea, to make the plugin more accesible to a greater group of people. Add a chart in the 1st posting with basic settings related to the hardware.
Here on a rPi4-4GB, these work perfect: (Not sure why the Spotify setting is missing V1.3.1)
That’s a good idea.
The plug-in doesn’t support built in Spotify plug-in, just the Spotify connect plug-in.
Can you explain what this does? What’s the logic behind 0 to 1 and behind setting the priority to 50?
The plug-in makes use of a Linux tool called cset shield.
This tool allows you to group the logical processors, or CPUs, into two groups called ‘user’ and ‘system’.
For example setting 0-1 in the plug-in will allocate CPUs 0 and 1 to the user group. The remaining CPUs will be allocated to the system group.
By default all processes will be allocated to the system group. This minimises the number of processes competing for processing time on the user group CPUs.
The plug-in allows you to allocate MPD and Spotify Connect to the user group CPUs.
Priority influences how the CPUs switch between the processes running on it. A higher number tends to translate to more processing time. However, both MPD and vollibrespot launch child tasks with fixed priority, so the plug-in set priority only changes the parent process priority.
Reducing the parent process priority can give more processing time to the time critical tasks
Thank you so much!
But what is the logic behind allocating 0-1 to the user group? Like why allocate 2 CPUs (those are threads btw not CPUs I believe but that’s what linux calls them so we’ll go with that) to the user group as opposed to 1 or 3? What makes ‘you’ think that user group can benefit more from 2 cpus than from 1 or 3?
No logic. I arrived at the CPU allocation by listening. I’ve tried various combinations but 0-1 or 1-2 seems to sound best on my setup.
I could guess at why 2 logical CPUs seem to sound better than 1 or 3, but I can’t be certain.
Maybe having 3 CPUs allows Linux to move the timing sensitive tasks to different CPUs, introducing subtle timing changes. Maybe having 2 CPUs means the timing sensitive tasks are less likely to share a process with the less sensitive tasks.