Important DMVs to monitor CPU – SQL Server

Dynamic Management Views (DMVs) can be very useful to diagnose and troubleshoot common performance problems in SQL Server. Here are some important Dynamic Management Views (DMV’s) to monitor the CPU where SQL Server is installed.

Click on the DMV’s given below to learn more on how to use them.

sys.dm_os_threads - Returns a list of all SQL Server Operating System threads that are running under the SQL Server process. sys.dm_os_threads can provide information about rogue threads that consume resources in the SQL Server process.

sys.dm_os_workers - Returns a row for every worker in the system. sys.dm_os_workers helps you find out how long a worker has been running in a SUSPENDED or RUNNABLE state.

sys.dm_os_schedulers - Returns one row per scheduler in SQL Server where each scheduler is mapped to an individual processor. sys.dm_os_scheduler helps to monitor the condition of a scheduler or to identify runaway tasks.

sys.dm_os_tasks - Returns one row for each task that is active in the instance of SQL Server. sys.dm_os_tasks helps monitor parallel requests. You can also associate a session ID value with a Windows thread ID and then monitor the performance of the thread in the Windows Performance Monitor.

Another important document I would suggest all of you read is Troubleshooting CPU Bottlenecks in SQL Server


About The Author

Suprotim Agarwal, MCSD, MCAD, MCDBA, MCSE, is the founder of DotNetCurry, DNC Magazine for Developers, SQLServerCurry and DevCurry. He has also authored a couple of books 51 Recipes using jQuery with ASP.NET Controls and a new one recently at The Absolutely Awesome jQuery CookBook.

Suprotim has received the prestigous Microsoft MVP award for nine times in a row now. In a professional capacity, he is the CEO of A2Z Knowledge Visuals Pvt Ltd, a digital group that represents premium web sites and digital publications comprising of Professional web, windows, mobile and cloud developers, technical managers, and architects.

Get in touch with him on Twitter @suprotimagarwal, LinkedIn or befriend him on Facebook

No comments: