How to monitor IIS bottlenecks?

228 Views Asked by At

I have a web app running on a web server and I am doing a couple of load tests on it. However, I don't know how to pinpoint on IIS bottlenecks.

For example I run 1000 threads load test infinitely on my IIS server using jMeter and everything works fine. However, when I load test 10000 threads the server goes down with 503 Service unavailable error. How can I find the bottleneck for this ertor and how can I fix it?

What kind of monitoring tool/method should I use to find these kind of bottlenecks and fix it?

3

There are 3 best solutions below

0
On

We need to incrementally increase the number of threads.

1 thread, 5 threads, 20, 50, 100, 200, 500 and so on.

We would get a breakpoint at which the server responds with 503 error.

Few tools like newrelic APM, can be useful.

0
On

Conduct a stress test: start with 1 user and gradually increase the load to 10000.

Given ideal system the number of requests per second will be growing by the same factor as the load grows and response time will remain the same.

However there are no ideal systems and at some point you will see that the number of requests per second goes down and response time increases. Also errors can start occurring. The point just before it happens is known as saturation point and it's the maximum performance your current system can provide.

If you increase the load more the things will get worse. Check how many users were online at that stage using Active Threads Over Time listener or equivalent chart of the HTML Reporting Dashboard and report it as the maximum supported load.

0
On

You can analyze IIS log files to see which requests are taking the longest to process and identify any patterns or trends that might indicate a bottleneck.

Additionally, you can use performance counters to monitor server resource utilization (CPU usage, memory usage, and disk activity), such as you can use Perfmon to capture these counters during load testing and analyze the data to identify potential bottlenecks.

Reference links:

https://learn.microsoft.com/en-us/iis/troubleshoot/performance-issues/troubleshooting-iis-performance-issues-or-application-errors-using-logparser

https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/perfmon

https://techcommunity.microsoft.com/t5/iis-support-blog/perfmon-for-iis-and-asp-net/ba-p/826721