sys.dm_os_schedulers current_worker_count

sakuraime 2,286 Reputation points
2021-06-23T13:18:42.157+00:00

sys.dm_os_schedulers has a column call current_worker_count .
May I know what's the situation that this current_worker_count will be reset .?

as I know active_workers_count < this number will be changed dynamically by SOS . thanks

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
9,057 questions
No comments
{count} votes

2 answers

Sort by: Most helpful
  1. CathyJi-MSFT 20,781 Reputation points Microsoft Vendor
    2021-06-24T07:34:23.517+00:00

    Hi @sakuraime ,

    The Scheduler is responsible for creating and destroying Workers according to requirements. Workers use Scheduler directly. Each Worker can only be associated with one Scheduler. Workers cannot be transferred from one Scheduler to another.

    The unit of work processed by the Worker can be a Request or a Task. For example, batch processing Request may be decomposed into multiple Tasks. When the Scheduler receives a new Request or Task request, if there is no idle Worker (Idle Worker) currently, it will start to create a new Worker according to the configuration, and the Request or Task will be bound to the Worker.

    I find a blog explain this, but the blog is in Chinese, please refer to SQL Server scheduler.


    If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar queries.


  2. Tom Phillips 17,611 Reputation points
    2021-06-28T20:22:13.693+00:00

    I do not ever suggest changing the max worker threads on a system (since SQL 2000). The default value is good for 99.99% of installations. This is not something you normally need to worry about.