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 on v1.1.2 #105

Open
Helioth opened this issue Jan 24, 2024 · 6 comments
Open

High CPU usage on v1.1.2 #105

Helioth opened this issue Jan 24, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@Helioth
Copy link

Helioth commented Jan 24, 2024

After updating today to v1.1.2, Sauce is using about 80% CPU, Zwift about 10%.
Hiding minimap decreases usage to about 15%. Settings are 30fps and 50% quality.
Was running fine on the previous version.

@Helioth Helioth added the bug Something isn't working label Jan 24, 2024
@mayfield
Copy link
Contributor

mayfield commented Jan 24, 2024

Can you open "Stats for Nerds" from the Settings panel and see see what process is using the CPU?

EDIT: Just saw your mention of minimap, which I assume is the Sauce Map window. You might try enabling GPU Rendering if you haven't already. I think think this is likely just because the new version has a "demo" mode that spins the map when idle, so it maybe drawing more CPU when idle than before, but most especially if you are having to use the CPU for rendering.

@Helioth
Copy link
Author

Helioth commented Jan 25, 2024

Upon closer inspection using Stats for Nerds, it appears it is due to the Nearby Athletes window. CPU usage is quite low for some time, then skyrockets for a while, and finally somehow goes back to almost zero, then ramps up again etc. I have 20 seconds refresh intervals. This behavior didn't show up with the previous version, even though I was on tempus fugit with about 20k people on Watopia and crossing pace partners from time to time.
And btw, I'm indeed on software rendering. Didn't find where to enable GPU for rendering, either in Sauce of in nVidia control panel.

image

image

image

@mayfield
Copy link
Contributor

mayfield commented Jan 26, 2024 via email

@Helioth
Copy link
Author

Helioth commented Jan 27, 2024

Very high CPU comes only after about 5 minutes. Backend service memory usage slowly goes up and has reached about 3.5 GB after one hour.

Monitor is at 144 Hz, but Zwift FPS is caped at 55 FPS using Nvidia control panel. CPU is i7 6700 @3.4 GHz, GPU is GTX 1060 6GB.

I will let you know today how this runs on a less populated world after a long ride with GPU enabled.

EDIT: been observing the CPU usage for a few hours during a 220 participants fondo. The same behaviour for Nearby Athletes window occurs, however with a much lower CPU usage peak which makes it unnoticeable unless watching the stats. It seems there may be some bit of code that is highly nonlinear in the number of nearby users. It appears as well there is some sort of positive correlation between Nearby Athletes Window CPU usage and GPU Bridge CPU usage : peak CPU usages tend to occur about during similar periods of time. It seems for the major CPU peaks to occur there must be really a lot of riders around as this is much less pronounced elsewhere Tempus Fugit.

@mayfield
Copy link
Contributor

mayfield commented Jan 28, 2024 via email

@Helioth
Copy link
Author

Helioth commented Jan 31, 2024

Here we go.

I was able to reproduce the behaviour and capture the log, even though this time it didn't reach the same level of CPU utilization. There was no error in the Console tab.

I recorderd 4 bursts of 5 seconds :

  • abnmormal behaviour after 28 minutes
  • normal behaviour after 32 minutes
  • abnormal behaviour after 54 minutes
  • normal behaviour after 60 minutes

A first observation is the logs related to abnormal behaviour are about ten times bigger than the logs recorded during normal behaviour.

For reference, there were about 18k online on Watopia and I was riding Tempus Fugit.

Log files:
Profile-abnormal-28mins.zip
Profile-abnormal-54mins.zip
Profile-normal-32mins.zip
Profile-normal-60mins.zip

Two screen captures showing memory usage and positive correlation between GPU Bridge and Nearby Athletes when in normal / abnormal state.

After 53 minutes :
image

After 62 minutes :
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants