The number of threads, especially the nio threads, look way too many. Too 
many threads only add overhead.
You may try limiting your number of threads to 2 times the number of CPU 
cores.
If you are doing blocking operations in your application thread, try 
switching to a non-blocking asynchronous model which will scale better.

On Thursday, October 25, 2018 at 3:19:07 AM UTC-7, qplc wrote:
>
> Hi,
>
> I've implemented zookeeper balanced grpc server and client.
> Following are the execution configuration details:
> Grpc Client:
> Channel Count: 1
> Boss/Acceptor Thread: 1
> Nio Threads: 100
> Executor/App Threads: 100
>
> Grpc Server:
> Nio Threads: 100
> Executor/App Threads: 400
> Max conucurrent calls per connection: 100
>
> Here, I'm using ForkJoinPool while setting executor. I'm sending messages 
> on RabbitMQ and forwards to gRPC client. Publisher rate is 10k messages per 
> 10sec. 
>
> As I've observed each request when reaches server it executes till 
> 10seconds. And as configured most 400 tasks are getting executed 
> concurrently at a time. Due to this piling up other 9600 requests as 
> waiting for application threads to be available.
>
> This is slowing overall process as piling up the requests and I couldn't 
> delegate the tasks to other thread pool as executor has already been 
> dedicated for the same.
>
> Also, I've given 16gb for application. Increasing the thread count could 
> help here as I have already given sufficient configuration.
> How do I improve the execution faster?
>
>
> Thanks,
> qplc
>
>

-- 
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 post to this group, send email to grpc-io@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/be7f6eb6-5862-43ce-9dd6-9793d3a3c6b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to