Memory use grows and grows and grows...?


I know my QNAP HS-251+ has only 2GB, but it has been running roon for the last 2 days (since build 323) without issues. I have noticed today however that roon server memory use was growing and growing as I played music throughout the day. It started around 500MB, until it doubled to 1.1GB at which point I did get a few drop outs. I was watching it for 10 minutes by the end and it steadily kept creeping up. After stopping playback and disconnecting roon control it just stayed at 1.1GB and didn’t reduce back down again. After restarting it, it is back down to 400MB.
Is the memory growth normal during playback, and is it normal for it to keep hold of it? I wonder is a few more hours tomorrow it would have fallen over?

I can’t recall the precise language here, but I found that whenever I opened a connection to my NAS (e.g., opening the Finder) that the NAS started a new process which chewed up more memory. If you can look at the number of processes your NAS is using, that number may be getting large.

I cancelled/stopped/deleted processes that were older connection sessions, and memory was freed. Perhaps this is happening to you.

Sorry, not a techie. Forgive the poor nomenclature.

That memory usage seems a little high, but not any reason for concern. How many tracks are in your library?

Roon is often working in the background, updating metadata in your library, analyzing audio, and so on – it’s not designed to be a lightweight media player. That’s one of the reasons we don’t recommend running your Core on under-spec’d NAS.

It’s possible something else is happening here, but it’s also possible that restarting temporarily killed some processes that are going to kick off again in the future. If these problems persist, the real solution may just be to run your Core on a device that’s closer to our recommended specs.

More information about our Core requirements are here as well.

1 Like

On my Ubuntu server Roon core is allocated around 1.3 to 1.5GB memory for a single zone, so you probably do need the recommended minimum of 4GB to run core.

However, I think your problems are with the processor too: the Intel Celeron J1900 is not on par with the recommended NUC. Although it should be fine sans DSP with sufficient memory and an SS.

Are you running on SSD or spinning disk?

Hi all, thanks for you responses. Yes I know my NAS is not up to spec, which is why I’m evaluating roon during the free trial to see how it copes. So far it has mostly behaved really well (probably because my library is only 1000 albums).
I was monitoring the memory usage by process, so while overall memory usage (other than roon) was stable, it was roon that was steadily growing, at the top of the list. I can see how it may grow while I’m actively using it (browsing, searching, applying focus etc.) but there must be a limit or it would eentually run out of memory no matter how much you had. I have other servers running and none of them do that even when being used. Plex comes to mind as similar to roon in that it does update metadata and other things for movies on-the-fly but it seems more disciplined in how it manages its memory.
The other thing that concerned me is that even after I stopped using it, although it stopped growing, it never released any memory it was using before. Perhaps the roon team could take a look at that.
I have set a schedule now so it restarts every night, so at least it will only ever get as big as day’s usage needs. Seeing as it starts with around 400-500MB that should ease any potential memory leak issues.

Are you referring to virtual memory size or resident memory size? After restarting Roon, I see resident memory usage of around 500MB when idle and this increases to a little over 600MB when playing to a single zone. Virtual memory is > 2GB.

I’ll monitor this too over the weekend.

Not sure what you mean by virtual/resident? I was referring to the reported memory usage of Roon according to the QNAP’s resource monitor. I restarted roon (not the QNAP itself) overnight and it’s been idling at ~300MB memory use all morning.

Virtual is the total amount of memory the program is able to access whereas resident is how much the program is currently consuming.

Got you. The figures I gave are all the amount roon was consuming/resident in that case. Virtual is “available” in QNAP terms then - never gone below ~20%.

Now up to 1.1GB.

Yesterday I stressed tested:
Cold start - 300MB
After 2 hrs of playing music by shuffle - 1.02GB
After idle for 2 hrs - 1.04GB
After 1 hr playing a playlist - 1.15GB
After another 1.5 hours - 1.18GB

I then played a movie through Plex on the same NAS to see if that would still be OK. It played with no problems. Checked Memory again, roon was down to 800MB
Turned off schedule to leave it idling over night, this morning it’s up to 940MB

Will play more today.

People are to obsessed by memory use. I would be more worried if an aplication like Roon doesn’t make use of your ram. That’s what it is there for. It buffers, it caches, it makes processing easier on your cpu, it reduces disc access, it speeds things up. Memory is there to be used, it’s of no use when you try to keep it down. Look at it the other way around. Offcoarse it can get out of hand by faulty processes but with only 1.18gb of usage that does not seem to be the case.pretty normal behaviour

I understand that Nyquist. I only want to know when/if it will run out :wink: The fact it grows even when idle, and I am trying on an only-2GB NAS, that may well happen. Not that it will have impact on whether I go ahead after the trial becsue there are ways around it. And if there is a memory leak/faulty process, I’m sure Roon would like to know!

1 Like

Well, I have played another hour’s worth, and this time the memory use went down - got as high as 975MB, now 860MB, while still playing.
So I think we’re OK for now.