Windows (95 and 98) is hobbled by two major flaws in the way the operating system handles file and data caching. The flaws are easy to fix. This article tells you how to do it. Before we go any further, please understand that I will not be responsible for any problems you might have with your PC. This is a simple change, and you're not likely to have any difficulty, but please pay attention to the instructions. When you voluntarily change the way your PC works, you have to be careful, no matter how big or small the change is.
Flaw No. 1: The vicious Vcache.
Vcache is the system Windows uses to store recently used data. It's a disk cache with
fancy features added. It works very well for the first few minutes. It works very badly
after that.
The reason? By default, Vcache grows as large as possible. If your
PC has 64 megabytes of RAM, Vcache will quickly balloon and take up 30 to 40 megabytes of
RAM. (The rest of the memory probably will be claimed by system functions, your browser
and so on.)
By itself, that's not bad. A big disk cache is wonderful, and one that uses otherwise
unclaimed memory is even better. But that's where the problem comes in. If you use any
memory or system-reporting utility to examine free memory in Windows 95 or 98, you'll
notice that it's nearly always just a few kilobytes. That means nearly all available
memory is used either by programs (including Windows itself) or by the disk-and-file
cache.
And that means any other programs can't possibly run -- they can't get any RAM -- until
Vcache frees up enough memory for the programs you're trying to launch. You'd think that
Microsoft would have designed Vcache to quickly unload all the RAM needed by new programs,
but it didn't. Vcache groans and argues a bit, frees up a little memory, goes to sleep,
wakes up and frees up some more, nods off again, and then ... well, you get the point.
(All of this somnolence is readily visible if you monitor both free memory and the cache
size.)
At this point, you can't make Vcache release memory faster. (Anyone who comes up with such
a real fix will win the hearts and minds of millions of Windows fans, I'm sure.) But you
can make Vcache stop hogging all available RAM by limiting it to both a minimum and
maximum size. In other words, you make Vcache stay the same size all the time.
To fix Vcache, you need to add a few lines for the Windows Vcache settings to a file
called SYSTEM.INI. Click the Start button and then click Run. Type
"sysedit" and press Enter. Choose SYSTEM.INI from the windows that appear. Look
for the word "vcache" (all lower case) surrounded by square brackets, like this:
[vcache]. If you don't see it -- chances are you won't, unless you or someone else has
already tweaked your PC -- you need to add it. (If you do see it, but nothing is listed in
the [vcache] section, leave it there and add the lines described next.)
You need to put a [vcache] section into SYSTEM.INI. You can put it anywhere (at the end of
the file, or, as is common practice, right after the end of the [386enh] section). Hit
Enter to create a blank line, then type [vcache] on a line by itself. The next two
lines tell Windows how much memory, in bytes, to set aside for Vcache. I can't give you
numbers that work for every PC because the amount depends on how much RAM the PC has.
'MinFileCache' and 'MaxFileCache' should be the same ( about 25% of
your RAM ) to avoid the tedious (and system slowing) resizing. 'ChunkSize' should
generally be '512', but you can omit that one. You should set MinFileCache and
MaxFileCache to about 25% of your total RAM for best performance, i.e 8190 for 32Mb RAM,
16384 for 64Mb, 32768 for 128Mb... These are sample settings from one of
our PCs ( 256Mb RAM, Windows 98 )
[vcache]
MinFileCache=65536
MaxFileCache=65536
ChunkSize=512
Notes: Generally, the more RAM you have, the bigger vcache can be. Remember that
the RAM used by vcache can't be used by applications. Also, Windows 98/98SE has better
memory management than 95, so you might not notice much improvement using that tweak
Type them exactly as shown, substituting your own numbers if necessary. The save the
SYSTEM.INI file and reboot.
Flaw No. 2: The swamp file. Er, swap file or virtual memory.
What happens when your PC runs out of RAM (or, as you can imagine,
when Vcache hogs the RAM your PC desperately needs for programs)? Windows pretends real
RAM exists in what it calls a swap file. (Technically, Windows is using a function of the
processor chip along with some very clever code in the operating system.) Program sections
that aren't doing anything are shunted off to the disk file, and the new program gets the
real RAM.
A swap file is better than a computer that stops running properly when it runs out of RAM.
But swap files are very slow. They're even slower if Windows has to make the swap file
larger or smaller, based on what the Vcache is doing and what programs are trying to run.
And -- you guessed it -- that's just what happens by default in Windows 95 and 98. The
swap file is tiny to start with, then grows as needed. This slows everything down.
Microsoft did it this way because hard drives were expensive when Windows 95 was under
development. They're very cheap now. A big swap file -- one that stays the same size all
the time -- is practically essential if you want to get the most out of Windows.
So here's how to make the swap file stay the same size.
Note: It might be a good idea to defragment your Hard Disk before editing the swap
file settings, so the swap file itself won't be fragmented.
Go to Control Panel > System > Performance > Virtual Memory and choose "Let me specify my own virtual memory settings". Specify the same amount of space for minimum and maximum swap file size. Make the swap file twice the amount of RAM you have on your system (or at least the same size as your RAM). For 256 Mb memory, the swap file should be 512Mb. Reboot your computer. Note: If you have more than one Hard Disk, use the fastest/newest one for your swap file location.
A variation on these instructions could be helpful if you have a second (or third) hard drive that is faster than your primary drive (the C: drive). When you are changing the size of the swap file, change its location to the fastest drive on your system. Some users even create a small partition at the outside of one of their drives and place nothing there except the swap file. You could make a 128-megabyte partition and use it that way. I've tried it, and it works very well.
Computer Role
If your system has 16MB RAM or more, you can gain a bit more speed by changing your computer's role from Desktop Computer to Network Server.
With the Desktop Computer Setting, VFAT allocates memory for the 32 most recently accessed folders and the 677 most recently accessed files, consuming approximately 10K of memory. When you use the Network Server setting, VFAT allocates memory to record the 64 most recently accessed folders and the 2729 most recently accessed files, consuming approximately 40K of memory. The additional 30K RAM is well worth it.
To change the setting, right-click on the 'My Computer' Icon. Click 'Properties' then 'Performance' and choose the 'File System' tab.