Windows

How to Tune Performance in IIS 7.5

How to Tune Performance in IIS 7.5

In running sites via Microsoft’s IIS Server platform, it becomes necessary from time to time to adjust performance settings to compensate for high load or other demands on the server running IIS server.  IIS 7 is closely tied in with .NET framework and that being the case we can adjust settings in our .NET framework configuration to affect performance in IIS.

There is a file called “machine.config” which controls the settings for the “global worker process.”  Each one of these worker processes in IIS has a copy of the “machine.config” settings and uses this as a means to increase or decrease the processing power for web applications.  If performance of a website is not that great, we can try to increase those work processes which in turn will make for a larger pool of processing power and improves performance accordingly.

However, there is a catch 22 to this scenario in that setting the worker process settings too high can also degrade performance.  So there is definitely a sweet spot in the settings which must be tuned according to the web application as well as taking the hardware into consideration that is actually running the web application.

Changing “Machine.config” Settings

  • Browse to your .NET framework folder:

    64 Bit%WINDIR%\\Microsoft.Net\\Framework64\\v4.0.30319\\Config

    32 Bit

    %WINDIR\\Microsoft.Net\\Framework\\v4.0.30319\\Config

  • Create a Backup of the current “machine.config” file.This step is extremely important, as any syntax errors within the file can cause major problems  for IIS and MMC in general.  Also, if you have specific machine.config values from a vendor web application, it is almost always best to copy and past these into the machine.config file after you have taken a backup as this will help minimize any typos that might come from keying values in by hand.
  • Find the “processModel” tag which should be near the bottom of the fileAn example of what the processModel tag section might look like after you have pasted values in:
    <processModel
    enable=”true”
    autoConfig=”false”
    maxWorkerThreads=”400″
    maxIoThreads=”200″
    minWorkerThreads=”200″
    minIoThreads=”50″ /><httpRuntime minFreeThreads=”110″ minLocalRequestFreeThreads=”100″/>
  • Look before the “system.web” tag and copy and past the following values:<system.net>
    <connectionManagement>
    <add address=”*” maxconnection=”400″/>
    </connectionManagement>
    </system.net>
  • Reregister ASPNET – To do this, go up a level from the config folder in your .NET path and type the following command

    aspnet_regiis -i

  • Reset IIS – From a command line on the server, type the following command:

    iisreset.exe


Final Thoughts
Altering the files that control IIS via .NET configuration is not that difficult, however, absolute attention to detail and paying attention to what you are doing with manipulating the files is required or you could have a non functional web server in a matter of minutes.  No matter how confident or familiar you are with manipulating files, always make a copy of the machine.config file before changing or adding values, as you can easily break your application along with IIS.

Subscribe to VirtualizationHowto via Email 🔔

Enter your email address to subscribe to this blog and receive notifications of new posts by email.



Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com, and a 7-time VMware vExpert, with over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, He has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family. Also, he goes through the effort of testing and troubleshooting issues, so you don't have to.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.