Number of threads created in grpc internally

772 views
Skip to first unread message

Softgigant S

unread,
Jul 10, 2023, 8:04:00 AM7/10/23
to grpc.io
Hello!

May I ask, how to setup or manipulate number of threads created by grpc (event engine?)
I have simple callback-based grcp server-client API.

I used proc/pid/status to view the status of process of grpc client.
It showed 14 threads, same as number of CPU cores on my PC.
Is there any parameter to limit the number of threads used by grpc by default?

Thank you!

AJ Heller

unread,
Jul 12, 2023, 1:17:30 PM7/12/23
to grpc.io

Softgigant S

unread,
Jul 12, 2023, 3:50:00 PM7/12/23
to grpc.io
Thank you.
I found there the answer that sounds like "ther is no such parameter".

But may I leave it here: 
I know a very big company, that cannot use gRPC version later than v1.36 just because of the issue with builtin event engine.
The communication blocks all other activities of the software because grpc occupies all available CPU cores. And the problem is, there is no easy way to balance between them.
On one hand, there is an option to program the user application event engine and insert it to replace the one built in, but the Google confirms that it is not a trivial task... And I did not find any example of how to do it.
On the other hand, many people (including the one who asks the same in the bottom of the thread by the link you gave me, but he also did not get any anwer) ask to implement a simple parameter that limits the number of cores for grpc. Good reason for it might be an assumptoin, that in many cases the communication do have greate value, but even there the other types of activities do also need CPU.



среда, 12 июля 2023 г. в 20:17:30 UTC+3, AJ Heller:
Reply all
Reply to author
Forward
0 new messages