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

[WIP] feat(nodeadm): Add default system reserved resources #1808

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cartermckinnon
Copy link
Member

Issue #, if available:

Fixes #1490

Description of changes:

This PR's goal is to add a default CPU and memory reservation for the /system cgroup. We do not intend to enforce this reservation (i.e. throttle processes within this cgroup); this would merely subtract resources from the Node's allocatable totals, to provide more overhead in the event that pods burst beyond their limit(s).

This PR will only make this change for AL2023. It's unlikely at this point that we'll do this for AL2, especially on existing k8s versions, as it would decrease a cluster's total allocatable resources.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@@ -119,6 +122,7 @@ func defaultKubeletSubConfig() kubeletConfig {
CgroupRoot: "/",
ClusterDomain: "cluster.local",
ContainerRuntimeEndpoint: containerd.ContainerRuntimeEndpoint,
EnforceNodeAllocatable: []string{"pods"},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the default -- just making it explicit here that we aren't enforcing either kube or system reserved.

@cartermckinnon cartermckinnon changed the title [WIP] (al2023): Add default system reserved resources [WIP] feat(al2023): Add default system reserved resources May 17, 2024
@cartermckinnon cartermckinnon changed the title [WIP] feat(al2023): Add default system reserved resources [WIP] feat(nodeadm): Add default system reserved resources May 17, 2024
@cartermckinnon
Copy link
Member Author

I'm starting off by measuring the CPU and memory usage at idle for the m7i family (general purpose Intel).

I launched a 1.29 cluster with the following instances:

Instance type vCPU Memory (GB)
m7i.large 2 8
m7i.xlarge 4 16
m7i.2xlarge 8 32
m7i.4xlarge 16 64
m7i.8xlarge 32 128
m7i.12xlarge 48 192
m7i.16xlarge 64 256
m7i.24xlarge 96 384

I grabbed the maximum CPU utilization (in vCPU's) for each instance and calculated a linear regression:

vCPU Max usage at idle (vCPU)
2 0.0458
4 0.0587
8 0.0729
16 0.097
32 0.1289
48 0.1574
96 0.2815
y = 0.0024 * x + 0.0497

Screenshot 2024-05-17 at 4 15 08 PM

@tooptoop4
Copy link

will this apply to bottlerocket?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a default systemReserved configuration to the kubelet-config.json
2 participants