-
Notifications
You must be signed in to change notification settings - Fork 32
Sum up TotalLoad over all CPUs and divide it by number of threads #669
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
Conversation
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Lorenz Kästle.
|
c9cdce1
to
9ddec10
Compare
Thank you for the PR. Wouldn't it be enough to simple divide the total load by the number of sockets? $TotalCpuLoad /= $SocketList.Count; At least in my tests I see no reason against that. |
you could do that, but if I understand this correctly you would loose the weighting by number of threads/socket. |
I honestly don't see a problem with that. I agree, that calculating based on threads is more precise for the total load over all sockets. How ever, I doubt you will ever come across a system where the amount of threads a CPU provides is not identical to each other. You wouldn't build a server with two sockets, containing different CPU's and even on virtual machines you can only specify the number of sockets and amount of threads assigned in total. |
I would kindly disagree. This patch is the result of encountering multiple systems where, without this patch, |
The main problem, is that the total over multiple sockets is summed and not averaged currently :) |
@LordHepipud ping |
ref/NC/809410 |
7755e40
to
9697134
Compare
…orts sum as a different metric
9697134
to
97134d7
Compare
On uncommon system configurations (number of sockets > 1) the TotalLoad perfdata of Invoke-IcingaCheckCpu was to high due to it being just summed up over all sockets.
This patch changes this computation, the load weighted by the number of sockets is summed up and then divided by the total number of CPUs.