Sorry for the late reply - in grpc-go, we do batching of sends/receives by 
default.  Setting the Read and Write buffers larger can potentially help, 
but probably is only useful if your messages are large.  In your case, I 
don't believe there's much else you can do to optimize.

Is your primary concern the CPU utilization or are you seeing lower 
throughput than desired?

Doug


On Wednesday, May 6, 2020 at 8:22:39 AM UTC-7 yuan...@gmail.com wrote:

> Hi,
>
> I'm using golang gRPC library and have set up bi-directional streaming 
> between client and servers (both golang). We saw a big chunk of our profile 
> (30%) spent on Syscall on the sever (see profile image posted below), which 
> is not super surprising because the stream is indeed busy (at peak 25k 
> protos per second on Send and 50k protos per second on Recv). However we 
> are wondering if that can be optimized in any way. The proto messages that 
> we Send/Recv are very small (tiny), so I tried setting higher 
> WriteBufferSize and ReadBufferSize on the server side trying to reduce the 
> number of syscalls but that does seem to have any effect on the profile.
>
> Any hints on how I could dig deeper into the profile / what's happening 
> behind the scene and whether our usage of streaming has too much overhead? 
> Please let me know if more details is needed.
>
> Thanks,
> Mengyao
>
>
> [image: Screen Shot 2020-05-06 at 11.02.51 AM.png]
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/7f6085b5-8304-417d-b3d9-fb4ce3b06e6f%40googlegroups.com.

Reply via email to