Envoy: [Question] Envoy binary size increase

Created on 16 Apr 2020  路  6Comments  路  Source: envoyproxy/envoy

We had forked envoy around the v1.11 release and at that time the stripped binary size was around 27M. I recently merged the v1.14 release and noticed that the binary size had doubled to 55M for the same build config. Are there any high level new filter/features that were added in the last couple of releases that would cause such a jump?

@sumukhs

question stale

All 6 comments

Nothing specific comes to mind, but that's a huge increase. Not sure what filters, etc. you are bringing in. I would definitely only compile the filters you are actually using. @junr03 has done size analysis for Envoy Mobile and can possibly provide some scripts if you are looking to better understand where size is being spent.

That would be very helpful. Thanks!

I know from testing that the Kafka filter alone adds about 11MB. This is another reason why I advocate for custom builds where only the extensions you need are compiled into the binary (vs. the kitchen sink images / approach).

@appario I would make sure you are only compiling what you need per @mattklein123 and @moderation's suggestion. Is that the case for your data point? Additionally one salient point is that since v1.11 the v3 APIs were introduced. That by no means account for such a big increase, but it does account for a non-trivial amount (for example, it accounts for ~10% of Envoy Mobile's size under some measures).

You could follow the instructions here to do some analysis on your Envoy binary. I have used a tool called Bloaty, per the instructions. Bloaty even allows you to compare binaries and see where the increases happened.

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings