TangSiyang2001 commented on issue #17333:
URL: https://github.com/apache/doris/issues/17333#issuecomment-1502702401

   My assumption about RPC timeout:
   
   Actually, tasks are offered to work pool with the `try_offer` API now:
   ```cpp
   virtual bool try_offer(WorkFunction func) {
           PriorityThreadPool::Task task = {0, func, 0};
           return _work_queue.try_put(task);
   }
   ```
   rather than the `offer` API:
   ```cpp
   virtual bool offer(WorkFunction func) {
           PriorityThreadPool::Task task = {0, func, 0};
           return _work_queue.blocking_put(task);
   }
   ```
   In currrent code, once the request is processed by the corresponding 
bthread, it will be offered to the worker pool immediately and processed in the 
async way.
   
   Therefore, RPC timeout under heavy loads may actually result from:
       1. (minor) Too few pthreads for bthread workers to manage the requests.
       2. (major) The ratio of 
`brpc_heavy_work_pool_threads/brpc_heavy_work_pool_max_queue_size` may be 
inproper under the corresponding case, so tasks in blocking queue are blocked 
too long to be processed by the busy worker threads.  


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to