SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


CPU and Scheduler Performance Monitoring using SQL Server and Excel


CPU and Scheduler Performance Monitoring using SQL Server and Excel

Author
Message
derek.colley
derek.colley
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1182 Visits: 603
Comments posted to this topic are about the item CPU and Scheduler Performance Monitoring using SQL Server and Excel

---

Note to developers:
CAST(SUBSTRING(CAST(FLOOR(NULLIF(ISNULL(COALESCE(1,NULL),NULL),NULL)) AS CHAR(1)),1,1) AS INT) == 1
So why complicate your code AND MAKE MY JOB HARDER??!Crazy

Want to get the best help? Click here http://www.sqlservercentral.com/articles/Best+Practices/61537/ (Jeff Moden)
My blog: http://uksqldba.blogspot.com
Visit http://www.DerekColley.co.uk to find out more about me.

Mike Stuart
Mike Stuart
SSC-Enthusiastic
SSC-Enthusiastic (132 reputation)SSC-Enthusiastic (132 reputation)SSC-Enthusiastic (132 reputation)SSC-Enthusiastic (132 reputation)SSC-Enthusiastic (132 reputation)SSC-Enthusiastic (132 reputation)SSC-Enthusiastic (132 reputation)SSC-Enthusiastic (132 reputation)

Group: General Forum Members
Points: 132 Visits: 210
In your proc GetProcessorUsage, you're referring to a column 'cpu_ticks_in_ms' which doesn't exist in sys.dm_os_sys_info in SQL 2008 - http://msdn.microsoft.com/en-us/library/ms175048.aspx

According to this article, the column has been removed from post-SQL 2005, and provides a solution of sorts - http://connect.microsoft.com/SQLServer/feedback/details/292638/katmai-give-us-back-the-cpu-ticks-in-ms-column-in-sys-dm-os-sys-info

HTH.

Mike



Mike Stuart
Mike Stuart
SSC-Enthusiastic
SSC-Enthusiastic (132 reputation)SSC-Enthusiastic (132 reputation)SSC-Enthusiastic (132 reputation)SSC-Enthusiastic (132 reputation)SSC-Enthusiastic (132 reputation)SSC-Enthusiastic (132 reputation)SSC-Enthusiastic (132 reputation)SSC-Enthusiastic (132 reputation)

Group: General Forum Members
Points: 132 Visits: 210
I spoke too soon - try this instead: http://blogs.msdn.com/b/vascov/archive/2008/09/30/using-performance-dashboard-with-sql-server-2008.aspx

I'm a complete neophyte with DMVs - any additional insight would be gladly welcomed!

Mike



derek.colley
derek.colley
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1182 Visits: 603
Hi Mike, thanks for the links and your comments, I'll check them out tomorrow. Its always nice to learn something new!

---

Note to developers:
CAST(SUBSTRING(CAST(FLOOR(NULLIF(ISNULL(COALESCE(1,NULL),NULL),NULL)) AS CHAR(1)),1,1) AS INT) == 1
So why complicate your code AND MAKE MY JOB HARDER??!Crazy

Want to get the best help? Click here http://www.sqlservercentral.com/articles/Best+Practices/61537/ (Jeff Moden)
My blog: http://uksqldba.blogspot.com
Visit http://www.DerekColley.co.uk to find out more about me.

Misha_SQL
Misha_SQL
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1186 Visits: 1009
Thank you for the article! Very clever (and free) way to have a monitoring dashboard. Assuming you use it yourself, I have a question about the overhead, especially since, as you pointed out, the data can potentially be collected every second. I suspect that on a busy server this can translate into something noticeable.



derek.colley
derek.colley
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1182 Visits: 603
Overhead will depend on how well you optimise the SQL-side stored procedure, I suppose. My version runs OK but might contribute to a performance problem. You could use techniques like WITH (NOLOCK), but this won't have much effect unless you're hammering the DMVs for some other purpose. Or adjust the data collection time interval to suit - i.e. if you could use the data every 30 seconds rather than every 5 seconds, you'll lower the load.

I adapted the techniques I explained in this article only the other day to build a browser-based view of the CPU/scheduler activity. We use Spotlight here, so the info complements the graphs and monitoring that Spotlight offers. It's interesting to watch load build on each scheduler and correlate that to increased CPU activity as shown by Spotlight. I've also used looping techniques to automatically refresh the browser window.

Attached is a screendump of the end result. The formatting is achieved by using VBScript to write a HTML file with CSS3 styling. The bar chart blocks are actually filled-in table cells. Because I use this at work I'm probably prohibited from sharing the code as-is, but if I get around to generalising it I'll publish it in the scripts section.

Thanks for your feedback.

---

Note to developers:
CAST(SUBSTRING(CAST(FLOOR(NULLIF(ISNULL(COALESCE(1,NULL),NULL),NULL)) AS CHAR(1)),1,1) AS INT) == 1
So why complicate your code AND MAKE MY JOB HARDER??!Crazy

Want to get the best help? Click here http://www.sqlservercentral.com/articles/Best+Practices/61537/ (Jeff Moden)
My blog: http://uksqldba.blogspot.com
Visit http://www.DerekColley.co.uk to find out more about me.

Attachments
sm_dump.png (15 views, 64.00 KB)
Neha05
Neha05
Mr or Mrs. 500
Mr or Mrs. 500 (566 reputation)Mr or Mrs. 500 (566 reputation)Mr or Mrs. 500 (566 reputation)Mr or Mrs. 500 (566 reputation)Mr or Mrs. 500 (566 reputation)Mr or Mrs. 500 (566 reputation)Mr or Mrs. 500 (566 reputation)Mr or Mrs. 500 (566 reputation)

Group: General Forum Members
Points: 566 Visits: 60
Nice article.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search