Performance issue. 5 mn to boot, each time.

Hello,

Back on this topic... I have found a very nice solution (at least for me...) for this issue. 

I think that the problem, on Volumio side, is to

  1. restart Volumio each day (or each time you want to listen to music),

  2. rebuid the full datase, even if nothing has changed; for me, this is a non sense.
    This is what the “node” process does at each boot.

    As far as I understand, mpd is very fast for updating the music library, but this is not the case for volumio, when this library is large. So, for me, the best solution, when using a NAS, is to have your DB located on this NAS, and not in Volumio…

For doing this, I use subsonic.

For me, this solution is perfect because my NAS (RPI4) already runs subsonic (http://www.subsonic.org/pages/index.jsp), which allows me to listen to my music from anywhere through a web interface. And there is a very nice plugin for olumio, named Volusonic, which allows volumio to stream music from subsonic. I gain also a couple of features from subsonic: random albums, newest albums, etc…

So, since I use Volusonic, I have absolutely no performance issues anymore! All you need to check whether you NAS can run subsonic or not.

 Denis

Hi dk31!
so, what you fix boot time with USB, thank you help!
Mac!

The problem persists. I have a rasberry pi 3 with the latest volumio. My music collection (140k songs) resides on a synology nas connected via cifs. Since I installed a 7" lcd display and the touch pad plugin the raspberry freezes completely. It boots up okay but node is taking more and more memory (up to > 60%) and runs out of memory. Eventually it freezes completely (well, I ran out of patience after 24h …). It already took a long time to boot without the touch lcd plugin but now X is also taking memory…
Really crushes the user experience.

Hi,

I totally agree with you. This is for me the BIG issue in Volumio, and the problem is still there in the latest versions. I don’t understand why nobody from the “devt” team has taken a look at this.

Anyway, it looks your are in a situation that is very similar to the one I encountered, so I guess I can help you.

As far as I understand (I may be wrong), when the music library is large “enough”, the scan of this library by volumio takes a lot of time, and also a lot of memory. If you add the touch display plugin, this plugin runs an additionnal web browser, which takes more memory. The whole system comes then into a swap process (you can seen the “kswap0” process running"), but there is no swap on this RPI. So, it takes years…

A workaround is possible in 3 steps. See below. You need to have a ssh connection to your volumio RPI. You must also to be able to edit some files on your RPI (you can use “nano” for this).

First step: you must get sure that the automatic update of volumio database is switched off. When modifying the music library, you will have to tell volumio to update it manually, but only after the boot sequence is complete.

For doing this, you must:

  • check this line in /etc/mpd.conf

auto_update “no”

Value must be “no”. If “yes”, put “no” instead.

  • do the same thing in “/volumio/app/plugins/music_service/mpd/mpd.conf.tmpl”

  • in file “/volumio/app/plugins/music_service/mpd/config.json”, you must set this value to false:

“auto_update”:{
“type”: “boolean”,
“value”: false
},

Second step: once you have done this, you must temporarly “unplug” the “touch display” plugin, to prevent it from launching the browser: just edit the “/opt/volumiokiosk.sh” file (you must be root) and insert “exit 0” just after the first line, like this:

#!/bin/bash
exit 0
while true; do timeout 3 bash -c “</dev/tcp/127.0.0.1/3000” >/dev/null 2>&1 && break; done

Now, you can reboot your RPI, or just run “killall node”, this will restart everything, but nothing for the touch display. You should see nothing on your LCD display.

Third step: in this configuration, you must now estimate how long it takes for volumio to load your database. When volumio is ready to play music (i.e when you can actually explore you music library in volumio), type “ps -aux | grep node” in you sshconsole

volumio@volumio-sub:~$ ps -aux | grep node
volumio 1322 0.7 9.4 206464 93520 ? Ssl 09:24 0:19 /usr/local/bin/node /volumio/index.js
volumio 1376 0.0 2.6 72636 25908 ? Sl 09:25 0:00 /bin/node /volumio/app/plugins/miscellanea/albumart/serverStartup.js 3001 /data/albumart
volumio 1382 0.0 3.5 115112 35092 ? Sl 09:25 0:01 /bin/node /volumio/app/plugins/miscellanea/albumart/serverStartup.js 3001 /data/albumart
volumio 1383 0.0 3.5 115240 35008 ? Sl 09:25 0:01 /bin/node /volumio/app/plugins/miscellanea/albumart/serverStartup.js 3001 /data/albumart
volumio 1388 0.0 3.5 115132 34864 ? Sl 09:25 0:01 /bin/node /volumio/app/plugins/miscellanea/albumart/serverStartup.js 3001 /data/albumart
volumio 2953 0.0 0.1 4164 1380 pts/1 S+ 10:08 0:00 grep node
volumio@volumio-sub:~$

The first line will tell you how long it takes for the /usr/local/bin/node process to finish its job (19 seconds in my example, see “0:19” just before /usr/local/bin/node on the first line).
Yours might be much longer…
Repeat this operation a couple of times: killall node, wait for volumio to be ready, and check the time with the ps command.

Once you are pretty sure about this duration (it should more or less be stable), edit again the /opt/volumiokiosk.sh file, and replace “exit 0” with “sleep X”, where X is a number of seconds which is slightly larger than the time you need. For example, if the node process needs 2:30 minutes, put 3 minutes (i.e 180), like:

#!/bin/bash
sleep 180
while true; do timeout 3 bash -c “</dev/tcp/127.0.0.1/3000” >/dev/null 2>&1 && break; done

And you’re done. Just reboot, or run “killall node” again.

Hope this helps.

Again, it would be very nice to have a feedback from the Volumio team on this issue.

Denis

@gvolt maybe you can clear this…

Hi Denis,
just only saw your response now. Many thanks for this. I will give it a try. I also followed your suggestion to install subsonic. This works but my NAS (DS216se) is way too slow for it. Anyway, this thread was a kind of lifesaver for me as it clearly describes the problem even though there is - regrettably - no solution by the devs for it.

1 Like

Sorry to see that your NAS is too slow for subsonic. Here, it works on a very old RPI (model B), which is not a very powerful computer.
You may also give a try to minidlna, I don’t use it extensively, but I noticed it worked also, without installing anything on Volumio (you see it appear in “media servers”). Just installed minidlna

Sorry, the answer went away without noticing… So, I just installed minidlna on the RPI server, configured the DB, and it worked immediately.
Hope it helps.

Denis

i’m the same only with dubble n lol :slight_smile:
and nice that it works…

Back to this topic of very long time needed to be able to play music after boot…

It seems to me that the problem of very long “node” process after boot is now solved with Volumio 3! It was around 2 mns with volumio2 (last version), and was drastically reduced to 10 seconds with volumio 3 (3.173)!

Probably something changed in the pagination method? Hope this stays as it is now!

Thanks to the volumio team, although it was a bit long…

Denis