Microsoft Knowledge Base Email Alertz

KBAlertz.com: Functionality has been added to the common language runtime Threadpool class that permits you to configure the minimum number of Worker threads and I/O threads. Configuration settings have been created to use this functionality from ASP.NET.

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]

Search KbAlertz

Advanced Search

Webmasters
Put kbAlertz on your website.
[ Click Here for more! ]





ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **


Bug Tracking Software
For bug tracking software or defect tracking software or issue tracking software, visit Axosoft.


Community Site



We Send hundreds of thousands of emails using ASP.NET Email



Expert Web Design & Graphic Design
Design44.com

ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **




Mentioned In








Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks




Article ID: 810259 - Last Review: May 23, 2007 - Revision: 3.9

FIX: SetMinThreads and GetMinThreads API Added to Common Language Runtime ThreadPool Class

SYMPTOMS

You cannot configure the minimum number of Worker threads or I/O threads in the ThreadPool class.

RESOLUTION

A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next .NET Framework service pack that contains this fix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support (http://support.microsoft.com/contactus/?ws=support)
NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Date	        Time   Version       Size       File name
   --------------------------------------------------------------
   08-Nov-2002  17:34  1.0.3705.374    196,608  Aspnet_isapi.dll
   08-Nov-2002  17:26                    4,169  Aspnet_perf.h
   08-Nov-2002  17:26                   20,468  Aspnet_perf.ini
   08-Nov-2002  17:26                   20,342  Aspnet_perf2.ini
   08-Nov-2002  17:34  1.0.3705.374     24,576  Aspnet_regiis.exe
   08-Nov-2002  17:34  1.0.3705.374     28,672  Aspnet_wp.exe
   08-Nov-2002  16:52  1.0.3705.374     69,632  Corperfmonext.dll
   10-Nov-2002  14:56  1.0.3705.374  1,953,792  Mscorlib.dll
   31-Oct-2002  18:04                   10,252  Mscorlib.ldo
   08-Nov-2002  16:51  1.0.3705.374  2,269,184  Mscorsvr.dll
   08-Nov-2002  16:51  1.0.3705.374  2,269,184  Mscorwks.dll
   22-Aug-2002  19:23                       15  Smartnav.htm
   22-Oct-2002  13:41                    8,728  Smartnav.js
   20-Mar-2002  13:31                    7,003  Smartnavie5.js
   10-Nov-2002  14:59  1.0.3705.374  1,187,840  System.web.dll
				

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Functionality has been added to the common language runtime ThreadPool class that permits you to configure the minimum number of Worker threads and I/O threads during load.

Microsoft recommends that you tune the minimum number of threads only when there is load on the Web server for only short periods (0 to 10 minutes). In these cases, the ThreadPool does not have enough time to reach the optimal level of threads to handle the load.

If the minimum number of Worker threads or I/O threads is configured, the ThreadPool immediately creates new threads up to the minimum number specified (the default is 0) during a time of high load. After inactivity, these threads die.

The following two APIs have been added to the ThreadPool class:
  • ThreadPool.SetMinThreads Method
    Sets the minimum number of worker threads and the minimum number of asynchronous I/O threads for the ThreadPool.
    public static bool SetMinThreads(int workerThreads, int completionPortThreads);
    Parameters
    workerThreads: The number of worker threads.
    completionPortThreads: The number of asynchronous I/O threads.
  • ThreadPool.GetMinThreads Method
    Gets the minimum number of worker threads and the minimum number of asynchronous I/O threads for the ThreadPool.
    public static void GetMinThreads(out int workerThreads, out int completionPortThreads);
    Parameters
    workerThreads: The number of worker threads.
    completionPortThreads: The number of asynchronous I/O threads.
For more information about the ThreadPool class, visit the following Microsoft Web site:
ThreadPool Class
http://msdn2.microsoft.com/en-us/library/system.threading.threadpool(vs.71).aspx (http://msdn2.microsoft.com/en-us/library/system.threading.threadpool(vs.71).aspx)
Two new configuration settings have been added to the <processModel> configuration section in the Machine.config to use the new ThreadPool class functionality from ASP.NET:
  • minWorkerThreads: Configures the minimum number of worker threads to be used for the process on a per-CPU basis. For example, if this value is 10 on a single-processor server, ASP.NET uses the runtime APIs to set the process limit to 10. On a two-processor server, the limit is set to 20. The default is 0.
  • minIoThreads: Configures the minimum number of asynchronous I/O threads to be used for the process on a per-CPU basis. For example, if this value is 10 on a single-processor server, ASP.NET uses the runtime APIs to set the process limit to 10. On a two-processor server, the limit is set to 20. The default is 0.

APPLIES TO
  • Microsoft .NET Framework 1.1
  • Microsoft ASP.NET 1.0
Keywords: 
kbhotfixserver kbqfe kbfix kbbug KB810259
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Be the first to leave feedback, to help others about this knowledge base article.

(Optional) Name

(Optional) Public URL Or Email

Comments
No HTML -- Text Only Please