calico: don't set calico-node cpu limits by default#11914
Merged
k8s-ci-robot merged 1 commit intokubernetes-sigs:masterfrom Jan 23, 2025
Merged
Conversation
Upstream calico isn't doing that, and: - this can cause throttling - the cpu needed by calico is very cluster / workload dependent - missing cpu limits will not starve other pods (unlike missing memory requests), because the kernel scheduler will still gives priority to other process in pods not exceeding their requests
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: VannTen The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Member
|
In my personal opinion, according to "https://docs.tigera.io/calico/latest/getting-started/kubernetes/hardway/install-node#install-daemon-set", there seems to be no memory constraints (requests, limits). I think it would be nice to do the same for constraints other than |
Contributor
Author
|
I would agree, if not for the potential of breaking stuff.
Removing the CPU limit is unlikely to have bad effects:
- when there is CPU contention on a node, the containers are guaranteed their requests in CPU (module kube/system_reserved, that's another story), by throttling those exceeding their requests (by the kernel)
- there is no node-pressure signal for CPU, because CPU is compressible.
Concretely, that means that the only impact of that change should be:
- pods exceeding their CPU requests might get throttled instead of Calico.
OTOH, memory is not compressible. So an increased memory usage of calico could result in memory node pressure eviction, which is more disruptive than simply throttling.
In the future, I'd like to be way closer to upstream (not just for calico), and when we do that we'll reconsider. But this needs extensive refactoring of the way kubespray deploy k8s objects, and this is not happening any time soon...
|
Member
lunkan93
pushed a commit
to elastisys/kubespray
that referenced
this pull request
Mar 10, 2025
…11914) Upstream calico isn't doing that, and: - this can cause throttling - the cpu needed by calico is very cluster / workload dependent - missing cpu limits will not starve other pods (unlike missing memory requests), because the kernel scheduler will still gives priority to other process in pods not exceeding their requests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Upstream calico isn't doing that, and:
requests), because the kernel scheduler will still gives priority to
other process in pods not exceeding their requests
See the slack thread for further details: https://kubernetes.slack.com/archives/C2V9WJSJD/p1737468771207299
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: