Learn about the technologies behind the Internet with The TCP/IP Guide!
NOTE: Using robot software to mass-download the site degrades the server and is prohibited. See here for more.
Find The PC Guide helpful? Please consider a donation to The PC Guide Tip Jar. Visa/MC/Paypal accepted.
View over 750 of my fine art photos any time for free at DesktopScenes.com!

[ The PC Guide | System Optimization and Enhancement Guide | System Optimizations and Enhancements | Operating System Performance Optimization ]

Limit Windows 95 Disk Cache Size and Eliminate Cache Resizing

A disk cache is an area of memory that is set aside to cache (store) the data most recently read from the hard disk. This is done to improve performance, since the system memory is many times faster than the hard disk. Read about disk caching here.

There are two problems with the default way that Windows 95 manages its disk cache: first, it resizes the cache dynamically (like its virtual memory swap file); second and worse, it starts out with the cache very large, using up all of the memory not being used by programs. It then reduces the size as memory is needed.

What's wrong with this? Well, consider that the disk cache and virtual memory are practical opposites. The disk cache is using memory as "fake disk", and virtual memory is using disk as "fake memory". Ideally, you want to keep as much as possible of what you are actually using in memory, and avoid going to disk. This means that virtual memory swapping should be minimized even at the expense of the disk cache.

What Windows 95 does by default is to grab all of the available memory that is not in use by programs, and use it for the disk cache. This leads to an odd catch-22: while disk access speeds up due to the large disk cache, there isn't enough free memory for programs. So Windows 95 will start swapping the contents of memory (other than the disk cache) to virtual memory! So you have to put up with the performance drag of thrashing simply because your memory is tied up with a large disk cache. The end result is often worse than if the disk cache weren't even in use.

The solution to this silliness is to limit the amount of memory that Windows 95 uses for the disk cache. The amount of memory to use for the disk cache depends somewhat on your needs and what is more important to you performance-wise. It also depends on how much memory you have. I generally recommend that 1/8th of the system memory be used for the disk cache. You can try higher numbers to see if this improves your system performance.

Limiting the disk cache size is a bit tricky; Microsoft didn't make it easy:

  1. Edit the SYSTEM.INI File In Your Windows Directory: You will need to use a text editor, such as WordPad, to edit the SYSTEM.INI file in your windows directory. This is usually C:\WINDOWS\SYSTEM.INI.
  2. Find the "[vcache]" Section: Scroll through the file until you find a line that contains the phrase "[vcache]" alone on a line. This is the section that contains controls for the disk cache.
  3. Add Two Lines to the Section: Add the following two lines after the "[vcache]" line: "MinFileCache=<n>" and "MaxFileCache=<n>" where "<n>" is replaced by the size of the disk cache you want to use, in kilobytes. On a system with 32 MB of RAM, you may for example put "MinFileCache=4096" and "MaxFileCache=4096". Make sure they are in two separate lines and directly under the "[vcache]" entry.
  4. Reboot: Reboot Windows to activate the changes.

You should notice an improvement in performance and less hard disk activity, especially when working with multiple applications.

Next: Increase the Disk Cache Size to Improve Performance In Heavy Disk Use Applications

Home  -  Search  -  Topics  -  Up

The PC Guide (http://www.PCGuide.com)
Site Version: 2.2.0 - Version Date: April 17, 2001
Copyright 1997-2004 Charles M. Kozierok. All Rights Reserved.

Not responsible for any loss resulting from the use of this site.
Please read the Site Guide before using this material.
Custom Search