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

feat(nodeadm): use cached kubelet version to reduce config time #1991

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

cartermckinnon
Copy link
Member

@cartermckinnon cartermckinnon commented Oct 4, 2024

Issue #, if available:

Improves #1751.

Description of changes:

This PR aims to reduce nodeadm-config time by determining the kubelet version using a text file created during the AMI build process, instead of executing kubelet --version.

Using kubelet --version involves EBS lazy-loading time plus the overhead of the child process, and doing this during nodeadm-config delays execution of the user's user data scripts and nodeadm-run.

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

@cartermckinnon
Copy link
Member Author

cartermckinnon commented Oct 15, 2024

Node logs are now collected for CI jobs: #2010

I'll use those to establish a baseline.

/ci

@awslabs awslabs deleted a comment from github-actions bot Oct 15, 2024
@awslabs awslabs deleted a comment from github-actions bot Oct 15, 2024
Copy link
Contributor

@cartermckinnon roger that! I've dispatched a workflow. 👍

@awslabs awslabs deleted a comment from github-actions bot Oct 15, 2024
@awslabs awslabs deleted a comment from github-actions bot Oct 15, 2024
Copy link
Contributor

@cartermckinnon the workflow that you requested has completed. 🎉

AMI variantBuildTest
1.24 / al2023success ✅success ✅
1.25 / al2023success ✅success ✅
1.26 / al2023success ✅success ✅
1.27 / al2023success ✅success ✅
1.28 / al2023success ✅success ✅
1.29 / al2023success ✅success ✅
1.30 / al2023success ✅success ✅
1.31 / al2023success ✅success ✅

@cartermckinnon
Copy link
Member Author

cartermckinnon commented Oct 15, 2024

Some baseline samples:

Kubernetes version Instance type nodeadm-config time (seconds)
1.31 m6i.xlarge 17.406945654
1.31 m6i.large 17.409374325
1.31 m6i.large 17.408536641
1.24 m6i.large 19.236049873
1.24 m6i.xlarge 19.219271525
1.24 m6i.xlarge 19.179944831

@cartermckinnon
Copy link
Member Author

cartermckinnon commented Oct 15, 2024

Added /etc/eks/kubelet-version.txt, we'll see how much that improves the timings...

/ci

Copy link
Contributor

@cartermckinnon roger that! I've dispatched a workflow. 👍

Copy link
Contributor

@cartermckinnon the workflow that you requested has completed. 🎉

AMI variantBuildTest
1.24 / al2023success ✅success ✅
1.25 / al2023success ✅success ✅
1.26 / al2023success ✅success ✅
1.27 / al2023success ✅success ✅
1.28 / al2023success ✅success ✅
1.29 / al2023success ✅success ✅
1.30 / al2023success ✅success ✅
1.31 / al2023success ✅success ✅

@cartermckinnon
Copy link
Member Author

cartermckinnon commented Oct 16, 2024

Some samples using /etc/eks/kubelet-version.txt:

Kubernetes version Instance type nodeadm-config time (seconds)
1.31 m6i.xlarge 1.228009856
1.31 m6i.xlarge 1.383285926
1.31 m6i.xlarge 1.123423626
1.24 m6i.xlarge 2.141777731
1.24 m6i.xlarge 2.091775114
1.24 m6i.xlarge 2.043645506

@awslabs awslabs deleted a comment from github-actions bot Oct 16, 2024
@awslabs awslabs deleted a comment from github-actions bot Oct 16, 2024
@cartermckinnon
Copy link
Member Author

cartermckinnon commented Oct 16, 2024

Definitely a major improvement:

Kubernetes version nodeadm-config time difference
1.31 -92.85%
1.24 -89.11%

@cartermckinnon cartermckinnon changed the title [WIP] feat(nodeadm): use cached kubelet version feat(nodeadm): use cached kubelet version to reduce config time Oct 16, 2024
Copy link
Member

@Issacwww Issacwww left a comment

Choose a reason for hiding this comment

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

🚀

Copy link
Member

@ndbaker1 ndbaker1 left a comment

Choose a reason for hiding this comment

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

nice gains!

@ndbaker1 ndbaker1 merged commit 57d74d0 into main Oct 16, 2024
10 checks passed
@ndbaker1 ndbaker1 deleted the cache-kubelet-version branch October 16, 2024 03:48
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.

3 participants