Re: [grpc-io] grpc executor threads

2023-05-17 Thread Jeff Steger
Hi AJ, Thanks for the reply. May I suggest making max number of threads (and/or any rate limits) configurable. Jeff On Tue, May 16, 2023 at 7:44 PM 'AJ Heller' via grpc.io < grpc-io@googlegroups.com> wrote: > Hello all, I want to offer a quick update. tl;dr: Jeff's analysis is > correct. The

Re: [grpc-io] grpc executor threads

2023-05-16 Thread 'AJ Heller' via grpc.io
Hello all, I want to offer a quick update. tl;dr: Jeff's analysis is correct. The executor is legacy code at this point, slated for deletion, and increasingly unused. We have been carefully replacing the legacy I/O, timer, and async execution implementations with a new public EventEngine

Re: [grpc-io] grpc executor threads

2023-05-12 Thread Jiqing Tang
Thanks so much Jeff, agree reaping them after they being idle would be great. On Friday, May 12, 2023 at 6:59:28 PM UTC-4 Jeff Steger wrote: > This is as close to an explanation as I have found: > > look at sreecha’s response in > https://github.com/grpc/grpc/issues/14578 > > tldr: > “ The max

Re: [grpc-io] grpc executor threads

2023-05-12 Thread Jeff Steger
This is as close to an explanation as I have found: look at sreecha’s response in https://github.com/grpc/grpc/issues/14578 tldr: “ The max number of threads can be 2x the number cores and unfortunately its not

Re: [grpc-io] grpc executor threads

2023-05-12 Thread Jiqing Tang
Hi Jeff and Mark, I just ran into the same issue with an async c++ GRPC server (version 1.37.1), was curious about these default-executo threads and then got this thread, did you guys figure out what these threads are for? The number seems to be about 2x of the polling worker threads. Thanks!

Re: [grpc-io] grpc executor threads

2022-01-07 Thread 'Mark D. Roth' via grpc.io
No, that's not a public API, and you should not call it directly. (It may be public in the class, but the class is not part of the gRPC public API.) On Fri, Jan 7, 2022 at 12:47 PM Jeff Steger wrote: > Thanks Mark, I will turn on trace and see if I see anything odd. I was > reading about a

Re: [grpc-io] grpc executor threads

2022-01-07 Thread Jeff Steger
Thanks Mark, I will turn on trace and see if I see anything odd. I was reading about a function called Executor::SetThreadingDefault(bool enable) that I think I can safely call after i create my grpc server. It is a public function and seems to allow me to toggle between a threaded implementation

Re: [grpc-io] grpc executor threads

2022-01-07 Thread 'Mark D. Roth' via grpc.io
Oh, sorry, I thought you were asking about the sync server threads. The default-executor threads sound like threads that are spawned internally inside of C-core for things like synchronous DNS resolution; those should be completely unrelated to the sync server threads. I'm not sure what would

Re: [grpc-io] grpc executor threads

2022-01-06 Thread Jeff Steger
Thanks for the info! It sort of sounds like the default-executor threads and the sync-server threads come from the same thread pool. I know that ServerBuilder::SetResourceQuota sets the max number sync-server threads. Does it have any impact on the number of default-executor threads? It doesn't

Re: [grpc-io] grpc executor threads

2022-01-06 Thread 'Mark D. Roth' via grpc.io
The C++ sync server has one thread pool for both polling and request handlers. When a request comes in, an existing polling thread basically becomes a request handler thread, and when the request handler completes, that thread is available to become a polling thread again. The MIN_POLLERS and

Re: [grpc-io] grpc executor threads

2022-01-05 Thread Jeff Steger
Ah never mind I see you answered, apologies. Let me ask you this: am I stuck with all of these default-executor threads that my process is spawning? Is there no way to limit them? Do they come from same pool as grpc sync server threads? On Wed, Jan 5, 2022 at 3:51 PM Jeff Steger wrote: > Can

Re: [grpc-io] grpc executor threads

2022-01-05 Thread Jeff Steger
Can you specifically answer this: grpc-java has a method in its ServerBuilder class to set the Executor. Is there similar functionality for grpc-c++ ? Thanks! On Tue, Jan 4, 2022 at 11:55 AM Mark D. Roth wrote: > I answered this in the other thread you posted on. > > On Sun, Jan 2, 2022 at

Re: [grpc-io] grpc executor threads

2022-01-04 Thread 'Mark D. Roth' via grpc.io
I answered this in the other thread you posted on. On Sun, Jan 2, 2022 at 9:39 AM Jeff Steger wrote: > grpc-java has a method in its ServerBuilder class to set the Executor. Is > there similar functionality for grpc-c++ ? I am running a C++ grpc server > and the number of executor threads it

[grpc-io] grpc executor threads

2022-01-02 Thread Jeff Steger
grpc-java has a method in its ServerBuilder class to set the Executor. Is there similar functionality for grpc-c++ ? I am running a C++ grpc server and the number of executor threads it spawns is high and seems to never decrease, even when connections stop. -- You received this message because

[grpc-io] gRPC executor threads and timer thread

2021-06-28 Thread 'Alex Zuo' via grpc.io
For executor threads, we can use Executor::SetThreadingAll(false) to shut down. If there is no thread, it still works according to the following code. void Executor::Enqueue(grpc_closure* closure, grpc_error_handle error, bool is_short) ... do { retry_push = false; size_t cur_thread_count =