[dnm/rfc] remove cilium/ebpf dependency to save 1.1M#5218
Draft
kolyshkin wants to merge 1 commit intoopencontainers:mainfrom
Draft
[dnm/rfc] remove cilium/ebpf dependency to save 1.1M#5218kolyshkin wants to merge 1 commit intoopencontainers:mainfrom
kolyshkin wants to merge 1 commit intoopencontainers:mainfrom
Conversation
This replaces use of the main cilium/ebpf package (in oc/cgroups) by own code, while keeping the usage of cilium/ebpf/asm. As a result, runc binary is about 1MB smaller, which is 7% savings: [kir@kir-tp1 runc]$ size runc.before runc text data bss dec hex filename 6492732 4615697 229160 11337589 acff75 runc.before 6018676 4319913 228392 10566981 a13d45 runc [kir@kir-tp1 runc]$ ls -la runc runc.before -rwxr-xr-x. 1 kir kir 14687496 Apr 2 16:31 runc -rwxr-xr-x. 1 kir kir 15749568 Apr 2 16:31 runc.before I am unsure if the added maintenance cost is worth the savings, so this is more like an experiment and a request for comments. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Contributor
Author
|
A quick observation (which is semi-relevant to this PR). The runc binary used to be 12M only a few years ago (see #3460 (comment)), and it's 15-16M now. I guess the biggest issue here is we're using packages that eventually grow in size (due to feature creep etc), which is not a problem per se, but becomes a problem together with disabled DCE, and DCE is disabled due to use of introspection/reflect in some of our dependencies. So, we are bundling some code into our binary which is never used. To re-enable DCE we need to eliminate the use of reflect.Method etc. |
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.
This replaces use of the main cilium/ebpf package (in oc/cgroups) by our
own code, while keeping the usage of cilium/ebpf/asm.
As a result, runc binary is about 1MB smaller, which is ~7% savings:
I am unsure if the added maintenance cost is worth the savings, so this is more like an experiment and a request for comments.