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
envoy binary file size - currently 127MB #240
Comments
The default build includes debug symbols and is statically linked. If you strip symbols that's what takes you down to 8MB or so. If you want to go down further than that you should dynamically link against system libraries. FWIW, we haven't really focused very much on the build/package/install side of things. I'm hoping the community can help out there. Different deployments are going to need different kinds of compiles. |
cc @enricoschiattarella @louiscryan I think you are already probably thinking about ^^^ not sure if you have any thoughts. |
Hi Matt, thank you for your feedback ! Agree, different deployment scenarios has different requirements. I also like the static linking approach, to keep things consistent and independent. At least for my usecase the "strip" approach fine, but evtl. a kind of "included" solution will be better. Cheers, |
I think statically linked is important as if you wanted to run in a Docker container you could in theory create a minimal image using |
yes, this is exactly what I;m doing and therefore the dynamic approach will not work. Also such a critical component should be self-contained. |
At the very least we can put in a cmake option to strip debug symbols. That is easy to do. |
fixed |
* HTTP override fix * Code clean up and fix a test. * Address code review comments. * Code comment. * Style formatting
envoyproxy/envoy-mobile#119 Adding a primitive `Request` and `RequestBuilder` with basic features: * URL * method * headers * trailers * retry policy Tests are basic setting a builder and ensuring the result is expected. Additionally, the request build transform creates an equivalent object when built back. Signed-off-by: Alan Chiu <achiu@lyft.com> For an explanation of how to fill out the fields, please see the relevant section in [PULL_REQUESTS.md](https://github.com/envoyproxy/envoy/blob/master/PULL_REQUESTS.md) Description: kotlin: add library request interfaces Risk Level: low Testing: unit Docs Changes: n/a Release Notes: n/a [Optional Fixes #Issue] [Optional Deprecated:] Signed-off-by: JP Simard <jp@jpsim.com>
envoyproxy/envoy-mobile#119 Adding a primitive `Request` and `RequestBuilder` with basic features: * URL * method * headers * trailers * retry policy Tests are basic setting a builder and ensuring the result is expected. Additionally, the request build transform creates an equivalent object when built back. Signed-off-by: Alan Chiu <achiu@lyft.com> For an explanation of how to fill out the fields, please see the relevant section in [PULL_REQUESTS.md](https://github.com/envoyproxy/envoy/blob/master/PULL_REQUESTS.md) Description: kotlin: add library request interfaces Risk Level: low Testing: unit Docs Changes: n/a Release Notes: n/a [Optional Fixes #Issue] [Optional Deprecated:] Signed-off-by: JP Simard <jp@jpsim.com>
Hi guys,
I;m thinking about to use envoy in a kubernetes setup.
One of the challenges in such a setup is to keep the docker / rtk container image size small and therefore I was a bit surprised that the envoy binary is about 127 MB.
However, I was able to "shrink" the binary down to about 8 MB using the ELF "strip" approach :
/tmp$ strip -S --strip-unneeded --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag envoy
-rwxr-xr-x 1 jj jj 127M Nov 22 20:17 envoy.orig
-rwxr-xr-x 1 jj jj 7,7M Nov 22 20:18 envoy
The question is, what makes the binary such large ?
Thank you.
Cheers,
jj
The text was updated successfully, but these errors were encountered: