In my last blog How To Monitor All SQLServers LIVE, I shared how I use open-source SQLMonitor every day to monitor SQLServers in my organization. This tool helps me and my team to ensure that we proactively detect any issue with SQLServers even before users can reach out to us.
The above panel is showing any SQLServer that needs DBA attention. But there is this server highlighted in the above screenshot showing a significant gap b/w OS CPU and SQL CPU. Any gap of over 15-20% b/w OS & SQL CPU consumption is something that should be investigated. This was an indicator that there is some other non sqlservr process that is consuming high CPU on the host.
From the above panel, I can clearly see a heavy gap in CPU utilization % b/w OS & SQL. The key point here is that I even know the exact times for which the CPU gap has been happening. So I set the grafana time range to the start/end of the issue duration in order to see further details in a filtered manner.
Next, I navigate to row OS Tasks (Processes) – CPU Utilization. Under this row, we have 2 panels representing CPU utilization by different processes. This is the final place that would tell me the exact culprit processes that were consuming high CPU on the host and causing CPU issues for SQLServer.
As we can notice in the above screenshot, for an average of 5-6 minutes of clock time, DatabaseMail.exe process has consumed an average of 1.63 hours of CPU time. Whereas sqlservr.exe process’s contribution is just 36.6 minutes for an average clock time duration of 5-6 minutes.
From here troubleshooting steps could be different for different servers/applications. On this server, we found out that was expected due to lots of push notifications to end users.
To summarize, having a robust tool like SQLMonitor makes SQLServer monitoring and troubleshooting very easy. I hope this would be helpful to SQLServer professionals having a hard time figuring out issues with their SQLServers.
I am Microsoft Certified Professional having 10+ years of experience in SQL Server Querying, Database Design, and Administration. I am fond of Query Tuning and like to automate things using TSQL & PowerShell. I also have experience of implementing end-to-end Data Warehouse solution, and Data Migration using ETL tools SQL Server Integration Services (SSIS), Pentaho Business Analytics, and have designed Database Inventory through PowerShell, Python, and Django etc.