gRPC performance benchmark

74 views
Skip to first unread message

din...@wepay.com

unread,
Nov 6, 2018, 1:39:49 PM11/6/18
to grpc.io
Hi,

Using gRPC Java RouteGuide Example available in github, I was running a gRPC server and a REST server which contains gRPC client. Using this setup, I tried to run AB (Apache Bench) tool to find the performance of unary and server side streaming calls.

I noticed that the response time becomes low as we increase the concurrency level (especially more significant change for server side streaming calls). I would like to if there is any recommended best practices or this is and expected increase in latency.

FYI, I created a single ManagedChannel instance for the client and startup time. I have also attached the performace graphs.

Regards,
Dinesh P S


streaming n100 benchmark.png
streaming n1000 benchmark.png
streaming n10000 benchmark.png
unary n100 benchmark.png
unary n1000 benchmark.png
unary n10000 benchmark.png

Carl Mastrangelo

unread,
Nov 6, 2018, 4:27:57 PM11/6/18
to grpc.io
I'm not sure ab is a very good benchmark tool.  It used to be years ago, but I haven't seen it used in a long time.  Also, by using it you avoid the deserialization that a real client would do.  

din...@wepay.com

unread,
Nov 7, 2018, 2:31:20 PM11/7/18
to grpc.io
We are using ab to hit REST endpoints. 

ab ->   REST server (GRPC Client) -> GRPC server

In this case the protobuf deserialization is happening on the REST server using the real client. AB is not performing the protobuf deserialization. 

robert engels

unread,
Nov 7, 2018, 2:44:27 PM11/7/18
to din...@wepay.com, grpc.io
I would think it is going to depend heavily on the work the gRPC service method does, not GRPC itself. Since the REST/HTTP protocol is already less efficient than the gRPC one - the former is going to dominate it in terms of relative performance.


--
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 post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/f868d5a5-e6b8-466a-a2e9-1572874e58e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages