Skip to content
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

Request basic memory for antrea-controller #6233

Merged

Conversation

tnqn
Copy link
Member

@tnqn tnqn commented Apr 17, 2024

Starting with K8s v1.22, system-cluster-critical Pods no longer get low OOM score like system-node-critical Pods. antrea-controller's OOM score adjustment was changed from -997 to 999 passively, which made it just have a bit higher chance of survival over best-effort Pods (OOM score adjustment: 1000). While it's hard to say how much memory it can use as it's highly related to the scale of the cluster, we can add a basic memory request which can decrease the score a bit according to the formula for burstable Pods:

oomScoreAdjust := 1000 - (1000*memoryRequest)/memoryCapacity

It should also be a bit helpful to avoid antrea-controller to be scheduled on a Node with very few available memory.

@tnqn tnqn added the action/release-note Indicates a PR that should be included in release notes. label Apr 17, 2024
@tnqn tnqn added this to the Antrea v2.0 release milestone Apr 17, 2024
@tnqn tnqn requested a review from antoninbas April 17, 2024 12:03
Starting with K8s v1.22, system-cluster-critical Pods no longer get low
OOM score like system-node-critical Pods. antrea-controller's OOM score
adjustment was changed from -997 to 999 passively, which made it just
have a bit higher chance of survival over best-effort Pods (OOM score
adjustment: 1000). While it's hard to say how much memory it can use as
it's highly related to the scale of the cluster, we can add a basic
memory request which can decrease the score a bit according to the
formula for burstable Pods:

  oomScoreAdjust := 1000 - (1000*memoryRequest)/memoryCapacity

It should also be a bit helpful to avoid antrea-controller to be
scheduled on a Node with very few available memory.

Signed-off-by: Quan Tian <quan.tian@broadcom.com>
@tnqn tnqn force-pushed the request-memory-for-antrea-controller branch from 0ab884c to 786582f Compare April 17, 2024 15:03
@antoninbas
Copy link
Contributor

/test-all

@antoninbas antoninbas merged commit 4bc74d2 into antrea-io:main Apr 17, 2024
51 of 56 checks passed
@tnqn tnqn deleted the request-memory-for-antrea-controller branch April 18, 2024 03:34
@tnqn tnqn added the kind/bug Categorizes issue or PR as related to a bug. label Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/release-note Indicates a PR that should be included in release notes. kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants