Monitoring the File System Cache

Applies To: Windows Server 2003, Windows Server 2003 with SP1

Monitor the counters in Table 6.16 to determine whether a server has a performance bottleneck associated with the size of the file system cache. These counters display the last observed value only; they do not display an average value.

Table 6.16 Counters for Monitoring the File System Cache

Object\Counter Value

Memory\Cache Bytes

The current size, in bytes, of the file system cache. By default, the cache uses up to 50 percent of available physical memory. The counter value is the sum of Memory\System Cache Resident Bytes, Memory\System Driver Resident Bytes, Memory\System Code Resident Bytes, and Memory\Pool Paged Resident Bytes.

Memory\System Cache Resident Bytes

The current size, in bytes, of the pageable operating system code in the file system cache. This value includes only current physical pages and excludes any virtual memory pages not currently resident.

Memory\System Driver Resident Bytes

The current size, in bytes, of the pageable physical memory in use by device drivers. This represents the working set (physical memory area) of the drivers. This value is a component of Memory\System Driver Total Bytes.

Memory\System Code Resident Bytes

The current size, in bytes, of the operating system code currently in physical memory that can be written to disk when it is not in use. This value is a component of Memory\System Code Total Bytes.

Memory\Pool Paged Resident Bytes

The current size, in bytes, of the paged pool. The paged pool is an area of system memory (physical memory used by the operating system) reserved for objects that can be written to disk when they are not in use. The space that is used by the paged and nonpaged pools is taken from physical memory; thus, a pool that is too large denies memory space to processes.

The value of the Memory\System Cache Resident Bytes counter equals the System Cache value shown on the Performance tab in Task Manager. As a result, this value can be smaller than the actual amount of virtual memory in use by the file system cache.

Windows Server 2003 automatically trims the cache when memory is scarce and enlarges the cache when memory is ample. Use the Memory\Cache Bytes counter to monitor the size of the file system cache. A log of cache size readings reveals how the size of the file system cache changes over time. Compare the log data to a measure of general memory availability, such as data from the Memory\Available Bytes counter. By monitoring these counters and watching the trends, you can expose memory shortages in a server.

When examining the logs, note when the cache is smallest. Track how small the cache gets and how often its size is reduced. Also, note how much system memory is available when the cache size is reduced. By watching these trends, you can begin to associate the size of the cache with the servers performance. For example, if performance degrades when the cache is large, consider adding RAM. If performance degrades when the cache is small, consider increasing the time interval during which objects remain in the cache before being flushed. For more information about monitoring and tuning IIS file cache, see Web Server Scalability.