How many threads per logical cpu can IIS7.5 64bit handle at once?

iis, iis-7, iis-7.5

Solution

http://msdn.microsoft.com/en-us/library/system.threading.threadpool

There is one thread pool per process. Beginning with the .NET Framework 4, the default size of the thread pool for a process depends on several factors, such as the size of the virtual address space. A process can call the GetMaxThreads method to determine the number of threads. The number of threads in the thread pool can be changed by using the SetMaxThreads method. Each thread uses the default stack size and runs at the default priority.

http://blogs.msdn.com/b/tmarq/archive/2007/07/21/asp-net-thread-usage-on-iis-7-0-and-6-0.aspx

So for IIS 7.0 integrated mode, a DWORD named MaxConcurrentRequestsPerCPU within HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET\2.0.50727.0 determines the number of concurrent requests per CPU. By default, it does not exist and the number of requests per CPU is limited to 12. If you’re curious to see how much faster ASP.NET requests execute without the thread switch, you can set the value to 0. This will cause the request to execute on the IIS I/O thread, without switching to a CLR Threadpool thread. I don’t recommend this primarily because dynamic requests take a long time to execute relative to static requests, and I believe the overall performance of the system is better with the thread switch. However, and this is important, if your application consists of primarily or entirely asynchronous requests, the default MaxConcurrentReqeustsPerCPU limit of 12 will be too restrictive for you, especially if the requests are very long running. In this case, I do recommend setting MaxConcurrentRequestsPerCPU to a very high number. In fact, in v4.0, we have changed the default for MaxConcurrentRequestsPerCPU to 5000. There's nothing special about 5000, other than it is a very large number, and will therefore allow plenty of async requests to execute concurrently.

Problem

How many threads per logical cpu can IIS7.5 64bit handle concurrently? I have heard 12 IIS processing threads per logical cpu but I have also heard it was 100 IIS processing threads per logical cpu. UPDATE: Sorry for not being specific but I was referring to IIS threadpool threads. That is when an http get request comes into my webapi server how many concurrent http get requests (per logical cpu) can my server handle at one time? I'm trying to calculate some threshold capacity numbers based on the number of requests my server can handle based on average response times from my get, which is ~500ms.

Original source