I'm having a performance problem in a site we've made, and I'm not exactly sure how to start diagnosing it.
The short description is: We have a very small site (http://hearablog.com) with very little traffic, in a crappy dedicated server, CPU is always very high, sometimes it stays at 100% for minutes, and w3wp.exe is taking most of it. A typical scenario is w3wp.exe takes 60%, and SQL Server takes about 30%. Our DB is pretty small too.
Long description and more details:
The site is hosted in a very crappy server by Cari.Net. From the beginning we had the feeling that the server didn't quite behave correctly, like some things would take just too long, so this could be a configuration problem from the get go. It may also be that we are getting a virtual server while we're supposed to have a dedicated one, although we have no evidence that'd indicate this, except for the fact that the server tends to be quite slow.
The server is Windows 2008 Standard 64-bit, with SQL 2008 Express
Hardware is a Celeron 2.80 GHz, 1Gb RAM
The website is developed in ASP.Net MVC, using Entity Framework for data access.
Now, this is pretty crappy hardware, but i've had other servers with these guys, with equivalent (or worse) HW, and performance is much better than this one. That said, the other servers have W2003 and SQL2005, and I'm using ASP.Net "WebForms" 2.0, no MVC, no LINQ, no EF; so I'm not sure whether going to 2008 / the other stuff means a big performance penalty is expected.
I'm serving MP3 files (5-20 Mb) regularly, which is a slightly unusual load, maybe that is causing some kind of problems?
Would that cause w3wp to use a lot of CPU?
Disk usage seems very low. Memory is usually around 90%, but disk usage seems to indicate it's not paging much.
I get tons of e-mails every day about SQL timeouts, for queries taking over 30 seconds, although all our queries are pretty straightforward (or should be, but EF may be screwing it up).
This is what resource monitor looks like in one of these "sprints" of 100% CPU, in case there's anything useful there.
And a snapshot of some performance counters:
Now, what confuses me very much is that CPU usage of w3wp is just so high. It shouldn't be doing much really... So my questions are...
- Is there any way of finding out "what" it is doing? Maybe even profile it?
- Any performance counters I should be looking at?
- Is this to be expected given this hardware/software configuration?
- Is this could be cause by some kind of configuration failure, where would you start looking?
Thank you VERY much.