Roon Server memory (RAM) consumption on Linux without vm.swappiness = 0

Of course you have about 65k tracks, while here it is 270k. Roon’s RAM usage depends heavily on the database size.

1 Like

So does the Roon process crash due to a memory leak? Swappiness won’t fix that if so. The point is that it IS OK for a process to use free RAM that’s not in use. There are consequences of forcing swappiness to zero if you really do run out of memory. This article gives a good grounding, some recommendations based on usage and some good reasons not to set extreme values.

https://kx.cloudingenium.com/linux/ubuntu/configure-swappiness-ubuntu/

The given article says (more or less) the same as the articles I have already linked in this thread. With swappiness at a low level (on a server) the kernel should try to let large processes like Roon in RAM and not swap them. With the default of 60 it should swap them much faster (clear RAM).
So if I don’t use the machine as a dedicated Roon server, then I should observe memory usage and adjust vm.swappiness from 10 to maybe 30. (And have a look at RoonAppliance then.)

I appreciate this topic having been raised; for some time now I was observing that after a reboot of my core server, from the second day on the system would be swapping, with plenty of RAM available. I didn’t know about this kernel parameter and have learned something new.

2 Likes

Sounds a sensible approach, the extremes are just that and are probably best avoided. Nothing wrong with tinkering, just be aware of the trade offs involved

1 Like

If there truely is a memory leak, then a bug report might be worthwhile.

It shouldn’t be able to break the system. If swapping is disabled the system will start killing processes when the memory is full. Of course even if swapping is enabled, when the swap and memory are both full, the kernel will start killing processes.

Anyways in general swapping is a good thing and disabling it is not “a fix”. It might be a temporary workaround, but if a program is behaving badly it’s the program that needs fixing.

Might be an environment related bug. I’m running my Roon core on QNAP, not quite the same thing as a normal distro though as QNAP is using busybox as the userland. I have a library of 73180 tracks, I have been running the system for roughly a month without restart and the memory usage for the whole system is 6.5GB.

3 Likes

At various points over the times I’ve used it, I’ve at least suspected the primary Roon Appliance process of leaking memory. I’ve been logging the memory and process stats for the best part of three years but have not done anything with the data gathered. At one point, I could confirm that memory usage would increase until the process was killed and the cycle started again. That seemed to be fixed a year or so back, all on a Debian 11 NUC. It might be time to write a quick script and see what’s been happening lately.

3 Likes

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.