October 11, 2010

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, ASP.NET Architecture MVP works as an Architect Consultant and provides consultancy on how to design and develop Web applications.

Suprotim is also the founder and primary contributor to DevCurry, DotNetCurry and SQLServerCurry. He has also written an EBook 51 Recipes using jQuery with ASP.NET Controls.

Follow him on twitter @suprotimagarwal

No comments: