Analyzing the Performance of the IIS Object Cache

Cache performance is judged by how often objects sought in the cache are found there. Frequent cache misses harm performance if they result in disk I/O. There are no fixed standards for cache performance, although a value of 80 to 90 percent for Internet Information Services Global: Cache Hits % is considered to be excellent for sites with many static files. If Internet Information Services Global: Cache Hits and Internet Information Services Global: Cache Hits % are very low or Internet Information Services Global: Cache Misses is quite high, the cache might be too small to function effectively. Adding memory increases the cache size and should improve its performance.

Cache flushes can also affect the performance of the IIS Object Cache. Cache flushes are regulated, in part, by an internal timer. The timer activates the object-cache scavenger which deletes expired objects. Objects are flushed from the cache if they change or if they time out before they are reused. If the timer is too quick, objects can be flushed from the cache too frequently. If the timer is too slow, objects can be wasting precious physical memory space.

To measure cache flushes, compare the number of cache flushes over time to the number of cache misses and to the rate of page faults of the IIS process (as indicated by the Process: Page Faults/sec: Inetinfo counter. It is important to observe these values over time. Like the other Internet Information Server counters, Internet Information Services Global: Cache Flushes displays an instantaneous value, not an average. If a high rate of cache flushes is associated with elevated cache misses and page faults, the cache might be flushed too frequently.

If you suspect that cache flushes are occurring too rapidly or too infrequently, you might want to change the rate at which unreferenced objects are flushed from the Internet Information Server cache. Make sure you have ample memory before increasing the time between flushes. To change the flush rate, use the ObjectCacheTTL value entry in the Registry. It is located in:

HKEY_LOCAL_MACHINE\System
\CurrentControlSet
\Services
\Inetinfo
\Parameters.

For more information about ObjectCacheTTL, see Regentry.hlp, the Registry help file, on the Supplement 1 CD.