title: ASP.NET web garden - max worker threads
body: <p>I'm investigating some performance improvements that can be made to our web server and ASP.NET application. <a href="http://support.microsoft.com/kb/821268" rel="nofollow">This</a> page contains a few things that we can do.</p>
  
  <p>We currently have two worker processes running as a garden.  Do each of these worker processes have their own ASP.NET threadpool?  Or do both of these worker processes share a single threadpool and the max number of worker threads is shared across these processes?</p>
  
  <p><a href="http://blogs.msdn.com/b/david.wang/archive/2006/03/14/thoughts-on-application-pools-running-out-of-threads.aspx" rel="nofollow">This</a> post seems to suggest that the two processes share a common ASP.NET threadpool.</p>
  
  <blockquote>
    <p>All w3wp.exe threads do is take
    requests from HTTP.SYS queue, process
    it, and hand the request to
    ASPNET_ISAPI.DLL, who then deposits
    those requests into the ASP.Net
    request queue, and the ASP.Net threads
    service that queue.</p>
  </blockquote>
  
  <p>But <a href="http://forums.asp.net/t/1162420.aspx" rel="nofollow">this</a> post suggests that each worker process contains their own ASP.NET threadpool. </p>
  
  <blockquote>
    <p>Each process (w3wp.exe) has its own
    CLR thread pool which has the
    configured maxworkerthreads value (20
    default).</p>
  </blockquote>
  
  <p>Which is correct?</p>