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