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
node: metrics: cpumanager: add metrics about pinning #112855
Conversation
/sig node |
/cc |
/triage accepted |
/hold |
8607df3
to
4f039c0
Compare
/retest-required |
e24dd93
to
171b921
Compare
// Metrics to track the CPU manager behavior | ||
CPUManagerPinningRequestsTotalKey = "cpu_manager_pinning_requests_total" | ||
CPUManagerPinningErrorsTotalKey = "cpu_manager_pinning_errors_total" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What impact does adding these as kubelet metrics have if we ultimately decide to move the cpumanager outside of the kubelet as a pluggable component (as @catblade and others have been proposing).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't say atm. it depends on the specifics of the move. Adding metrics to have observability of cpumanager was explicitely mentioned as GA requirement, so I believe that whatever direction we take to extract cpumanager & co, we will need to provide comparable metrics and observability features as prerequisite for GA.
171b921
to
d03e8ca
Compare
@fromanirh: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the comment below, this looks good to me now. I'd still like to hear from @catblade what her thoughts on this are. It feels weird to add these metrics now, just to turn around and remove them next release if the cpumanager is pulled outside.
In order to improve the observability of the cpumanager, add and populate metrics to track if the combination of the kubelet configuration and podspec would trigger exclusive core allocation and pinning. We should avoid leaking any node/machine specific information (e.g. core ids, even though this is admittedly an extreme example); tracking these metrics seems to be a good first step, because it allows us to get feedback without exposing details. Signed-off-by: Francesco Romani <fromani@redhat.com>
Add tests to verify the cpumanager metrics are populated. Signed-off-by: Francesco Romani <fromani@redhat.com>
d03e8ca
to
bdc08ea
Compare
Given that we have similar metrics for the |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dashpole, fromanirh, klueska, logicalhan, SergeyKanzhelev The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@klueska Apologies-was at KubeCon, so was waiting to return to respond. The proposal I have, and the code involved, would move the cpu manager into the plugin, so this would not be wasted work. It would just be available in the default plugin. If people chose to use plugins with other functionality, they could, but there is no reason not to merge this (I see it was merged). |
Great. Thanks for the confirmation. |
In order to improve the observability of the memory manager, kickoff the related metrics with the minimal desired set of allocation and errors count, similarly to what we did in cpumanager in kubernetes#112855 . We intentionally take a minimallistic approach, adding metrics once we have a clear use case for them and high confidence they will be useful. Signed-off-by: Francesco Romani <fromani@redhat.com>
What type of PR is this?
/kind feature
What this PR does / why we need it:
Add metrics to track the cpumanager allocation/pinning behavior and failures.
Which issue(s) this PR fixes:
Fixes #112854
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
Lack of cpumanager metrics emerged during the review of the KEP tracking the promotion to GA of the cpumanager.