Optimization Exploration: gRPC-Java under large payloads

74 views
Skip to first unread message

Paul Grosu

unread,
Aug 10, 2016, 4:08:26 AM8/10/16
to grpc.io
Hi Everyone,

So this is an opportunity to work as a community to explore solutions to improve gRPC-Java when one has large payloads.

You might have seen the following post by Carl of a slowdown with large payloads using gRPC-Java:

https://github.com/grpc/grpc-java/issues/2151

You'll notice there is a lot of copying that is happening, which has a potential for being streamlined.  In theory the passing-by-reference with the functional programming approach of updating the data is a natural direction, but currently different components of the program have specific object types they understand and expect for processing.

There are some nice discussions happening around multi-buffer allocation, consolidated buffers before a write, zero-copy for the data portion with WriteCombiningHandler performing the serialization:

https://github.com/grpc/grpc-java/pull/2092

https://github.com/grpc/grpc-java/pull/1996

https://github.com/grpc/grpc-java/issues/2139

This is a fun problem, which I imagine others might encounter when using gRPC-Java.  So let's explore ways to optimize this for large payloads, and discuss tweaks to gRPC-Java to make this possible.

Thanks,
Paul


Reply all
Reply to author
Forward
0 new messages