Sample Header Ad - 728x90

Prevent THREADPOOL waits due to idle worker thread trimming

13 votes
1 answer
624 views
After reading [Unusual THREADPOOL Waits](https://www.joshthecoder.com/2020/08/27/unusual-threadpool-waits.html) by Josh Darnell, a Twitter user [mentioned](https://twitter.com/SirSQL/status/1299038891496751104) there is an undocumented trace flag to **prevent trimming idle workers**: tweet The idea is that once SQL Server has created enough threads to service the peak workload, it should not then trim worker threads (release them to the OS) after 15 minutes or so of them not being needed. The idle worker threads will continue to use resources (e.g. memory) but there will not be the burst of THREADPOOL waits when more workers are suddenly required. Apparently this can be of assistance when using Always On Availability Groups. What is this undocumented trace flag, and how does it work?
Asked by Paul White (95115 rep)
Aug 29, 2020, 02:55 PM