Python gRPC seems to ignore pool_size

81 views
Skip to first unread message

tiripli...@gmail.com

unread,
May 16, 2016, 11:31:56 AM5/16/16
to grpc.io
Hello,
I am playing with gRPC and noticed something strange: I set pool_size arg for the server at 2 and start the server. After it starts I run "ps -eLf" and I see 5 threads. When I start generating load the number of threads goes up to 9. I don't set any pool size for the stub and the calls are sync (simple requests).

Is this a known behavior? Can I do something do avoid this?

Thank you!

tiripli...@gmail.com

unread,
May 16, 2016, 12:03:17 PM5/16/16
to grpc.io, tiripli...@gmail.com

tiripli...@gmail.com

unread,
May 17, 2016, 4:01:41 AM5/17/16
to grpc.io, tiripli...@gmail.com
I think I figured it out. gRPC is not ignoring the pool size. I added some logging and with pool_size set to 4 there are only 4 parallel requests handled by gRPC. The other threads are not handling requests.
My question still stands. Why gRPC needs those extra threads?

Nathaniel Manista

unread,
May 22, 2016, 10:42:08 PM5/22/16
to tiripli...@gmail.com, grpc.io
On Tue, May 17, 2016 at 1:01 AM, <tiripli...@gmail.com> wrote:
I think I figured it out. gRPC is not ignoring the pool size. I added some logging and with pool_size set to 4 there are only 4 parallel requests handled by gRPC. The other threads are not handling requests.
My question still stands. Why gRPC needs those extra threads?

That it uses them doesn't indicate that it needs them - they aren't doing what I intended them to do, and they aren't doing enough to justify their existence. I'm working to eliminate them.
-Nathaniel
Reply all
Reply to author
Forward
0 new messages