[MDEV-19312] Threadpool : make thread injection rate depend on thread_pool_stall_limit/thread_pool_oversubscribe Created: 2019-04-23  Updated: 2019-05-31  Resolved: 2019-05-31

Status: Closed
Project: MariaDB Server
Component/s: Server
Fix Version/s: 10.5.0

Type: Task Priority: Major
Reporter: Vladislav Vaintroub Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: 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.


Generated at Thu Feb 08 08:50:42 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.