Excessive mono-sgen CPU usage on Ubuntu Server

I have a headless Roon Bridge server setup on a Raspberry Pi 4 using Ubuntu Server 20.04.3 (LTS). While Roon Bridge is running (standard install following the guide on this site) mono-sgen will occasionally creep up to 100% CPU usage and will only reset or decrease if the process is killed or the Roon Bridge system service is stopped. This has been happening since the server was configured, and Ubuntu and Roon are up to date.

I can provide any necessary logs but figured I’d start to see if this is a documented problem and if there’s anything I can do.

Thanks for the report, no this is not something we are aware of or tracking.

Can you ps x <pid> next time this is happening and get the full command line of the offender?

I think Roon Bridge may have two mono-sgen processes, just want to make sure we understand which one is involved.

1 Like

Sorry, had some formatting issues with my last post and accidentally deleted - here’s the output for ps when mono-sgen is at 100% CPU usage:

    PID TTY      STAT   TIME COMMAND
   1900 ?        Sl   1443:35 RAATServer --debug --gc=sgen --server RAATServer.exe
   1937 ?        Ssl    0:04 /usr/bin/python3 /opt/camillagui/main.py
   8211 ?        Ss     0:00 /lib/systemd/systemd --user
   8212 ?        S      0:00 (sd-pam)
   8317 ?        R      0:00 sshd: {username}@pts/0
   8318 pts/0    Ss     0:00 -bash
   8445 pts/0    R+     0:00 ps x 1900

I’ll also restart Roon and use a non-Camilla DSP output to make sure that’s not related or causing this problem, and report back if it’s fixed.

Confirming that it happened again with Camilla DSP out of the signal chain:

    PID TTY      STAT   TIME COMMAND
   8726 ?        Sl   2787:11 RAATServer --debug --gc=sgen --server RAATServer.exe
  17783 ?        Ss     0:00 /lib/systemd/systemd --user
  17784 ?        S      0:00 (sd-pam)
  17890 ?        S      0:00 sshd: {username}@pts/0
  17891 pts/0    Ss     0:00 -bash
  17908 pts/0    R+     0:00 ps x 8726