|
This is a view in the mssqlsystemresource database. Returns one row per scheduler for schedulers mapped to an individual processor. Active_worker scheduler threads are those devoted to the regular user-controlled work of the server, such as queries and SSIS jobs, while a variety of system and hidden schedulers may be active on the system at any time. This DMV is very useful for monitoring the thread scheduler and to find runaway tasks.
If you want to check how many CPU's are used by the SQL Engine you can query:
select scheduler_id,cpu_id, status, is_online from sys.dm_os_schedulers where status='VISIBLE ONLINE' |
You can also use this query to see if the number of runnable tasks is typically nonzero. A nonzero value indicates that tasks have to wait for their time slice to run; high values for this counter are a symptom of a CPU performance bottleneck. You can use the query below to list all the schedulers and look at the number of runnable tasks.
SELECT scheduler_id, cpu_id, parent_node_id, current_tasks_count, runnable_tasks_count, current_workers_count, active_workers_count, work_queue_count FROM sys.dm_os_schedulers |
|
|