Yes, EventEngine threads execute a lot of gRPC, and eventually *most* of gRPC will run on EventEngine threads. The performance dashboard is a good basis for comparison. On Thursday, October 3, 2024 at 3:37:12 PM UTC-7 Amirsaman Memaripour wrote:
> Thanks for the response AJ. I'm using the CQ API and changed the code to > only run `ping` commands on threads polling on the completion queues. I > still see lots of cycles consumed by `event_engine` threads (about 28% of > total collected samples by `perf`) and wanted to see if that's expected: > > [image: mongod-54419-folded.png] > > I can get close to 240K QPS on 8 cores (AArch64), and 95% of the CPU time > is spent running gRPC code (excluding serializing and deserializing of > messages as I'm using a custom payload encoding). The public performance > dashboard <https://grafana-dot-grpc-testing.appspot.com/?orgId=1> shows > similar throughput for the C++ implementation, and I just want to make sure > what I see in my implementation (both in terms of resource allocation and > peak throughput) are expected. > > On Thursday, October 3, 2024 at 6:10:49 PM UTC-4 AJ Heller wrote: > >> How did you identify that these threads are a bottleneck for your >> application? If your application is idle, the event_engine threads will be >> waiting for work (via condvar wait, which will not tie up your CPU). If on >> the other hand there's work to be done, those threads will wake up and do >> that work. The existence of idle/waiting threads should not cause any >> decrease in performance, and otherwise all active threads are doing their >> jobs. >> >> If you are using the C++ callback API, then note that your callbacks may >> run on these `event_engine` threads, so any blocking behavior seen here may >> also be your own. >> On Tuesday, October 1, 2024 at 1:44:12 PM UTC-7 Amirsaman Memaripour >> wrote: >> >>> Hi folks, >>> >>> I'm facing scalability issues when using the C++ CQ-based server with >>> TLS. In particular, the `event_engine` thread is fully utilizing its core, >>> making it the bottleneck and limiting server's throughput. I was wondering >>> if there is an option to change the number of threads assigned to the >>> `event_engine`? >>> >>> [image: screenshot.png] >>> >> -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/b4c164ed-769a-4e9c-be75-e00493e697cfn%40googlegroups.com.