CPU and RAM usage constantly increases on an idle jitsi server

Hi!
I am a total noob at server administration. I’ve been running Linux on my desktop at home for a year now, so systemd and general Linux things don’t scare me, but it’s my first time dealing with server related stuff. To slowly ease into what this entails, I’ve started renting servers on Digital Ocean, and I’ve installed a jitsi on one of them.
I used the tutorial from Digital Ocean, and I have installed jitsi-meet on Debian 10 from the https://download.jitsi.org stable/ repository via apt.
I have set it up and tested with multiple devices whether it works or not but because I have a day job I let the server just run idle for a few days. I have set it up so that no one can start a conference without signing in as the moderator.
What I observed is that the CPU and memory usage is slowly but surely increases day by day, hour by hour. What might be the cause of this behavior? Running top on the server tells me that java, ran by the user jvb eats up currently 9~11 % of CPU and 35.4% MEM. (I attached the respective graphs below)

The dip around 9PM 9/11 is actually when I restarted the servers, because after installation, I didn’t finish up the whole setup.

Any kind of help on how to troubleshoot this issue (will my CPU usage go to 100% eventually?) is greatly appreciated. Thank you for your help.

1 Like

The CPU usage problem was fixed in latest master/unstable, we have not pushed a new stable with that fix yet.
The memory usage is known and expected. This has something to do with how GC (garbage collection is working), by default jicofo and jvb will use up to 3GB of RAM each and will not go beyond it. It is just not so aggressive in cleaning.

1 Like

Thank you for the quick answer, then I’ll be waiting patiently for the fix to land.

Is there any way to ensure they won’t need 6GB ram in total (maybe by opting in for a more aggressive GC?)? I’m not planning to use it for large HD video conferences, mostly just a one-one sessions, and I couldn’t justify renting a server with that amount of RAM, I try to stay on what fits within the family budget.

Thank you for the assistance, it’s greatly appreciated.

1 Like

Great, thank you, you are the best!

I was waiting for this fix! thanks

Hi, it’s me again.

I have added the JICOFO_MAX_MEMORY=3072m line to the /etc/jitsi/jicofo/config file, and restarted all the jitsi related services (jicofo, jitsi-videobridge2, prosody). I don’t really see a big difference in memory consumption, but I haven’t done the VIDEOBRIDGE_MAX_MEMORY=3072m addition for jvb, and now that I wanted to add that too, well, I’m stuck. What configuration file should I modify?

Sorry for the noob questions, and thank you for the help.

It is /etc/jitsi/videobridge/config.

This is the default value so you didn’t change much.

1 Like

Thank you for the fast reply!
I haven’t noticed that I just used the default value. I have changed it to radically lower value (512m for both), to see what happens.

Just out of curiosity, what problems might arise if I set the max memory values too low?

At some point, processes can struggle for memory, throwing OutOfMemory exception or jvb running garbage collection too often using more CPU for that, and conference meeting quality suffers. If you don’t expect many participants concurrently, most probably you will not hit that.

Looks like the latest stable is 4966 dated 25-AUG, which suggests this fix is not yet there. I’m seeing the same thing…

Can you point me to the commit that fixes this issue? I’m not seeing anything referencing a CPU issue.

The latest stable is 5076.

This is the fix we found as a problem of the high cpu usage https://github.com/jitsi/jitsi-videobridge/pull/1415

1 Like