original-brownbear commented on PR #13472:
URL: https://github.com/apache/lucene/pull/13472#issuecomment-2155979514

   >E.g. if you have two tasks and the first one takes more time? 
   
   Right, that's a possible scenario, but unless we move to some kind of async 
API like the one you mentioned above, we'll always have blocking on the calling 
thread if there's a comparatively long running task running on one of the 
forked threads.
   
   > but I'm not too happy that it makes sizing thread pools more complicated 
in exchange? I need to think more about the trade-off.
   
   To me it seem like the opposite is true, this changes makes reasoning about 
the sizing much easier. I find it very complicated working out the relative 
sizes of worker pool and coordinator pool.
   I effectively want the worker pool just sized right so that I get the CPU 
utilisation I desire without oversubscribing and adding scheduling overhead.
   Now I have to add a coordinator pool that enables that into the mix. That 
one I have to size in such a way that I always have another thread available as 
long as my worker pool isn't fully utilised. That's quite hard to get right?
   
   With this change, I only have to size one pool and since blocking is rare I 
can probably ignore it in the calculation. So the size of the pool comes out to 
~ `desired_busy_cores / (1 - io_share_of_execution_time)` doesn't it?


-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to