[Cacheman logo] Copyright © 1997 Bryce Cogswell and Mark Russinovich Last Updated July 9, 1997 Controlling the NT system cache Introduction Windows NT provides system administrators with virtually no control over the system cache's sizing and write-back behaviors. Other than specifying that it should be Large or Small (the definitions of which are not documented by Microsoft), none of the cache's parameters can be altered. The Cache Manager uses a variety of complex equations to determine when it should grow and shrink, and when it should write dirty data back to disk. Use Cacheman to explore alternate NT system caching parameters to see if performance can be increased for particular applications (or in general!). Installation To run Cacheman, simply copy the executable and driver to and Use a local hard drive and type "cacheman". The Cacheman dialog dynamically loads the Cacheman driver. Cacheman presents Cache Manager tuning parameters as groups of related settings. Alter the settings you desire and then direct Cacheman to enforce your choices. Here is a brief description of each of the variables that Cacheman lets you change. While running Cacheman you can use the dialog help pointer to obtain these descriptions in a help balloon. Note that these are our best guesses as to what these variables represent and may not be totally accurate. * CcFirstDelay Delay before writing back a page after first access * CcIdleDelay Idle period to wait before writing back dirty pages * CcCollisionDelay Delay by this amount if writeback not possible * CcTargetCleanDelay Standard delay before writing back dirty data * CcDirtyPageThreshold Maximum number of dirty pages to allow in cache * CcDirtyPageTarget Desired number of dirty pages in cache * CcAvailableMaxDirtyWrite Maximum number of dirty pages to write back at a time * CcAvailablePagesThreshold Require at least this many pages available * MmSystemCacheWsMinimum Minimum size of the working set of the cache * MmSystemCacheWsMaximum Maximum size of the working set of the cache * MmDoPeriodicAgressiveTrimming Agressively reduce working sets of all tasks * MmPeriodicAgressiveTrimMinFree Trim working set of cache if available pages greater than this amount * MmPeriodicAgressiveTrimMaxFree Trim working set of cache if available pages less than this amount * MmPeriodicAgressiveCacheWsMin Trim cache to this amount periodically * MmWorkingSetReductionMaxCacheWs Trim cache by this amount if larger than max size * MmWorkingSetVolReductionMaxCacheWs Trim cache by this amount if larger than max size during volume reduction Cacheman does not perform validity checking on input values so it is possible that entering inappropriate settings will result in the system becoming unstable or crashing. Changes to most of these variables will not immediately have a noticeable affect on the Cache's behavior or size unless the system is under heavy memory load. We have not spent much time experimenting with different values, so if you obtain benchmark performance results of the standard caching policy compared to one you have enabled, we would be interested in posting them. Cacheman runs on NT 4.0 Final Release, SP1, SP2 and SP3. Sample Screenshot Here is a screenshot of Cacheman. ------------------------------------------------------------------------ Download CacheMan (18KB) [Image]