terba / slimmer

User interface controller for Logitech Media Server (aka SlimServer, Squeezebox Server, SqueezeCenter)
GNU General Public License v3.0
33 stars 7 forks source link

Server Load #27

Closed ElFishi closed 7 years ago

ElFishi commented 7 years ago

Slimmer keeps the LMS server which is hosted on a different rpi1 fairly busy. So much so that the core temperature of the server is 4 deg higher when slimmer is running on the client. Can slimmer be more efficient with the server?

terba commented 7 years ago

Slimmer retrieves the player status infos 2 times per seconds. This is a short text data in JSON. I don't think it makes sense. It does that also when playing is stopped/paused.

Does this happen also when playing (music streaming to squeezelite) is stopped? Streaming the music requires much more resources.

ElFishi commented 7 years ago

pitemp picture shows server temp with only slimmer start/stop at the rise and fall of the temperature. no music played.

ElFishi commented 7 years ago

on 21:10, off 21:30, on 21:55

ElFishi commented 7 years ago

SBlog.txt

monitored the CPU usage in percent of the squeezeboxserver process using top in 2 second intervals, while starting and stopping slimmer on the pCP client in 60 second intervals. looks like this: cpu

terba commented 7 years ago

I checked this on my development machine. Slimmer (without music streaming) made the cpu utilization of slimserver from the idle 0-0.3% to 0.6%. I will check what a real Squeezebox does, and what kind of traffic it generates on the network.

It could be lowered by programming:

ElFishi commented 7 years ago

I am happy to learn what is wrong with my slimserver if it is so sensitive to json requests : ) I was thinking about upgrading to a rpi3 anyway... I am hardly concerned about the server load while playing music. The idle load should be low, ideally. Is there a way that LMS is sending out a signal when it starts to get interesting for a client to listen? would be interesting what a real SB does. Btw the data above I took while one SB3 was connected to the server.

terba commented 7 years ago

I checked now a Squeezebox Boom with tcpdump. It sends on the proprietary protocol (port 3483 not JSON) a status query at 4 seconds interval while not playing or turned off.

I will implement some kind of "green" method for this when the player is idle or off.

ElFishi commented 7 years ago

cewl. thx.