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. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

migrated from Oct 6 '11 at 13:23

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

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

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

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

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

Your Answer


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.