victronenergy / gui-v2

Other
30 stars 10 forks source link

Consider turning the side panel graphs off on high CPU usage #1125

Closed jpetrell closed 5 months ago

jpetrell commented 6 months ago

After #914 gui-v2 started pausing animations on the Overview page if accumulative CPU load of all the CPUs goes above 85%. Animations become secondary during heavy load (e.g. complex installations with low-powered Cerbo GX) and the system resources need to be freed for more critical background processes.

Consider doing similar thing for the Brief page side panels that can cause fair bit of CPU usage also, especially now with up to 4 graphs animated simulatenously. Tested that I was getting 39-42% CPU usage on Cerbo with 3 animating graphs, and possibly even more with 4 graphs (didn't test).

Though cannot just pause the graphs as then the system will start to show invalid, stale data.

jpetrell commented 6 months ago

This feels equivalent to the Overview page case #914 so assigning the same medium priority.

jpetrell commented 6 months ago

Discussed with @mpvader there are more important items to tackle right now, reducing priority.

mpvader commented 5 months ago

the background: in case of issues, whatever issues, including cpu usage, we'll remove the side panel entirely for v1.0.0.

jpetrell commented 5 months ago

Fix proposal for the issue.: https://github.com/victronenergy/gui-v2/pull/1174

Automatically collapse the side panel if combined CPU utilization goes over 90% and display banner "System load high, closing the side panel to reduce CPU load":

image

jpetrell commented 5 months ago

@jepefe what do you think? Would the above solution be acceptable?

jpetrell commented 5 months ago

There is a risk that the user finds these banners annoying, but the closing may appear as bug if we are not telling the user. We should do something, if the system load is very high the background processes take priority to drawing side panel graphs.

Discussed with @mpvader that let's put the PR #1174 in to get feedback.