|
View the PuterGeek.Com Sponsors |
|
This site is a mirror of the former PuterGeek.ComŽ founded by Peter Crockett. The webmaster of this mirror is aware that the search box, counters, and some offsite links do not work. |
[ Home ] [ Site Map ] [ Site Search ] [ Back to last page ]
This white paper discuses how to optimize the vcache for better system performance. What vcache is, what it does, the possible impact of changing the settings for it, and how to change it.
NOTE: In WinME, The vcache is much better at releasing ram back to the OS for application use. However, you will still gain some modest improvement in performance by changing these settings.
From the Windows 95 Resource Kit:
The 32-bit VFAT works with a 32-bit, protected-mode cache driver (VCACHE). This driver replaces the 16-bit, real-mode SMARTDrive disk cache software provided with MS-DOS and Windows 3.1. The VCACHE driver features better caching algorithms than SMARTDrive, to cache information read from or written to a disk drive. The VCACHE driver also manages the cache pool for the Universal Disk Format File System (UDF) and the 32-bit network redirectors provided with Windows 95.
Another big improvement in VCACHE over SMARTDrive is that the memory pool used for the cache is dynamic and is based on the amount of available free system memory. Users no longer need to allocate a block of memory as a disk cache. The system automatically allocates or deallocates memory used for the cache, based on system use.
For example, as you perform a large number of activities on the network, Windows 95 increases the size of the cache. As network activity decreases and more applications are started, Windows 95 decreases the cache size.
Now in plain text:
We're dealing with three components here, system memory (ram), virtual memory (swap file), and the hard drive. It comes down to ram vs. hard drive, and we all know which is faster... ram is.
The vcache is used to keep already read files in memory after they're no longer in use. Then if a file is needed again it can be read from the vcache (ram) rather than from the hard drive.
Here's a simple way to show it to you. Reboot your 'puter, close any running programs. Now think of a program you have that takes a while to start and seems to hit the hard drive a lot, like Word, Outlook, Photoshop, etc... Now open the largest program you thought of. Pay attention to how long it takes to open and for the hard drive to settle down. When you're sure it's done loading, close it. Now wait a few seconds then re-open it. Again pay attention to how long it takes to open and for the hard drive to settle down. I'll bet you that it was quite a bit faster the second time, with a lot less hard disk use.
The main reason was that a lot of the files needed to start the program was still in the vcache. Since they could load from the vcache instead of from the hard drive it was faster. There are other factors as well, like DLL's still in memory and so on. But you get the picture.
The default setting is to let Win95 handle it. According to Microsoft it will use most of the available memory, but will give memory back to run other programs as needed. The problem is that in reality, the vcache is very slow in returning memory for use by other programs! So what happens is that your 'puter runs short of free memory and starts using the swap file. I've seen this happen on my main 'puter at home which has 256 megs of ram! In one case, when I had a lot of programs running, I had 700K of free memory, 47 megs of swap file in use, and the vcache was using over 100 megs of ram!
Remember, any time you start using the swap file you get about a 15% performance hit! The answer then is to limit how large the vcache can grow. By limiting the maximum size of the vcache you decrease the chances of hitting the swap file. Note: For info on optimizing the swap file click here.
The only risk in manually setting the minimum and maximum size of the vcache is possibly slowing down how fast a program loads, or a file is read when it's been read or loaded earlier. There are no other issues that I know of.
What it comes down to is how do you use your 'puter? Do you play games? Do you open and close the same programs or files over and over? Where is performance more important to you?
There has been a lot of discussion about what to set the minimum and maximum values to. I've decided that there are two different settings... One for overall better performance, and one for gamers. I'll give you both and you can decide which is best for you. These setting assume that you have at least 16 megs of ram. If you have less than 16 megs of ram stop here.
If your 'puter is mainly used to play games and you could care less how fast a program loads, this is for you. The goal here is to have as much free memory as possible for the game. Most games tend to use as much memory as they can get. And if they can't get enough, that means hitting the swap file.
If you have from 16-32 megs of ram:
MinFileCache=2048
MaxFileCache=2048
If you have from 32-96 megs of ram:
MinFileCache=4096
MaxFileCache=4096
If you have 128 megs of ram or more:
MinFileCache=8192
MaxFileCache=8192
If you just want your 'puter to be faster and games aren't critical too you, this is for you. I always set the MinFileCache to 2048. The MaxFileCache is set to .25 times system memory. So if you have 32 megs of ram it would be 8 megs or 8192. The settings are in kilobytes. The math would be: 32 times .25 times 1024. 32 X .25 = 8 X 1024 = 8192 I never set the MaxFileCache over 32768 which is 32 megs of ram. I believe that any more is a waste.
If you have 16 megs of ram:
MinFileCache=2048
MaxFileCache=4096
If you have 32 megs of ram:
MinFileCache=2048
MaxFileCache=8192
If you have 64 megs of ram:
MinFileCache=2048
MaxFileCache=16384
If you have 128 megs of ram or more:
MinFileCache=2048
MaxFileCache=32768
NOTE: In WinME Sysedit is gone (thanks MS). Instead just open the System.ini (it's in the windows folder) file in Notepad, make the change then save the file. Or go to start | run and type c:\windows\system.ini notepad and click ok, or click this c:\windows\system.ini to open it for you. It may ask you what to open it with, if so choose Notepad.
Go to start | run | type sysedit | click ok, then you'll see this window...
Now double-click on the title bar of window titled C:\WINDOWS\SYSTEM.INI ...
So it looks like this. Then scroll down till you can see the section called [vcache].
Now edit the file to add the settings you've decided on. It's just like editing in notepad. You want it to end up looking like above, except with your values. When you're done, click on the top X in the upper right hand corner of the window to close the file. Then you'll see this...
If you're sure you did it right click yes. If you click no, the window will close without saving your changes. If you click cancel, the window will re-open (but won't be saved yet).
Now reboot the 'puter and the new settings will take affect. If you want to be a real geek, try changing the values a few times and see what you like best.
[ Home ] [ Site Map ] [ Site Search ] [ Back to last page ]
|
|
|
You can now sponsor PuterGeek.Com through PayPal in increments of $10 or more!
For other available options go to the FAN page.
|
Entire Website ( All Content )
|
Comments or questions about this website?
|