Microsoft Knowledge Base Email Alertz

KBAlertz.com: (815156) - This step-by-step article describes how you can restrict ASP.NET to use specific processors in a multiprocessor system. You can configure ASP.NET applications to use specified processors in a multiprocessor system. This is useful to control the...

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
KBAlertz referrals get
** SIX MONTHS FREE **


Community Site



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


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
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: 815156 - Last Review: May 12, 2007 - Revision: 4.4

How to restrict ASP.NET to specific processors in a multiprocessor system

On This Page

SUMMARY

This step-by-step article describes how you can restrict ASP.NET to use specific processors in a multiprocessor system. You can configure ASP.NET applications to use specified processors in a multiprocessor system. This is useful to control the overall performance effect that Web applications may have on a server. When you restrict multiple ASP.NET applications to certain processors on a single server, you limit the opportunity for an application to affect the performance of another application. This is particularly useful when the ASP.NET application executes on the same physical server as the SQL Server, and the SQL Server configuration specifies different processors.

Note In most cases, you can reach optimal performance if you allow all processes to use all processors. Processor usage for ASP.NET must be restricted only to limit the effect on other processes.



Configure the processModel element

To force an ASP.NET application to use specific processors, you must convert a binary number to determine the correct settings. Then you can edit the Web.config file for the application. In the Web.config file, you add or you modify the processModel element. To do this, follow these steps:
  1. To open Calculator, on the task bar click Start and then click Run.
  2. In the Open text box, type calc.exe and then click OK.
  3. On the View menu, click Scientific.
  4. On the View menu, click Binary.
  5. Use 0 and 1 to specify the processors ASP.NET can or cannot use.

    Use 1 for the processor that you want to use for ASP.NET. Use 0 for the processor that you do not want to use for ASP.NET. For example, when you want to use the first two processors for ASP.NET of a four-processor computer, type 1100.
  6. On the View menu, click Decimal.

    Note the decimal number.
  7. Open the Web.config file in a text editor such as Notepad. The Web.config file is located in the folder where the application is saved.
  8. In the Web.config file, add the processModel configuration element under the System.web element.

    Note: Before adding <processModel> to Web.config file, the user has to make sure that the allowDefinition attribute in the <processModel> section of the Web.config file is set to Everywhere.
  9. Add and then set the webGarden attribute of the processModel element to True.
  10. Add and then set the cpuMask attribute of the processModel element to the result that is determined in your calculation.

    Do not preface the number with 0x because the result of the calculation is a decimal number. The following example demonstrates the processModel element that is configured to enable only the first two processors of a four-processor computer.
    <processModel
        enable="true"
        webGarden="true"
        cpuMask="12" />
    
  11. Save the Web.config file. The ASP.NET application automatically restarts and uses only the specified processors.

REFERENCES

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
818015  (http://kbalertz.com/Feedback.aspx?kbNumber=818015/ ) How to tune and scale performance of applications that are built on the .NET Framework
For more information about the <processModel> element, visit the following Microsoft Web site:
http://msdn2.microsoft.com/en-us/library/7w2sway1(vs.71).aspx (http://msdn2.microsoft.com/en-us/library/7w2sway1(vs.71).aspx)
For more information about the <section> element, visit the following Microsoft Web site: http://msdn2.microsoft.com/en-us/library/aa309408(VS.71).aspx (http://msdn2.microsoft.com/en-us/library/aa309408(VS.71).aspx)


APPLIES TO
  • Microsoft ASP.NET 1.0
  • Microsoft ASP.NET 1.1
Keywords: 
kbwebservices kbwebserver kbwebforms kbconfig kbhowtomaster KB815156
       

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