Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Determining what is putting pressure on IIS

I got a dedicated server running both IIS 7.5 and SQL Server 2010. Server CPU load is often near 100%. The SQL server does not take too much but the w3wp process is taking a significant amount of CPU (often 70+%).

I'd like to find out, what is causing this pressure: * Too many requests of static files (a CDN could be added) * Too many ajax requests (I am thinking about comet/web sockets anyways) * Single asp.net pages consuming too much processing power (should be easy to optimize)

Where would you start looking to find out where to start optimizing?

like image 493
Sparhawk Avatar asked Jun 24 '12 12:06

Sparhawk


People also ask

How do I reduce IIS worker CPU usage?

Fix high CPU usage in the IIS worker process. To fix the high CPU usage, you will need to do two things: Eliminate the blockages causing poor performance under high CPU usage (making your workload more elastic). Reduce CPU usage of the application code, to avoid CPU overloads and be able to handle more traffic.

How do I monitor w3wp process?

You could try using a program called Process Explorer to monitor individual threads running under the w3wp process. It should allow you to see what thread is causing all the damage.

How many threads can IIS handle?

The “hard” limit on the max number of threads in the IIS thread pool. This limit can be set to a value between 64 and 256, so you cannot have more than 256 IIS threads in the pool regardless of settings.

Why is IIS so slow?

Causes of IIS website slow to load issue This can be due to faulty website code, resource crunch on the server, bad server settings, etc. Many times, the end result that we see as slowness will be a combination of many factors.


1 Answers

The easiest possible way is to profile the app in production. Not sure if that is possible in your case. Some options:

  • look into the logs and look at the duration of the requests. Long requests are likely to put load on the system
  • Remote debug w3wp with Visual Studio and pause the debugger 10 times to see where it stops most. That is the hot spot
  • Use XPerf or PerfView to capture (managed) stacks. This has almost no impact on production performance
like image 104
usr Avatar answered Nov 03 '22 09:11

usr