2
votes

I have a simple ASP.Net MVC application which is deployed in IIS. I ran a sample load test on this app. I have response times recorded in my application. When i compare the response time in application with IIS response time, IIS response times are too higher than my application logs.

What I understand from this is, IIS does not have enough worker threads to process the requests and keeps the requests on hold. This hold time is also recorded as part of IIS response time.

Is my understanding correct. If yes, how do I increase worker threads so that the overall through put is increased.

I tried the below steps to increase worker threads, but I did not see any impact after changes. https://support.microsoft.com/en-us/help/821268/contention-poor-performance-and-deadlocks-when-you-make-calls-to-web-s

Regards

1
Are the response times so high that they are causing problems in your application? I would suggest you leave it alone. IIS is doing what it is supposed to do.Gabriel Luci
msdn.microsoft.com/en-us/library/… It is too early to increase threads. Check "Requests Queued" and "Request Wait Time" and see what is the trend of them during your load test. Only if they indeed show the requests are pending in the queue, you can move on to increase worker thread numbers. After changing machine.config, make sure you reboot the machine and test again.Lex Li
Yes and no. If at the same time the server is running max capacity (CPU, IO, whatever is used by the app) then that needs more of that ressource. The reason things wait, then, is not a thread issue but a contention issue that blocks back INTO the queue.TomTom
Threads are normally an ample resource in ASP.NET. You would need very high levels of concurrency to max out the pool. Maybe you are trying a synthetic workload such as sleep(1000)? Use Process Explorer to determine the actual thread counts, post code and say how you performed the load test.usr

1 Answers

2
votes

If your server is saturated (maxed-out) with the current requests, it would probably be a bad idea to add more threads. This will simply create more contention for resources and make the problem worse.

When your server is receiving too many requests at once, and it is exceeding its capacity, IIS will queue requests to relieve presssure, until the current requests can complete.

Your tests have simply revealed the capacity of your system. At this point, if your capacity is not high enough, you need to consider an optimization strategy or consider other options like "scaling-up" or "scaling-out".