-
-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Abnormally high CPU usage for OBS 31.0.0-betaX versions caused by obs-browser #11485
Comments
I cannot replicate this, enable debug information and profile obs if this replicates on your side. |
Okay. I've rebuilt OBS with Profiling data: perf.data.gz PS: I think the difference time zones may make conversations intermittent, rather than real-time. |
I do not have symbols for your system and custom obs, you must do the analysis with symbols available. I recommend installing the flamegraph collection of tools ( |
I created the flamegraph with:
Flame graph: obs_cpu_spike.svg (Sorry, I can't interpret that data.) |
There were no symbols for OBS in that, so its mostly unhelpful except that obs is spending the majority of your cpu time in getting the current time. |
Okay. I created another flame graph with LBR call graph profiling. maybe it has better accuracy in showing OBS symbols. I've noticed too that there is From image below, you can see that OBS has been running for ~30min but still CPU usage hasn't dropped to the "normal" one. OBS is basically idle but my laptop has started heating up, spinning up the fans. Could it be caused by a misconfiguration in my system? Because you said you couldn't replicate this. |
the problems is the lack of OBS symbols for your data, so changing perf's stack analysis is not going to do anything significant. You need to solve your symbol problem before any analysis of the stacks can be useful. |
I see. I've now installed I'm not sure this is enough. If not sufficient, kindly tell me what to do. I'm new to this kind of debugging. Thanks. |
This seems correct, thanks. |
I got the source tarball for OBS 30.2.3 from github releases and built it with the same CEF. When creating a browser source, there's no CPU spike issue. This could mean the CPU usage abnormality is found in versions >=31.0.0-beta1. It's probable that it's not my system misconfiguration, but an OBS regression. Perhaps to rule this out further, I may need an LXC container for testing ¯\_(ツ)_/¯, but I'll only do it if asked to. Also, I haven't seen anyone report experiencing this issue and you could not reproduce it as well. So I don't really know what that indicates. I couldn't get across the build configuration error stated in my first comment. I think there's some breaking changes in the configs related to cmake since they are in .gitignore, thus not tracked by git, making it hard to build older versions <=30.2.3 from the git repo after |
Your build error on 30.2.x is likely because you did not update submodules to match the Have you tried the 31.0.0-beta3 Flatpak instead of building from source? Your post indicates that you were using a different version of CEF than what we now use. I am not yet convinced this is our bug. |
Mmh, I hadn't thought of checkout on submodules as well. I did I've installed OBS 31.0.0-beta3 from the flatpak beta branch and tested it. The CPU spike issue still occurs with your build. |
I've set up an LXC container for Kali Linux (same as host) and went on to build OBS 31.0.0-beta3 in the container. I installed the build in the container as well as host OS and tested both instances. CPU spike issue still occurs when OBS is run in either guest or host. Maybe this is an issue with Kali Linux as I haven't tested any other OS in LXC ¯\_(ツ)_/¯ |
That is unrelated and you should use the support channels if you have questions about performance, this issue is about when all browser sources have been removed there is high cpu usage. |
Yes it is related!, it is the same problem, when I remove the browser the CPU continues to be high, and only returns to normal when I restart it. |
Post a log from obs then after you trigger this issue. Thanks. |
The log does not report any problems, I believe the problem is in the browser plugin's webkit that is not configured correctly for Linux. Once the obs loads it, it will always be using it (even if you remove the browser from the source, I think the plugin stays in the background). The amount of CPU usage of this browser is abnormal (not even my default browser, discord or anything that uses webkit, does not have this abnormal CPU usage), in X11 it is also 25% of CPU, but if you start obs with I think the problem is the webkit. |
Operating System Info
Other
Other OS
Kali GNU/Linux Rolling 2024.3
OBS Studio Version
31.0.0-beta3
OBS Studio Version (Other)
No response
OBS Studio Log URL
https://obsproject.com/logs/9BLCtWdbxYJWBBhM
OBS Studio Crash Log URL
No response
Expected Behavior
"Normal" CPU usage stats after creating a browser source. Normal in my case is about 3-5% when no other sources are present.
Current Behavior
After creating a browser source, OBS CPU usage spikes to 25-27% and does not fall down whatsoever until I delete the created browser source and restart OBS.
Steps to Reproduce
cef_binary_5060_linux_x86_64
from here.obs
process is maxing out 1 of the 4 logical CPU cores to ~100%.Anything else we should know?
I have rebuilt OBS using several different CEF binaries from spotify and adamcake but CPU spike issue still occurs for every build. So maybe it's not caused by CEF but by OBS internals?
To be certain it's not an OBS regression, I tried building versions 30.2.3 and below but failed because of the configuration error below. I can only configure versions 31+ successfully. Thus I don't know more about the OBS regression hypothesis. How can I fix this build configuration error?
Maybe my build environment is to blame? I don't know yet how to ascertain this. I had older OBS debian pkg builds which were very good but couldn't install them due to missing deps thanks to dist-upgrade. I can't install from your PPA repo either because of dependency conflicts that can't be sanely satisfied. My only functional OBS instance is a flatpak installation ,version 30.2.3, which has no such CPU spike issue.
The text was updated successfully, but these errors were encountered: