Waiting for Worker threads | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Waiting for Worker threads

I have more than 100 SQL Server jobs scheduled to run simultaneously and continuosly. Several of these jobs are not running and with the status ‘Waiting for a Worker thread’.
Can anyone please tell me what this status means and and how to avoid it ? Also, what is the max. number of jobs that we can run simultaneously or that SQL Server Agent can handle ?
Quoting from Inside SQL Server 2000:
quote:
max worker threads:
SQL Server uses the operating system’s thread services by keeping a pool of worker threads (or fibers) that take requests off the queue. It attempts to evenly divide the worker threads among the UMS schedulers so the number of threads available to each UMS is the setting of max worker threads divided by the number of CPUs. With 100 or fewer users, there are usually as many worker threads as active users (not just connected users who are idle). With more users, it often makes sense to have fewer worker threads than active users. Although some user requests have to wait for a worker thread to become available, total throughput increases because less context switching occurs. The max worker threads setting is somewhat autoconfigured. The default is 255, which does not mean that 255 worker threads are in the pool. It means that if a connection is waiting to be serviced and no thread is available, a new thread is created if the thread total is currently below 255. If this setting is configured to 255 and the highest number of simultaneously executing commands is, say, 125, the actual number of worker threads will not exceed 125. It might be even less than that because SQL Server destroys and trims away worker threads that are no longer being used. You should probably leave this setting alone if your system is handling 100 or fewer simultaneous connections. In that case, the worker thread pool will not be greater than 100. Even systems that handle 4000 or more connected users run fine with the default setting of 255. When thousands of users are simultaneously connected, the actual worker thread pool is usually well below 255 because from the back-end database perspective most connections are idle, even though the user might be doing plenty of work on the front end.


Frank
http://www.insidesql.de

Hi Frank, Thank you for the suggestion. But, I don’t think that the worker threads that these jobs are waiting on are CPU related threads. Because, I increased the CPU worker threads to 4096 (from its default value of 255) and it did not change anything with these jobs. I still see all those jobs waiting on worker threads. Any more suggestions ?
May check this KBAhttp://support.microsoft.com/default.aspx/kb/262973/EN-US/? which is relevant to the issue to resolve. HTH Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
I was suggested the following link in another forum and it fixed my problem. http://support.microsoft.com/default.aspx?scid=kb;en-us;306457
]]>