ANSWER: POP QUIZ: What are Free Threads in the Threadpool


So I was hoping to get some more comments to this before posting the answer but I guess that isn’t going to happen.

The minFreeThreads and minLocalRequestFreeThreads are very important settings when it comes to how much load your webserver can handle.  So the whole situation is this. 

You can get a good overview of the settings from my post, Hangs and how to solve them – part 2 – Queuing.  In there I give the recommended values in the “How to fix queuing” section.

There is a great write up on this here.  But to summarize, these control the amount of threads that are available to do work other then aspx requests.  So callbacks, timers, web service calls.  They all run on the threads “reserved” by this setting.  So if you have maxWorkerThreads set to 100 on a single processor machine and minFreeThreads set to 88, that means 12 threads can run aspx requests at the same time and 88 threads are available for web service calls, timers, etc.  That last link also has the perfmon counters to monitor to make sure things are running smoothly.

Now for the extra credit, one time you would want to change these is if you make more then one web service call on each aspx page.  That is what the settings are geared towards.  So if you did, you may want to make more threads available for the web services to run on so that wasn’t causing you a bottleneck.


Comments (7)

  1. Mandi says:

    Makes perfect sense, thank you!

  2. Dave Black says:

    Thanks for the answers!  

    I would assume that using AJAX & WebServices (Page Methods) would also be affected by your answer to the extra credit question?

  3. Dave,

    Correct, those will also use those threads in question.

  4. Richard says:

    From the doc you listed, the recommened value for minFreeThreads is 88 * #CPU. I’m curious why there’s so much discrepancy between default value 8 with recommened value?

  5. Richard,

    Great question.  The original settings (default value in 1.x) were for a development machine.  The assumption was that they would be adjusted for production.

  6. 최근 진행된 SCOM/SSRS 관련 Troubleshooting에서 처음으로 64bit Windows 2008에서 작동 중인 IIS 프로세스 디버깅을 시도해었습니다. 물론 Managed