Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm not an IT pro, but a web developer that happens to have his own blog. The blog is hosted on a private VM on which I have both IIS and SQL Server.

Sometime my blog, which is not super busy stops responding to requests, and today I did a bit more of troubleshooting and logging via remote desktop I found that every now and then the CPU acts weird and does the following.

CPU usage

It happens for a certain period of time and then goes back to normal. And after a while it starts again. I really have not clue of what might cause that. Can someone help me solve that nasty problem? Thank you

share|improve this question
    
I didn't know about the DBA forum. Might find more answers here. Thank you for moving it –  CodeClimber Oct 6 '11 at 14:18
    
Check your system logs, what do you see? Did any process start or throw errors? Would windows updates be the culprit? What other resources are consumed? Are the spikes at regular time intervals, say every hour? –  rlb.usa Oct 6 '11 at 23:53
add comment

migrated from stackoverflow.com Oct 6 '11 at 13:23

This question came from our site for professional and enthusiast programmers.

3 Answers

If you happen to find that SQL Server is consuming the resources a few things you can check within SQL Server:

Adam Machanic's sp_whoisactive. It documents using it very well and it can provide a wealth of information about what your system is doing at times.

A quick query with the performance DMVs can also shed some light on what is going on.

share|improve this answer
add comment

If you run Process Explorer then you can hover over the CPU usage graph an see which process was consuming the most CPU at different points in time.

share|improve this answer
    
Yes, also double checking with process Explorer, it is SQL Server causing that mess –  CodeClimber Oct 6 '11 at 11:25
add comment

How are you sure it is SQL Server? Did you see the processor utilization for the services?

If that is the case then there are a few things to check. I know you are using express, but if you have a custom scheduling agent, see what your schedule could be. Also, you will see CPU spike when statistics are updated.

Its hard telling without knowing more information.

EDIT: if you can get your hands on SQL Server Profiler then run that as well as perfmon. You can combine the two and you'll be able to see exactly what is happening on the instance when the CPU spikes.

share|improve this answer
    
I'm pretty sure it is SQL Server because the CPU numbers on his line were the same as the chart. No scheduled tasks around. Are stats updated every 10 minutes? –  CodeClimber Oct 6 '11 at 11:11
    
No they aren't not unless you have a large amount of data changing frquently. –  Thomas Stringer Oct 6 '11 at 11:20
    
@CodeClimber take a look at my edited answer. –  Thomas Stringer Oct 6 '11 at 11:22
    
Does SQL Server Profiler also tracks internal operations or just requests that come from the apps (like queries from websites)? –  CodeClimber Oct 6 '11 at 11:37
    
@CodeClimber anything that hits the database. Does it through SQL Trace, shows events of the database. –  Thomas Stringer Oct 6 '11 at 12:06
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.