MinimServer Forum

Full Version: Which settings cause high memory usage?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, last saturday I had to drop three indexes from my minimserver configuration to lower memory usage to acceptable levels for my old RPI 3 (1GB of ram, to be shared with BubbleUpnpServer and a OpenVpn client connection to home vpn server for on-the-go availability).
I think the growth of memory usage has been determined by the growth of the library itself as it was long time ago I did the last changes to the indexing settings.

I also had to change a few settings on itemtags. All went ok, those action sorted the desired effect as now the server does not crash due to lack of memory. Awesome!!

Now my question: do "tagFormat" also contribute to higher memory usage? If I had to bet I'd expect the most relevant settings are in "indexTags" and "itemTags", followed by "tagValue".
Also my guess is that "itemSort" is used only when presenting the lists to the user.

Thank you for any help! Your answer will be useful in case I need to act again, so that I can drop the lowest amount of functionality in order to bring memory usage down.
For the near future I have a old Celeron J1900 mini-itx system with 8gigs handy but it will require full reconfiguration, so I'd like to stick with the Raspberry 3b for some more time.

Again, thank you.
Reducing the number of entries in indexTags and itemTags reduces memory usage if you you have a large library. I am not sure what itemSort is. Is this a tag that you have created?

tagValue should not use much memory. In tagFormat, indexFormat increases memory usage. displayFormat should make no difference.

The ignore and reverseName settings in tagOptions can increase memory usage significantly, depending on how many files they affect.

On Linux, you can increase the amount for memory available for MinimServer by creating a file named minimstart.conf in the minimserver/etc directory. This file should have a single line containing the following:

javaopts = -Xmx512m

This increases the maximum Java heap size to 512MB. This should be OK on a device with 1GB memory but you will need to verify that this doesn't cause problems for other applications.

You can monitor memory consumption in real time by setting the serverOptions property to resourceInfo=10000, then selecting 'Show log' from the minim icon. The log window will contain periodic resource updates looking like this:

09:59:07.169 resourceInfo: heap bytes used 2339648, consumed 2406408, committed 16515072, max 235274240
09:59:07.169 resourceInfo: non-heap bytes used 10564728, committed 10903552, max 33554431

The inmprtant numbers are heap bytes consumed and heap bytes max. On my Raspberry Pi 3 with a small library, the consumed number is 2.4 MB and the max number is 235 MB. If the consumed number gets close to the max number, you can either increase the max number by settting -Xmx as described above or change your configuration as you have been doing.
Hello Simon, sorry the tag I wanted to mention was sortTags, not itemSort. My bad
I already tried to rise the Xmx memory but I had arrived to the limitations of the RPI 3b.

Thanks a lot for your quick answer
sortTags does not use any extra memory. What Xmx setting are you using and how large is your library?
(11-11-2019 16:51)simoncn Wrote: [ -> ]sortTags does not use any extra memory.

Excellent, thanks.

(11-11-2019 16:51)simoncn Wrote: [ -> ]What Xmx setting are you using and how large is your library?

I have already gone over 512m, I am around 700 and I would prefer to avoid increasing this value as I think it might really leave very little memory to bubbleupnpserver and to the s.o. And basically I am compromising the linux disk caching already (buff/cache are very low).

The library is quite big as it resides on a 8tb seagate archive drive, filling it to around 85%. In time I have created tons of upsampled version of albums and never deleted one.
But the worst offending aspect are IMO the multiple tags I have created to further classifly my library. Infact, after dropping some of them which I was not really using, memory usage dropped to a safer 300MB or so.
Thanks, it is helpful to know this. The design of MinimServer has some trade-offs between speed and memory usage. On present evidence, I think the balance is about right.
You're very welcome, and, again, thank you for your help.
Reference URL's