DaveWentzel.com All Things Data
IIS performance issues
Memory is a big problem in IIS. By default the IIS file cache is configured to use up to half of the available system memory. So, on a 1 GB RAM system the IIS file cache could use 512MB. Plus, IIS calcs its memory cache requirements evey 60 seconds and makes any memory that isn't required available for other applications.
Consider changing the maximum cached file size:
By default, IIS caches only files that are 256KB or less in size. If you have large data or multimedia files that are accessed frequently, you might want to increase this value to allow IIS to cache larger files. Keep in mind that with file sizes over 256K you'll reach a point at which caching won't significantly improve performance. To control this you create and then set the Windows registry value MaxCachedFileSize.
Consider adjusting the TTL value for cached resources:
By default, IIS purges from cache any resources that haven't been requested within the last 30 seconds. If you have additional memory on the server, you might want to increase this value so that files aren't removed from cache as quickly. To control the TTL value for cached resources, you create and then set the registry value ObjectCacheTTL. You can also set it to unlimited (0xFFFFFFFF). This allows resources to remain in cache until they are overwritten.
To control this better add the reg entry MemCacheSize as REG_DWORD and set its decimal val between 0 and 2500MB at
Also, ensure your server is set up for Application Performance. Control Panel, System, Advanced tab, Performance Options. Visual Effects = Adjust for Best Performance. In the Advanced tab, select Background Services. Ensure that under Adjust For Best Peformance Of, System Cache is selected.
Also, set Data Throughput correctly. For your main NIC, select File and Print Sharing, Props, Server Optimization, Maximize Data Throughput For Network Applications. Reboot.
IIS PerfMon Counters
Memory\Cache Bytes: represents the total size of the file system cache
IIS Global\Current File Cache Memory Usage: current mem used by the IIS file cache
IIS Global\File Cache Hits %: ratio of cache hits to total cache requests and reflects how well the settings for the IIS file cache are working. A site with mostly static files should have a very high cache hit %
IIS Global\File Cache Flushes: how quickly IIS is flushing files out of cache. If flushes are occurring too quickly, you might need to increase the TTL value for cached objects (ObjectCacheTTL). If flushes are occurring too slowly, you might be wasting memory and might need to decrease the TTL value for cached objects.
System\Processor Q Length: number of threads waiting to be executed. Sustained value of 10+ and you probably need to add or upgrade processors.
IIS PerfMon Counters for ASP
Request Wait Time: # of ms the most recent request was waiting in the q.
Requests Q'd: # of requests waiting to be processed.
Requests Rejected: total number of requests not executed b/c there weren't resources to process them.
In general you don't want to see requests waiting in the q, and if there are the waits should be low.