Skip to content
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

High CPU usage with demo-null #24

Open
hinxx opened this issue Sep 26, 2023 · 1 comment
Open

High CPU usage with demo-null #24

hinxx opened this issue Sep 26, 2023 · 1 comment

Comments

@hinxx
Copy link

hinxx commented Sep 26, 2023

I've running demo-null locally and it seems my browser (brave) on Linux is using a lot of CPU resources in >10 threads when just visiting http://localhost:5000. I'm not even interacting with the UI. As soon as I close the tab with the UI the CPU load on those threads goes to 0 %.

Screenshot_2023-09-26_09-31-25

Is this expected?

@pthom
Copy link

pthom commented Apr 18, 2024

I also observe a high CPU usage under macOS with demo_null.

However, I'm not sure whether it is a real issue or an issue with the measuring tools. Let me explain:

Under Firefox (macOS, mac M1)

I observe 45% CPU usage
Here is what I see with Firefox profiling tools: No significant time is taken by the JavaScript code.

image

Most of the time is spent inside a native call to GetRunnableForMTTask which is probably part of the TaskController API. GetRunnableForMTTask in turn calls __psynch_cvwait (which is probably waiting for a condition variable).

Is this wait really active, or is this counted as using CPU when it is not, I don't know.

Safari: no CPU spike

I did not observe a significant CPU spike with Safari.

Chrome: CPU usage raises
I do observe a significant CPU spike (about 40%).

However, when running the performance profiler, I could only observe the JavaScript performance, which is not causing the CPU load (it took 200ms on a 10 second profiling session)

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants