1

I am having trouble with the web servers CPU getting stuck at 25%, then 50%, then 75% until finally maxing out at 100%. Which we are guessing may be some slightly slower SQL queries stacking up, but cannot replicate the problem

Trying to get to the bottom of the problem, we started looking at the settings on IIS (7), we came across the option to set 'web server processes' to more than 1, thinking this could free up and increase the processes available to users queries, but as soon as we did this it broke our application, which we later discovered is likely to be because we use sessions, and the web server processes do not keep sessions from the same user.

So the question is, is there a setting that will allow us to continue using sessions, but also allowing multiple worker processes?

or, does anybody have any thoughts on what could be causing the uplift in cpu usage?

Thanks in advance for any advice

2
  • 1
    How about using Task Manager or Perfmon to find the guilty process.
    – joeqwerty
    Jul 5, 2011 at 11:08
  • thanks for the reply, we know its a web service, w3wp.exe process, but can't seem to drill down any further to particular queries or requests?
    – simon
    Jul 5, 2011 at 14:06

2 Answers 2

1

On Maximum Processes: This is called Web Gardening - unless your app is stateless, you can't do that. Plus, in most cases # processes won't improve scalability, because Windows schedules threads, not processes.

To work out what's wrong:

  • Use the Worker Processes view at the Server level in IIS Manager.

  • Within Worker Processes, all the W3WPs will be listed, and the applications they belong to.

  • You can then look at the running requests in each process by right-clicking it.

If that's still not enough to narrow down the cause, you'll need to use a sampling profiler or debugger to determine what the app's trying to do. XPERF from the Windows Performance Toolkit, or DebugDiag, or WinDBG, or Process Explorer could be used to get an idea of what it's doing.

0

Try using Process Explorer + Process Monitor from Sysinternals.

PE will let you view most of the procees stats, as well as per thread call stack. PM will show you all process, filesystem, registry & network activity of the process in real-time.

If you want more in-depth info on using them, look around on the Sysinternals website. There are several tutorials and videos highlighting their usage.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .