How many threads should we create when using async server grpc in c++? #24
-
How many threads should we create when using async server grpc in c++? |
Beta Was this translation helpful? Give feedback.
Answered by
nguyenphucminh
Oct 27, 2022
Replies: 1 comment
-
The best way to know the answer for your specific application is to create benchmarks with various scenarios and then compare the results from the different threading models. Based on https://grpc.github.io/grpc/cpp/md_doc_cpp_perf_notes.html, the current recommendation is to use a pool of num_cpus threads with each thread polling over its own completion queue. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
balebomm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The best way to know the answer for your specific application is to create benchmarks with various scenarios and then compare the results from the different threading models.
Based on https://grpc.github.io/grpc/cpp/md_doc_cpp_perf_notes.html, the current recommendation is to use a pool of num_cpus threads with each thread polling over its own completion queue.