How to calculate the max number of worker threads in SQL Server?
2
votes
2
answers
7720
views
I use 64-bit OS with two CPUs (each of them makes 7 logical processors) and with total number of logical processors equal to 14.
When I run this code I get **2048**
SELECT max_workers_count FROM sys.dm_os_sys_info
On the other way, when I use the formula below I get totally different number which is **672**
For a 64-bit operating system:
Total available logical CPUs 4
Max Worker Threads = 512 + ((logical CPUs - 4)*16)
Can you explain to me why I get different numbers? I tested it on another server and got exact same numbers for both cases.
**EDIT**
P.S Thanks to Dan Guzman for his suggestions to check server settings for max worker threads. That is what EXEC sp_configure 'max worker threads' returns:


Asked by Rauf Asadov
(1313 rep)
Jan 1, 2020, 07:34 AM
Last activity: Jan 1, 2020, 05:28 PM
Last activity: Jan 1, 2020, 05:28 PM