Squeezelite -b option

@spockfish hi Harry, would it be possible to have an option to configure the Squeezelite internal buffer (-b option) ?
Just tried it on my SOtM sMS200 , despite having it only 2GB ram setting the buffer to
-b 524288:524288
or
-b 786432:786432
gives a better SQ.
I’m wondering how the rpi with 4GB ram will sound using appropriate internal buffer settings.
Thanks for you attention

@spockfish … Maybe you missed my question …

No sorry, I did not. Just busy :wink:

Problem with settings like these are:

  1. they are of interested for a very small user group (you are the first to ask for it)
  2. what is the ‘right’ setting? Making it completely configurable can result in breaking stuff; providing prefixed settings results in “yes, but I want this particular size”.

So… I’m not sure (yet).

I do understand that this is not a “common used” configuration and I’m quite surprised … maybe there isn’t a lot of people using a two layer configuration (server/client) of LMS or Daphile, nevertheless I discovered this is an interesting “tweak” from the sound quality point of view.
As you know there are two variables involved, referring to the syntax
-b x:y :
x) input buffer
y) output buffer
where x and y should be equal to each other and they define how much buffer (in bytes) must be reserved.
The scope is to play the track from ram how much is possible.
On my SOtM sMS200, which has 2GB of ram, I set the value of 524288 to stay on the safe side, this means that a total of 1GB is reserved for the buffers.
On my rpi4, 4GB ram, I could set almost the double, so 2GB ram are reserved, but a total of 3GB is anyway possible.
As you can see the amount of reserved buffer depends on how much ram is available on the rpi:
rpi3 has only 1GB while rpi4 exist with several ram sizes, 2/4/8GB.
It is therefore difficult to imagine a fixed value for all the rpi models/versions.
A suggestion to simplify the setting could be to let enter just one value, as it is in the SOtM sMS200 configuration, adding a warning explaining that at least 500MB must be left free for the system to function correctly, anyway the setting should be an option and not mandatory (set it only if you know what you are doing)

Hi Harry …. any chance?

Well, as mentioned before… it’s about the ‘how’.

What’s not an option is a free format field: that would collide with RoPieee’s basic principles of keeping things simple and not provide options that could potentially bring down the appliance.

So I’m not sure how this could be done: there are quite a few variables.

The only thing I can imagine (for now) is just increase the default buffer size (without even providing an option for it).

Thanks

Resurrecting this thread - I too would be interested in some way of using larger buffers. Currently it can be done through the beta/ssh/editing a configuration file route but this goes against the Ripieee ethos.

Just as a thought, how about defaulting to larger buffers on any pi with more than 1 gig of memory?

And how big should they be in this scenario?

On a rpi4 with 4GB ram everything runs fine with
-b 1500000:1500000
with UPNP, NAA, Squeezelite enabled at the same time

Soundcheck who appears to be the guru on Squeezelite tuning seems to recommend 20000:300000 as a starting point - i.e 20 Mb and 300Mb. This should fit easily on a 1 gigabyte system. This would allow the majority of CD quality tracks to play from memory.

How about
1 Gig system Leave at defaults or 20000:300000
2 Gig system 50000:500000
4 Gig system 1000000:1000000 (should play most hi-res from memory)
8 Gig system 2000000:2000000 (? - how many 8 gig systems run Ropieee)

I’ve set the 4 gig level a bit lower than Stefan’s running to allow for expansion or for other protocols buffering if not running Squeezelite.

Thoughts?

Alan