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(al2023): initialize critical binaries from EBS filesystem #2011

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

cartermckinnon
Copy link
Member

Issue #, if available:

Improves #1751.

Description of changes:

This PR adds a systemd "template unit" ([email protected]) that is used to "initialize" various critical binaries which are stored on the root EBS filesystem (nodeadm, kubelet, containerd).

EBS blocks are lazily loaded, meaning the first read of one of these binaries usually involves a delay of a handful of seconds. By accessing these files as early in the boot process as possible, this delay is not felt in hot path of nodeadm-config 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 cartermckinnon changed the title feat(al2023): initialize critical binaries from EBS filesystem [WIP] feat(al2023): initialize critical binaries from EBS filesystem Oct 16, 2024
@cartermckinnon cartermckinnon force-pushed the ebs-initialize-bin branch 3 times, most recently from f9141fb to 7879c65 Compare October 16, 2024 19:53
@cartermckinnon
Copy link
Member Author

/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 / al2success ✅success ✅
1.24 / al2023success ✅success ✅
1.25 / al2success ✅success ✅
1.25 / al2023success ✅success ✅
1.26 / al2success ✅failure ❌
1.26 / al2023success ✅success ✅
1.27 / al2success ✅success ✅
1.27 / al2023success ✅success ✅
1.28 / al2success ✅success ✅
1.28 / al2023success ✅success ✅
1.29 / al2success ✅success ✅
1.29 / al2023success ✅success ✅
1.30 / al2success ✅success ✅
1.30 / al2023success ✅success ✅
1.31 / al2success ✅success ✅
1.31 / al2023success ✅success ✅

@cartermckinnon
Copy link
Member Author

Looks like we got a comparable speedup in nodeadm-run as we did in #1991 for nodeadm-config. 🥳

I've opened #2012 to get some better numbers in the log bundle.

@cartermckinnon
Copy link
Member Author

Gathering systemd-analyze output...

/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 / al2023skipped ⏭️skipped ⏭️
1.26 / al2023skipped ⏭️skipped ⏭️
1.28 / al2023skipped ⏭️skipped ⏭️

@cartermckinnon
Copy link
Member Author

Scoping down to AL2023 only

/ci
+workflow:os_distros al2023

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 17, 2024

Before

Expand

before-1

Expand

before-2

Expand

before-3

After

Expand

systemd-analyze

Expand

systemd-analyze

Expand

systemd-analyze

@cartermckinnon
Copy link
Member Author

cartermckinnon commented Oct 17, 2024

The new units are having the desired effect, the units execute alongside nodeadm-config and cloud-init.

containerd benefits most from this change. Before, it took 2.5-5 seconds to become active. After, it takes about 500ms, with much less variation in timing.

This allows kubelet to become active 2-4 seconds earlier after this change. I expect #2000 to shave another 1-2 seconds off this, as well as make the timing more consistent.

There is no noticeable benefit of ebs-initialize@nodeadm, because nodeadm-config becomes runnable at the same point in the lifecycle. I'll remove that one.

Similarly, the optimization added in #1991 is still useful, because nodeadm-config and ebs-initialize@kubelet run simultaneously.

@cartermckinnon cartermckinnon changed the title [WIP] feat(al2023): initialize critical binaries from EBS filesystem feat(al2023): initialize critical binaries from EBS filesystem Oct 17, 2024
@cartermckinnon
Copy link
Member Author

Getting some more samples...

/ci
+workflow:os_distros al2023

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 cartermckinnon merged commit 27b29f6 into main Oct 21, 2024
10 checks passed
@cartermckinnon cartermckinnon deleted the ebs-initialize-bin branch October 21, 2024 05:24
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