-
Notifications
You must be signed in to change notification settings - Fork 39.4k
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
Reduce the number of expensive calls in the Windows stats queries for dockershim #104287
Conversation
/lgtm |
unrelated flake #106326 |
/assign @dchen1107 |
/assign @mrunalp |
Hi @jsturtevant, |
We would to have this merged for 1.23. We just need final approval from area owners. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jsturtevant, mrunalp 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 |
/priority critical-urgent |
/remove-priority backlog |
…#104287-upstream-release-1.20 Automated cherry pick of #104287: Reduce calls to docker from dockershim for stats
…#104287-upstream-release-1.22 Automated cherry pick of #104287: Reduce calls to docker from dockershim for stats
…#104287-upstream-release-1.21 Automated cherry pick of #104287: Reduce calls to docker from dockershim for stats
What type of PR is this?
/kind bug
What this PR does / why we need it:
This improves the response time and minimizes the calls to the system stats which reduces overall cpu for kubelet. This is done by passing the container object, which has the information required, instead of querying for it on every container via the dockerservice. It also caches some information like the runtime info so it is not queried on every container.
Dockershim create a new namepiped instance to docker every call causing reads and higher cpu usage. (Containerd re-uses the same namedpipe instance so doesn't see the same cpu spike).
Which issue(s) this PR fixes:
Fixes #104283
Special notes for your reviewer:
I initially included the commits from #105744 but moved it to a separate PR. That PR also improves the overall CPU used here but not opening and list all the containers twice.
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: