Thank you for your donation!


Instruction Guide How to make moOde snappy with a huge library
#1
I have a very large library with over 200K tracks and of course I experience some slow downs with moOde. I am sure I am not the only one and already from 50K tracks and up one may encounter some hiccups.

Of course the first thing to do in these cases to guarantee that the tag view loads properly is to go to Configure -> MPD Config and increase "Output Buffer Size" until it works (in my case I set it to 512Mb and do not worry).

The next thing to do is to go to Preferences -> Library (Advanced) and set "Show Tagview Covers" to no

But I also noticed a lot of activity on the root file system, especially in /var/local/www - there you can find the libcache_all.json file which can become very large if you have a lot of albums (in my case it is 183MiB) and you find all the cover thumbnails in /var/local/www/imagesw/thmcache which in my case contains 78482 files for about 400MiB (!!!) of data.  Accessing all this data from an SD will incur in a significant performance penalty, since even the best SD cards have an abysmal bandwidth especially for random accesses. You are lucky if you get 35 MB/sec.

The solution is to move the boot disk to a SSD, at least if you have a Raspberry with USB 3 ports. This made everything significantly snappier - I guess one of the reasons is that all this data is sent to the browser to be cached there, and tens of thousands of SD accesses just take forever.

I picked a 128GB SSD – I could have bought a 64GB or 32GB one, but they were slower: all those that I could find topped at 300 MB/sec, and they were no significantly cheaper than a 128GB one with R/W reaching 500MB/sec. Then get an enclosure that can support these speeds (some of the cheaper ones will not) – I cannot advise you on this because I chose a 2.5" form factor and had a good UGREEN one lying around that was incompatible with 8TB SSD, but worked like charm with smaller ones – I cannot find links to it anymore, but there are plenty.

Then once you have acquired your hardware the next steps are
1) assemble SSD and enclosure
2) clone your SD to the SSD
3) configure your Raspberry to boot from USB storage https://www.raspberrypi.org/documentatio...des/msd.md
4) remove the SD and attach the enclosure to one of the USB (3) ports
5) boot
6) enjoy
7) optionally, expand your file system again from Configure -> System
8) optionally, you can enable Configure -> MPD Settings -> Input Cache and set it to some value (128MB is ok) since the boot disk and any attached storage will share a single USB bus and compete for it – I never experienced hiccups with the fast SSD but some with the SD when updating the library - sometimes the music would stop and the interface lag or become unresponsive. Again, this never happened with the SSD but having files buffered in memory will further reduce the risk...

(Note: my main storage is a 14TB WD Elements HDD, connected via USB 3.)

 Roberto
Reply
#2
Hi Roberto - I moved the thread to the FAQ / Guides sub-forum and tagged it as "How to..".

I wonder if eMMC boot media would also provide big a performance boost over uSD?

-Tim
Enjoy the Music!
moodeaudio.org | Twitter Feed | Git Repo
Reply
#3
(03-19-2021, 11:17 AM)Tim Curtis Wrote: Hi Roberto - I moved the thread to the FAQ / Guides sub-forum and tagged it as "How to..".

I wonder if eMMC boot media would also provide big a performance boost over uSD?

-Tim

Versions like 4.5 and up are indeed faster than uSD, and definitely one would want to use at least 5.0 to have a read speed of 250MB/sec, which should provide a significant boost.

But they are still slower than what USB 3 connected SSDs can do. 

 Roberto
Reply


Forum Jump: