Is there a limit to the number or size of music library a Pi Zero W will cope with ?
I have set up my device numerous times with different SD cards, different brands, different Volumio builds.
I can do the initial setup fine and if I leave it with no library set up it seems to work away fine. If I add my music library it starts running through the scan OK but at a certain point it becomes unresponsive- both web interface and ping. This takes a LONG time so I don’t know if it stops at the same point each time.
The library is about 1TB in size (mainly FLAC) and over 50,000 files.
The last time the device hung I could see the screen had frozen at 67318 tracks.
Music is stored on a Synology NAS but I have also tried copying the library to a Windows PC and sharing this. Same results.
I also tried a Pi4 connected to the same library and it seemed to be fine so I’m assuming the PiZero just can’t cope ?
Sorry if the message is long winded but thought it best to try to give as much info as possible.
PiZero is very limited, I definetely suggest to upgrade to PI4
While PiZero have limited capabilities, there’s plenty of CPU power just to do simple things like indexing and audio playback in theory (live-transcoding can eventually be debatable).
Pi4 is probably totally overkill for Volumio audio usecases.
Of course throwing-out more cores, more MHz, more RAM, more Watts improve things, but it would rather be interesting to clearly understand where the actual bottlenecks are, and how they can be possibly handled better.
(i.e I remember times of unzipping implemented through a Node lib: that was highly non-optimal in terms of performances/RAM consumption, and killed devices on plugin installs; things greatly improved after using native code for that).
I’m unsure where indexing issues may be (database management, RAM usage (& swap), albumart download/access/storage, etc), and the seemingly 68K boundary you mention is a bit suspect…
For instance, do you have same issue if you do not pull-in albumarts?
The main bottleneck is not enough ram, which then results in swapping to sd card which is super slow.
With later pi models available we focused our efforts on improving multicore sharing of cpu load, hence a single core cpu is particularly slower on some operations, typically albumart fetching.
Thanks for initial feedback.
Which processes are taking so much RAM for indexing then?
It seems very curious such simple indexing thing eats-up so much RAM: maybe room for optimizations?
(I disabled swap on my PiZeros, and they run Volumio fine. I do not have a big db to index though, as I mostly use internet streams)
It would be quite interesting to see some profiling of the Volumio backend - I wonder if anyone has done anything so far? I do believe there are quite a few low hanging fruit that we could pick to make the system leaner…
Using limited devices like PiZero to undertake such diagnostic might prove being a good way to catch most critical things. Initial indexing might be a good usecase to start with (find potential memory leaks, etc).
Wish I had good-enough Node expertise to play with that…
Thanks for all the replies.
I was just hoping that someone else might have been using a Pi Zero and might know the limitations when using Volumio.
Yes, using the Pi4 seems to work but, as macmpi says, it’s a bit of overkill and I was going to use it for something else.
How do I prevent album art from being indexed ?
I’m going to try copying the library to a USB disk and try plugging this in locally and see what happens. But it’s not something I would want as a long term solution. I wanted the PiZero to work due to the small size etc - don’t really want a disk (and power supply) hanging off the side of it
I have a Pi 0 on a secondary system. Also have a Pi 4 and previously had a Pi 3.
My only problem with Pi 0 is that it’s harder to get connection to my wi-fi (granted, in a not optimal position…). When it connects, it’s a bit slower than the Pi 4, but I can live with that.
Regarding sound quality, it’s good enough to use on a valve heaphone amp with some vintage high impedance Beyerdynamic and Sennheiser HD650 (the Massdrop version).
Looks like I get the same results with the library on a local USB drive. Left the Pi with no library for a couple of days and it was fine. Connected the disk with the library and it started indexing. Don’t know how far it got this time as the screen wasn’t showing the status when it went unresponsive.
Oh well - looks like my idea for a very small music streamer is now a potentially bigger, more expensive Pi !!
Source location of your file is not expected to change anything in that regard (just eventual impact on indexing speed).
Really seems like typical memory leak in indexing: some structures might not be released/purged/written to disk regularly in the process.
If by chance you have ssh access while Pi is crawling to death, you could check memory usage with top or free command.