-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
processor, v3/processor (Win): fix slow cpuinfo on multisocket config #1088
Conversation
updated win32_Processor struct to exclude loadpercentage field. The loadpercentage takes linearly more time as the # of sockets increases. By default vSphere maps 1 vCPU to 1 socket, resulting in very poor performance when getting CPU info against, saying, 40 vCPU VM (basically 40 sockets as seen by the VM).
@shirou - any chance we could prioritize this? This particular issue is trickling down through our usage of Nomad and in turn the long fingerprint times on our ESXI hosts are causing issues. Very much appreciate the work you've done, and our ability to contribute to this. If you need us to address anything on the PR please let us know and we will be happy to do so. Thanks! |
I can only have a time on weekends. |
Thank you for your contribution and your patiant.
|
Hi @shirou thanks for reviewing! See my comments above:
However if you are fine with "breaking" the contract for |
Oh, OK, I understand. Then, it is a good implementation! Thank you so much! |
Hi @shirou looks like the shellcheck is the only part fails, but that feels unrelated to the pr's change. Could you help to take a look at that? Thank you! |
some of the tests are stoled but mostly ok. So I merge this PR. Thank you! |
Thanks so much @fredwangwang and @shirou ! |
Hi @shirou is it possible to cut a new release? The downstream package consumer (hashicorp nomad) prefers a tagged build instead of using a specific sha. Thanks in advance! |
gopsutil will be released on end of month. |
Ty!
…On Tue, Jun 22, 2021, 8:13 AM shirou ***@***.***> wrote:
gopsutil will be released on end of month
<https://github.com/shirou/gopsutil/#tag-semantics>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1088 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFFPT2KGHJPVT33MSKDEBITTUCLB5ANCNFSM46WNSJYA>
.
|
updated win32_Processor struct to exclude (unused) LoadPercentage field.
The loadpercentage takes linearly more time as the # of sockets
increases. By default vSphere maps 1 vCPU to 1 socket, resulting in very
poor performance when getting CPU info against, saying, 40 vCPU VM
(basically 40 sockets as seen by the VM).
Here is the before and after time comparison:
changes:
for cpu:
since
Win32_Processor
is a public struct, created a substruct named:Win32_ProcessorWithoutLoadPct
for use in all queries without breaking any potential usage of the public api.for v3/cpu:
since the struct now is private, simply removed
LoadPercentage