grpc-rs
grpc-rs copied to clipboard
performance / multi threading
It seems by default it runs on single thread, is there any way to use multiple threads? I've tried to run it with:
let env = Arc::new(EnvBuilder::new().build());
And it still consumes only 1 core.
This doesn't work as well, still only 1 core is busy:
let env = Arc::new(Environment::new(8));
I'm creating just 1 grpc connection from the client. I expect server still should be able to use multiple cores. Creating multiple connections also doesn't help, performance is still a lot worse than go's grpc server.
I'm sending 1M hello requests: go: 22 seconds. grpcio: 38 seconds.
Hi @Kane-Sendgrid
One connection can only use one Core, no matter how many you set on the server.
Can you give us the benchmark test?
@siddontang I'll send it to you. But, interestingly, go server does utilize > 1 core even with 1 connection. But in any case I wasn't able to get any improvements with 1 thread vs 8 threads and 1 connection vs 100 connections. It was almost the same in all cases.