Streaming endpoint performance for a python client Vs golang client

115 views
Skip to first unread message

anand kumar

unread,
Jun 21, 2021, 5:53:46 AM6/21/21
to grpc.io
Hi,
We have a grpc server written in golang and one of the endpoints it serve is a streaming endpoint. For one call, the streaming endpoint returns 100k+ objects where object is a dictionary with all text keys and values.

From a python client, getting all the data takes 40 sec, only 2-3 of which is spent by service executing the business logic and the remaining is in sending all the data back to client. 
When tried from a golang client, all the data is gettable in 3-4 seconds.

So this could be due to some configuration difference in setting up a grpc client in python vs golang, but we have been unable to find any. 

Any help would be appreciated.

Craig Tiller

unread,
Jun 21, 2021, 10:13:48 AM6/21/21
to anand kumar, grpc.io
What does CPU utilization look like during those 40 seconds? Are you sitting idle waiting for data, or spinning the CPU doing work?

--
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/144f6fb5-dd50-47d1-b569-70269ca2e65an%40googlegroups.com.

anand kumar

unread,
Jun 21, 2021, 11:35:07 AM6/21/21
to grpc.io
It's the latter. top shows CPU at 100+% for the entirety of 40s for the client process.

anand kumar

unread,
Jun 21, 2021, 11:44:12 AM6/21/21
to grpc.io
fwiw, got another similar datapoint with an older service of ours serving a streaming endpoint and written in golang. The time taken by python client in getting all the objects is more than double of what the golang client is spending.
Reply all
Reply to author
Forward
0 new messages