HIGH CPU LOAD

magoygoh

New Member
Hello everyone!


I’m a user of the Zorin OS 17 system (recently migrated) and I stream using OBS Studio. I noticed that, unlike on Windows where I used to get at most 12% CPU usage, on Zorin OS OBS is reaching around 20%. I believe this is not normal.

I'm using ffmpeg's AMD Radeon settings and scaling the stream to 720p to reduce throttling, but the high CPU load persists.

Thank you in advance for your help.
 

Tuna

Member
You give almost no info. Attach a log. There can be quite a difference between Windows and Linux. Especially when it comes to browser sources as they are often not hardware accelerated on Linux.
 

magoygoh

New Member
Here's some information:

  • The vast majority of the scenes I use are made up of just a 2-second looped webm video.
  • The scenes that have some browser sources, like alert boxes, are the ones that use the least amount of CPU processing.
  • When idle, even in scenes with only a video loop being displayed, the CPU usage is between 18% and 20%.
  • I'm currently using Zorin OS 17.3. With these scenes and the output settings encoded for the GPU (my GPU is an AMD Radeon 550), the CPU usage is around 18-21% while idle.
  • With the same settings on Windows, OBS previously had a maximum CPU usage of 13% when idle, and that was on rare occasions.
I believe OBS isn't working correctly on the system for two reasons:

  • When I close OBS Studio, even with the "quit obs" button, when I open it again, it shows the message "OBS did not shut down correctly, open in safe mode or normal mode?".

A static OBS operation log is attached.
obs log

...thank you in advance for the support!
 

Tuna

Member
Not sure if the hardware decoding flag is just an option or an actual result if hardware decoding is being used. Could be one cause of the difference. Some of the files definitely don't have that flag turned on.
 
How do you know that the %ages are comparable? The way windows vs linux reports time spent in a process is not going to be equivalent. Also; doesn't that processor have P-states, I'm pretty sure that would impact the %age reported, too.
 

magoygoh

New Member
How do you know that the %ages are comparable? The way windows vs linux reports time spent in a process is not going to be equivalent. Also; doesn't that processor have P-states, I'm pretty sure that would impact the %age reported, too.
Sorry, but I'm an intermediate PC user and part of what you said doesn't make sense to me. The purpose of this post is based on my observation of the demand that OBS places on the same CPU with different operating systems, which seems strange to me given my level of knowledge on the topic.
 
No problem! What I mean is that when you measure % of CPU used, it usually means "Given how many cycles the CPU performed in one second; how many of those were for OBS?" But CPUs can run at different numbers of cycles per second at different times - and the operating system (i.e. Windows or Linux) influences that.

As an example, with my laptop unplugged - I can see the following clock rates (only showing first four cores):

Code:
user@host:~$ cat /proc/cpuinfo | grep "MHz"
cpu MHz        : 1397.164
cpu MHz        : 1397.332
cpu MHz        : 1400.000
cpu MHz        : 1397.320

And when I look at htop; OBS is reporting about 15-16% of one CPU when idle.

Whereas here's what I see with the laptop plugged in using cpuinfo:

Code:
user@host:~$ cat /proc/cpuinfo | grep MHz
cpu MHz        : 2984.146
cpu MHz        : 2992.961
cpu MHz        : 1494.243
cpu MHz        : 1494.066

The numbers bounce around a bit because the P-state is responding to load/demand. When I look at htop, OBS is reporting about 13% of one CPU. Note that overall I see about 3% usage of all the cores on my AMD Ryzen 9 4900HS when OBS is idle.

What I'm saying is: we don't know if Windows or Linux is using "more" CPU yet because we don't know what clock rates Windows/Linux have been working with. The %age isn't enough on its own.

Finally: you might also want to look at the GPU load. I use nvtop (see https://github.com/Syllo/nvtop) and, again, the % GPU used depends whether I'm plugged in or not because the GPU also changes its clock rate based on demand/power settings. So when I'm recording (which requires encoding on GPU) I might see 23% GPU when my laptop is unplugged, but only 5% when plugged in - because the GPU clock rate has changed from 200MHz to 1750MHz.

Of course, this all changes a lot once I'm adding things into the scene, so these numbers are just to illustrate some of the quirks of measuring CPU/GPU usage ... they're not intended to illustrate how much CPU/GPU % you might actually see in the wild.
 
Top