turing-smart-screen-python icon indicating copy to clipboard operation
turing-smart-screen-python copied to clipboard

Improvement of gpu load accuracy using multiple samples on each refresh

Open smandon opened this issue 1 year ago • 2 comments

Hi,

At least on windows with librehardwaremonitor, I feel that gpu load values are not representative with only a single sample taken on each refresh, because there are huge variations and most of the time I get values of 0 or 100%. I made a modification to instead take 100 consecutive samples each time and using the mean value of those 100 samples. This way we get values much closer to what we can get in the task manager or other monitoring tool (e.g. hwinfo) and probably more accurate. I guess it probably won't hurt either for linux and macos.

smandon avatar May 14 '23 12:05 smandon

Hi, thanks for the PR, i'm having troubles with your changes as now the System Monitor Python program uses a lot of CPU resources: the program can take up to 8% of CPU resources on my setup Capture d’écran 2023-05-14 184147

To compare, the System Monitor currently uses ~0% of the CPU using the recommended refresh settings from the themes Capture d’écran 2023-05-14 184245

I think every call to the LibreHardwareMonitor uses some CPU resources, and doing 100 readings in a row create this CPU usage peak which will annoy users of this program

mathoudebine avatar May 14 '23 16:05 mathoudebine

I didn't get that much usage on my cpu, it might be a bit too agressive for lower end cpus. Maybe only a few samples would be enough. Unless there is an option in LibreHardwareMonitor to integrate, which probably would be more cpu efficient than python?

smandon avatar May 14 '23 18:05 smandon