gRPC 2.32.0 - enormous NuGet package size

74 views
Skip to first unread message

Vassil Kovatchev

unread,
Oct 19, 2020, 11:35:37 AM10/19/20
to grpc.io
Hi there,

Puns aside, the size of the NuGet package has grown significantly (close to 4 times) between version 2.23.0 and 2.32.0, and extremely (15 times!) since version 1.16.0.

A quick look into the package shows that the culprit is the Linux runtime files libgrpc_csharp_ext.x64.so and libgrpc_csharp_ext.x86.so located in ./runtime/linux/native

For example, the size of these files was around 20 MB each for gRPC version 2.23.0, but increased to 72 MB for x86 and 86 MB for x64 for a whopping total of 158 MB or a difference of more than 100 MB between the two versions.

This leads to an increase of approx 100 MB in Docker image sizes and becomes quite costly when using gRPC in a system of many microservices as this increase is multiplied by the number of gRPC-driven services included in the stack.

Are there any plans to look into that and maybe go back to the runtime sizes we've seen in earlier versions?
For example, the linux native runtime for gRPC 1.6.0 was a total of 11 MB (5 MB for x86 and 6 MB for x64).

Regards,
Vassil Kovatchev

Jan Tattermusch

unread,
Oct 19, 2020, 12:14:29 PM10/19/20
to Vassil Kovatchev, grpc.io

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/6987e5ab-7547-43b6-ba1b-cd9dbc5ed6f2n%40googlegroups.com.


--

Jan Tattermusch

Software Engineer


Google Germany GmbH

Erika-Mann-Straße 33

80636 München


Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.

    

This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.

Vassil Kovatchev

unread,
Oct 19, 2020, 12:37:53 PM10/19/20
to grpc.io
Hi Jan,

Thanks for the quick response :)
Yes, this does help -- I also wanted to say thanks for all your work on this project!!

Looking at the issues you linked above, and looking at the contents of the runtime folder of gRPC Core 2.23.0, I believe issue #24378 is more relevant than #24380.
The bulk of the package when restored in an x64 Docker image is in the two files I mentioned above (libgrpc_csharp_ext.x86 and libgrpc_csharp_ext.x64).

Those two linux runtime files represent 81% (159 MB) of the size of the total native runtime (195 MB), while the osx, win and arm runtimes represent the remaining 19%.

So I think in my case (restoring gRPC in a Docker x64 image), the Android and OSX files do not play much of a role in this increase.

Also, even if libgrpc_csharp_ext.x86.so is removed (as per issue #24378), the remaining libgrpc_csharp_ext.x64.so will still be 86 MB, which is much larger than the 16 MB it used to be in gRPC Core 1.16.0.

Cheers,
Vassil
Reply all
Reply to author
Forward
0 new messages