Does removing the library help Roon memory leaks?

I’ve been using Roon for five years or so. I have largish library (55,000 songs) which I have setup as per Roon recommendations.

I started with Roon on an Intel Mac (8gb), switched to a PC (16gb), tried out a NUK, switched back to a PC, and have now switched back to a Mac.

All have had issues with memory leaks that require regular restarts. It’s like Roon and Chrome are battling it out for worst in class.

Recently I worked out that I don’t actually use Roon to explore my library. My library was iTunes based and my tags designed on that basis. Roon mangles them just enough I find using Apple Music is much easier. Plus Roon’s shuffle failings drive me nuts.

Roon’s only real benefit for me is its network capabilities.

I estimate that 95%+ of my Roon useage is as a streaming interface for playlists extracted from Tidal. It’s a tad annoying that Tidal (or Apple Music) doesn’t have the network capabilities of Roon so I end up paying double for my streaming music, but such is technology.

Anyways, after yet another Roon freeze on my PC, I switched back to using my Mac as the server and decided not to import my library.

It feels like this has significantly reduced the memory demands, but this could be just because my Mac (M1 Mini) is inherently far more powerful and stable than my PC (i7-8700).

Which is my long-winded way of asking whether library size does in fact reduce Roon memory demands on the host computer?

Yes.

Number of tracks in the library is directly related to database size, which in turn is directly related to RAM requirements. That’s why the specification help page gives estimations for different RAM sizes depending on the number of tracks in the library.

I don’t believe that the required regular restarts of Roon are being caused by a memory leak but rather it seems that it is the way Roon’s database is set up that makes regular restarts of Roon necessary. Plus the larger one’s music library, the more frequent the restarts. Perhaps someone more knowledgeable about database structures, and Roon’s database structure in particular, can offer some additional information.

When you tried the NUC was that using Rock or Windows OS? I have a NUC/ROCK server and as far as I can tell it doesn’t suffer from memory leaks. Mine is only power cycled 2 or 3 times a year when required for upgrades or maintenance. I recall once that it had been running for 200 days between cycles.

1 Like

@Mike_LC Do you mind if I ask you a few things since your experience with Roon differs quite a bit from my Roon experience.

First, how large is your Roon library and how much your Roon library is local files and how much is linked from Tidal/Qobuz?

Second, how often do you add new items to your Roon library and how much editing/cleaning up of your Roon library do you do and how often?

I ask these two+ questions because I have a very, very large Roon library (over 1 million tracks with about 80% local files and 20% Tidal/Qobuz linked files) which I add new music to and edit almost daily. The more music I add and the more I edit the database then the more often I need to restart Roon.

Roon is running via a Docker container on a dedicated UnRaid server.

From Wikipedia:

Unraid is a proprietary Linux-based operating system designed to run on home servers in order to operate as a network-attached storage (NAS) device, application server, media server and a virtualization host. Unraid is proprietary software developed and maintained by Lime Technology, Inc. Users of the software are encouraged to write and use plugins and Docker applications to extend the functionality of their systems.

My Stats show 1031 albums, 15383 tracks. Not a lot. Around 300 rips and downloads with the rest from Qobuz and Tidal. The physical storage is internal on the NUC.

Adding new rips and downloads comes in spurts but it has been awhile since I physically added new music. I do regularly add links for Qobuz and Tidal as new music is discovered.

I’ve never done any editing or cleanup. Sometimes I delete linked music when I happened to get new cd for rips or downloaded versions. Most of the latest albums I’ve added has been DSD multi-channel and Stereo downloads. Not really a need for any cleanup that I’m aware of. Also never had a reason to do any restores from backups.

I’ve had zones running for days on end in my office and at least a week when my wife switched from music to TV in the media room without stopping the music.

The only issue I have with this setup, NUC8I7BEH/ROCK from 2019, that requires intervention is when Roon Radio selects a DSD 256 5.1 file for playback with the HDMI zone and it has to be converted to PCM 5.1. That drags the processing speed down to 1X causes skips and such.

I’m knocking on wood, don’t want to jinxs myself.

Thank you for your detailed response.

By “editing” I am referring to things like trying to identify “unidentified” albums, adding or changing cover art, merging “unidentified” albums so that they can be properly identified, etc.

Roons memory usage grows and grows even on ROCK you just can’t see what it’s doing. Editing or adding new music, searching, playing all adds to it. Before I stoped using Roon it would easily consume 5-7gb of memory if editing and constant usage. I don’t have a large library still under 3k and about 35k tracks, little unidentified albums, but I add new local music all the time. Stopped adding streaming to my library as that brought other issues. In comparison using LMS with very light library management is far faster at searching and retrieval, uses less than a 1gb of memory. It also gathers additional metadata so it’s not just reading my files. Don’t have to restart it unless it’s needed for updates as it just continues to be performant.

1 Like

I really have no idea why this setup doesn’t run into issues as others do. If it is related to memory then perhaps its because I have 32GB of ram and the memory creep doesn’t reach a critical point between cycles. But it didn’t have issue with 16GB ram for the first couple of years.

Same here with 16 GB and 44k tracks. ROCK didn’t crash once in 4 years of Roon, so clearly the RAM usage doesn’t grow forever in my case (or it would crash).

Never crashed on me but doesnt mean it doesnt have memory issues or uses a lot. My library should have easily fitted in 4gb given Roons specs but it was way over all the time on Linux. why would this be? It seems that RoonOS has more conservative memory usage on other platforms it seems to run wild.

You wrote

If it grows and grows, then it eventually needs more than available and then ROCK crashes.

That’s not to say that the much discussed periodic slowdown issues don’t exist. Those are the problem, but using available memory isn’t. RAM is there to be used, empty RAM on a single-purpose machine is good for nothing.

I have a 12+ year old i3-4010 NUC with 8GB RAM and around 50, 000 tracks. I am able to upscale to DSD 256 and have 10 band PEQ x 2 speakers with no buffering or memory leaks.

I use ROCK/Roon OS and would suggest that over windows or MacOS every time.

1 Like

I wanted to share some insights and recommendations based on my experience managing Roon on a Mac mini with an M2 chip, which has greatly improved system stability and performance. A critical change I made was in the Roon software settings, specifically around the audio analysis features, which I believe have had a significant impact on managing memory usage and reducing potential memory leaks.

Critical Roon Settings Adjustments:
1. Audio Analysis Speed Settings:
• Background Audio Analysis Speed: This setting controls how fast Roon analyzes your music library when the system is not actively playing music. I set this to Throttled to reduce the CPU load, which in turn minimizes the risk of causing memory leaks due to excessive and prolonged CPU usage.
• On-Demand Audio Analysis Speed: This setting affects the analysis speed when you play a track that hasn’t been analyzed yet. I recommend setting this to Normal, allowing for a balance between performance and resource usage.

Impact on Memory Leaks:
• Reduced CPU and Memory Strain: By throttling the background analysis, the system is less likely to be overwhelmed, which can contribute to memory leaks when resources are not properly released after heavy use.
• Stability Over Speed: Prioritizing stability over speed has helped maintain a more consistent system performance, preventing the Roon Core from becoming unresponsive or requiring frequent restarts.

1 Like

My experience is quite oposite. I’m running Roon 6 years already on Intel NUC I7 with 16 GB RAM and 256GB SSD on ROCK. My Library is on NAS with two 8TB HDD, has about 150K tracks, fairly big. Includes a lot of raw DSD 64, 256 and 512. Never froze, nor crashed. The only time I restart it is after update. Occasionally, once in a blue moon I perform clean up.

Not to say that Roon is flawless, no software is, but it performs rather well and stable. When you had setup on NUC was it running on ROCK? Any other OS, other than ROCK has way too many background processes running clogging memory and CPU.

I can’t imagine Roon are going to solve the issue with needing regular reboots. My suggestion was to allow users to schedule reboots (for instance 3 am if nothing is playing). I have to reboot once per day on average and this would save me a lot of time wasting.

Not sure what OS you’re running on your PC. I have had to tweak my Win11 Roon server PC processes down to 120 from 230+. After that no problem. I’ve suspected memory leaks from apps that you’re unaware of running in the background. Best way is to research yourself, it will take a lot of time. It’s worth it, if you don’t want to switch over to Linux or other OS.

Why suggest against macOS and Windows? For some actual characteristics of Roon running on them, or just because you don’t like them?

Off the top of my head - stability (it’s a dedicated custom Linux OS for the sole purpose of hosting roon). It allows me to run high upsampling and 10 band PEQ on a very old, low spec piece of hardware which wouldn’t have a hope in hell of running roon under Windows/or MacOS (not with those settings). Probably not a concern for most but it’s nice having a low power device as my server, and just letting it sit there and not have to do any maintenance apart from clicking update via the windows client or my tablet every now and then. No windows updates or the like to worry about. No memory leaks. Nothing to troubleshoot. Incredibly easy to set up (download image to USB stick, plug in and install).

2 Likes

How do you know it has no memory leak? If doesn’t give you any feedback on anything, closed shop you have to just trust what they say it does. Personally when I had rock I had same issues I experienced using Dietpi. I switched so I could check on what Roons doing.

Discovered it’s actually Roons metadata updates that slowed it down when it does a full update of all metadata. Same issue happened on Rock just could not see what the os was doing to explain the slow downs. I could see it maxes out the single core process Roon runs on and can’t then do other Roon tasks not even playback some times and remotes where disconnected. No other processes on pc where affected just Roons one which is all it uses for the majority of stuff. Only analysis and oddly search runs on separate cores. Memory usage for other processes was very minimal, Roon however starts at 3.5 and grows with constant use more if your searching, editing metadata or adding new music, it doesn’t go down but it never ran out but it consumes more than any other application on same pc.