Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
fix grpc threadpool size #7974
The number of grpc completion queues on the host is tied to the requested remote concurrency. The remote concurrency numbers are likely to be much larger than the available cores on the host machine creating thread management overhead on the host.
Use the built in GRPC EnvBuilder class which picks a sensible number of completion queue / threads based on the host proc count.
The user wont have to worry about strange side effects on the host when increasing remote concurrency.
Looks like this PR is slightly increasing the memory overhead in one of the pantsd integration tests. Probably lay off merging for now, until I figure out why.
Edit. Though if you have any idea why a few less grpc threads would be causing a memory increase in the daemon across mulitple runs let me know!