Wednesday, August 29, 2012

Optimizing Microsoft .NET ThreadPool Settings for Microsoft CRM 2011

    You can modify parameters in the Machine.config file to accommodate a specific environment. However, if each .aspx page makes a Web service call to a single IP address, it is recommended to adjust these parameters as shown in the following table:


Parameter                                                      Value
maxWorkerThreads                                       100
maxIoThreads                                                100
maxconnection                                               12*n (where n is the number of CPUs)
minFreeThreads                                             88*n
minLocalRequestFreeThreads                       76*n
minWorkerThreads                                        50 (manually add this parameter and value to the file)

    Several of these recommendations include a formula to calculate the number of CPUs on a server. The variable that represents the number of CPUs in the formulas is N. For these settings, if you have hyperthreading enabled, you must use the number of logical CPUs instead of the number of physical CPUs. For example, if you have a four-processor server for which hyperthreading has been enabled, the value of N in the formulas will be 8 instead of 4.

    When you use this configuration, you can execute a maximum of 12 ASP.NET requests per CPU at the same time because 100-88=12. Therefore, at least 88*N worker threads and 88*N completion port threads are available for other uses (such as Web service callbacks). Using the example of a server with four processors and hyperthreading enabled, these formulas result in the following configuration:

<processModel maxWorkerThreads="100" maxIoThreads="100" minWorkerThreads="50">
  <httpRuntime minFreeThreads="704" minLocalRequestFreeThreads="608">
    <connectionManagement>
      <add address="[ProvideIPHere]" maxconnection="96"/>
    </connectionManagement>

2 comments:

  1. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Microsoft CRM, kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on Microsoft CRM. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us.
    Nitesh Kumar
    MaxMunus
    E-mail: nitesh@maxmunus.com
    Skype id: nitesh_maxmunus
    Ph:(+91) 8553912023
    http://www.maxmunus.com/



    ReplyDelete