PDA

View Full Version : lms on Rpi 2 - performance issues



damston
2019-02-07, 08:11
Hi,
I recently moved my LMS from a desktop computer to a raspberry pi 2.
I have a squeezebox boom and a slimp3 connected to the server (with 400Gigs of mp3s). The squeezebox doesn't seem affected by the change, but the slimp3 has a hard time.
When listening to a radio stream, it usually goes well for about 20 min then it stutters forever. Even pausing and restarting the stream doesn't fix it.
When playing MP3s, they take forever to load (15-20s) and sometimes cut out in the middle, never restarting.
Sometimes, the clock (displayed when off) just goes off and comes back after "some time".

The slimp3 is on the same gigabit hub as the rpi, where it has always been.
The pi is running raspbian with other stuff on it, but nothing hogging the cpu beyond 15%.
There's a hard drive connected to the pi with the MP3s, but the lms is on the sdcard.

I also run a squeezeplay over wifi on an old mac mini, whithout any problem so far.

Any idea what could be the problem?
Thanks

mherger
2019-02-07, 10:09
> I recently moved my LMS from a desktop computer to a raspberry pi 2.
> I have a squeezebox boom and a slimp3 connected to the server (with
> 400Gigs of mp3s).

I don't know how many tracks these are, but it sounds like a lot. A
Pi3B+ might be better suited for this. And make sure you have the memory
parameter for the DB set to "High" in Settings/Performance.

> The squeezebox doesn't seem affected by the change,
> but the slimp3 has a hard time.

Keep in mind that the SliMP3 has a minuscule buffer compared to the
other players. Which means that the slightest delay in streaming data
would result in interruptions. Eg. reading/writing data from/to the SD
card might be too slow, causing hiccups etc.

> The slimp3 is on the same gigabit hub as the rpi, where it has always
> been.

The SliMP3 only has a 10Mb interface...

http://wiki.slimdevices.com/index.php/Hardware_comparison

> The pi is running raspbian with other stuff on it, but nothing hogging
> the cpu beyond 15%.

How much memory left? The CPU might be idling because it's waiting for
some I/O?

--

Michael

damston
2019-02-07, 10:20
I don't know how many tracks these are, but it sounds like a lot. A
Pi3B+ might be better suited for this. And make sure you have the memory
parameter for the DB set to "High" in Settings/Performance.



I have the "server priority" set to "-16 high", but I never saw a setting for the db, is this it?




Keep in mind that the SliMP3 has a minuscule buffer compared to the
other players. Which means that the slightest delay in streaming data
would result in interruptions. Eg. reading/writing data from/to the SD
card might be too slow, causing hiccups etc.


That's what I was suspecting, is there a way to move the DB to the hard drive?




How much memory left? The CPU might be idling because it's waiting for
some I/O?


it shows 66% free memory.

drmatt
2019-02-10, 13:59
So "15% CPU" is about 60% of a core. I would def suggest moving the LMS dB to the HDD instead of the sdcard, or even move it to dev/shm at startup. And if it's still not happy look at moving to a NUC or at least Banana pi type hardware with pcie-connected gigabit ports instead of the yucky USB 100mbit you get on a Pi.

Also, no such thing as a gigabit *hub* as far as I'm aware, so at least your 10mbit device isn't slowing everyone else down.. :)


Transcoded from Matt's brain by Tapatalk

damston
2019-02-10, 15:30
I will upgrade it to a Rpi 3 with ssd in the future, we'll see if it's enough, but if I could make it work on my pi2 for the time being, that would be great.
Since the problem is only with my slimp3, I might retire it and replace it with the Pi2 at that time.

I can't find any information on how to move the database on the forum (i'm guessing "db" isn't indexed and nothing shows up with "database"), could someone help me with this part?

thank you!

(and yes, it's obviously a Gigabit switch ;-) )

Roland0
2019-02-10, 16:14
I have the "server priority" set to "-16 high", but I never saw a setting for the db, is this it?

No, it's "Database Memory Config"



I can't find any information on how to move the database on the forum (i'm guessing "db" isn't indexed and nothing shows up with "database"), could someone help me with this part?


If you're using Debian, edit /etc/default/logitechmediaserver and change


PREFSDIR=
CACHEDIR=


or use a bind mount (see man mount for details - I'd recommend this approach, since it's more flexible)

You may first copy the LMS cache to a tmpfs ("ram disk") and use that to check if this actually helps.
Install something like glances (https://github.com/nicolargo/glances) to monitor system performance and check for bottlenecks.
When listening to radio streams, try one which can be played natively by your player (e.g. mp3 format) and check if this makes a difference.
Finally, check if your SD card has issues / is too slow (try using a A1 certified (https://www.sdcard.org/developers/overview/application/index.html) one (e.g. SanDisk Extreme R100), this will improve performance considerably)

damston
2019-02-13, 11:44
I've changed the db memory setting, to no effect (the french translation was not that obvious).
I'll try the other suggestions and let you know.