Tip for optimizing IIS6 memory usage
Our server/s memory is not endless and we need to divide it between our OS and our applications wisely in order to achieve better performance.
In order to optimize the use of our server memory we should be familiar with three terms:
Page File
The memory allocation from the hard disk that the Windows OS and/or IIS Process/es can use in addition to the available RAM for swapping to disk when we run out of RAM.
.NET Framework 1.0 was able to handle address length of 2GB so we had to set our pagefile to no more then the 2GB limit.
With .NET framework 1.1 we can enlarge it up to 3GB.
To enjoy the use of 3GB pagefile we should configure the boot.ini as follow:
to configure the boot.ini you need to add the following ending line flags (should be a single line)
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS=
"Windows Server 2003" /fastdetect /3GB /USERVA=3030
Private Bytes
The physical RAM that is being used by the IIS web application process
Virtual Bytes
The memory we allocate from the pagefile for the IIS process/es usages
Private Byte - should be set to 60% of available RAM
Virtual Byte should be 600MB more then the setting number of the Private Bytes
We can set it in IIS6 within the recycling tab:
These resources should be adjust to our application needs. Like always, the best thing to do is to monitor our server and application/s and understand how well our machine memory usage being done and if we can and should optimize it to our needs.