I’m running some performance tests on an ASP.NET MVC application. I see a high contention rate and the number of threads increasing overtime. I believe the two to be related, as threads are blocked new threads are created by the thread pool to handle incoming requests. I believe this in turn is making the contention worse (i.e. more threads more contention).
The correct approach is probably to take the cause of the contention, i.e. make the critical sections smaller, verify that all the locks are really needed etc. However, as an intermitted step I’d like to limit the number of threads that can be created by the thread pool. My belief is that all though this may lead to requests staying in the queue longer it will improve overall though put as it will reduce contention and thread context switching.
However, I can find how to configure this in IIS 7.5, can anyone help me?
Thanks, Rob