Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
The throttling interval (interval between new thread creations) in the generic threadpool code is determined by the microseconds_throttling_interval() function, which currently depends solely on the current number of threads in a group.
Sometimes, there is a need to tweak this rate, usually to make thread creation more frequent in case of stalls.
The task is to make throttling interval dependent on stall_limit, and perhaps on oversubscribe.
Conservatively, we can leave the current algorithm in place for the stall intervals that are larger or equal to the default limit (0.5 sec), and only adjust the throttling interval for smaller threadpool_stall_limit values.
Also, no throttling should be in place if number of threads in a group is less then 1+thread_pool_oversubscribe value.