A memory leak in RoonAppliance?

systemd is showing you all memory, including virtual memory. These numbers are not what you think they are… they are not actually memory consumption. When you set max memory to something lower, it just takes less virtual memory because the VM subsystem is releasing/reallocating more aggressively (more CPU). You could also be running into garbage collection releases happening more often (much more CPU), but not likely at this level.

If you made a real difference with the MaxMemoery thing you set, Roon would crash when it hit that limit.

Are you crashing when you hit large memory numbers?

Let me give you an example from a ROCK system I have running here:

This is the output of top:

  PID  PPID USER     STAT   VSZ  %VSZ CPU %CPU COMMAND
23391 23351 root     S    26.8g 349.0   3  3.5 /roon/app/RoonServer/RoonDotnet/RoonAppliance RoonAppliance.dll -watchdogport=45435

Notably, it is claiming to be using 26.8 gigabytes of memory. Funny, since this machine only has a single 8 gigabyte stick of RAM, and no swap set up. I’n also running a bunch of other things on this machine, which must use some RAM. My guess is that the RoonAppliance in this situation is usually close to 4 gigabytes (about 150k track library).

Roon does spew on stats in it’s log on this, and while it’s not exact either, this is what it shows on my system:

03/10 16:34:59 Info: [stats] 27468mb Virtual, 4706mb Physical, 4288mb Managed, 467 Handles, 94 Threads

Looks better, but probably still off from reality because of garbage collection.

Memory management on modern operating systems is very complex, and the stats about memory consumption at these levels are often misunderstood because they are incomplete and not intuitive.

Moving this ticket out of the #support area as no support is needed here. Roon is operating as designed. It looks to me that your Roon is using something like 1 gigabyte of memory, and the rest of the stats are painting a bad picture.

This is another reason we don’t show information like this in ROCK or Nucleus. It creates irritation on the consumers’ end and wasted support costs on Roon’s end – all for nothing.