TweakHomePC

Dual-booting all versions of Windows and Linux

   Dual-Boot    |    Win 8    |    Win 7    |    Vista    |    Win XP/2K/NT    |    Win9x/Me    |    How to    |    Legacy 9x Tweaks    |    SiteMap   


 

Here: Home > Legacy 9x Tweaks > Memory Tweaks >


VCACHE SETTINGS WIN9x/Me

Last reviewed: August 2002

VCache is great - in principle, and often in practice

However, limiting VCache's size sometimes improves speed & stability.

Large RAM systems: VCache must be limited
Low RAM systems: VCache should be limited
Win98/Me gamers: VCache can be limited for improved speed
Win98/Me Windows users: VCache can be left unaltered
Win95 all users: VCache settings should be limited
 


Read VCache Settings & Win98, SE, Me
Read VCache Settings & Win95

QUICK FIX FOR VCACHE       All users

Tune VCache settings with the Cacheman utility
Windows often prevents you from using much of your main memory (RAM) for other programs, including games. This restriction can be alleviated by changes to the disk cache called VCache in Windows/system.ini. The speed boost can be quite dramatic.

98 Windows 98, SE, & Me
Games use: Use Cacheman utility and select the CD Writer option.
Windows use: Leave it alone (dynamic), but read VCache Settings & Win98 for exceptions.

95 Windows 95
All Users: Use the Cacheman utility and select the appropriate option.

Cacheman: Download this small FREE cache-specific utility to make the changes required.
Just click on Optimize Disk Cache Size, and select the option which best suits your usage. Or you can change the 2 slide bars or the edit fields to manually set the disk cache size. Use the Cd writer option if you only use games. Then click on File and select Save & Exit.
This utility also offers a Remove Cache Optimization option should you be unhappy with any alteration made. Cacheman also shows the current amount of free physical memory.
• A reboot is necessary after an alteration is made. Optimal settings are often user specific.

Read the VCache Settings & Win98 page (all gamers, and all users with 128MB+ RAM, )
Read the VCache Settings & Win95 page (irrespective of your type of usage).
get it here Cacheman (freeware; v 2.0; 135KB)       Cacheman Home Site

[top of page]

VCACHE 1

VCache is an area in main memory. It caches data from the Hard Disk.

More than 512MB RAM: you must change the default VCache setting (read below)
128-512MB of RAM: you will possibly gain by changing this cache.
128MB of RAM: you will possibly gain by changing this cache for games use (but read below).
64MB of RAM: you will probably gain by changing this cache for games/Windows use.
Less than 64MB: you must change the default irrespective of your type of computer use.
All Win95 users: you must change the default irrespective of your type of computer use.

Please Note: The terms 'memory', 'main memory', and 'RAM' all refer to the physically installed system memory. They DO NOT refer to 'free', 'Virtual', or 'Total' memory.

No matter how much system memory (RAM) you have, it is of little use for additional programs if Windows claims most of it for its own use! Making an adjustment to the default VCache settings in System.ini ensures more usable memory is available for your own programs/games.

Windows has its own virtual cache, VCache, in RAM for the most recently requested data from the Hard Disk. These can then be easily and rapidly copied/moved into RAM's executable area when required. Associated data is also saved in VCache in case it will be needed.

[Reading, for example 32KB, from the HD takes very little longer than reading 16K. So VCache reads more data than Windows asks for. If/when Windows asks for the next piece, VCache can provide that data from RAM (fast) instead of from the HD (slow). Also, the same data is likely to be required again, so VCache retains the most recent data for as long as possible]


VCACHE 2

Those items in VCache are available at RAM access speed - dramatically faster than retrieval from the Hard Disk, and greater speed results. VCache expands and contracts dynamically according to need. Programs can not run there, but see below, and read Aligned Programs.

This part of main memory has two jointly-shared areas:
(1) executable area (VMM) from where your program(s) can be run, and data is held
(2) cache area (VCache) where recently called/used Hard Disk items are stored as they are needed now or soon, and can be retrieved quickly from VCache rather than from the slow HD. The larger one area is, then the smaller the other must be to compensate - the overall size is fixed.

When Windows 9x starts, VCache uses most of the unused RAM for its own use. This is good as that RAM can be usefully used by Windows to smooth your computer experience - basically, its giving you more speed. Not using it would be wasteful! VCache will/should shrink on need.

The overall principle of VCache is excellent. But, when you require a larger executable area, Windows has two options: (a) shrinking VCache - it can be reluctant to do so!, or (b) paging data out to the slow swapfile. And any use of the Hard Disk swapfile degrades performance.

VCache works quite well in Win98 and seems better in SE & Me. Only gamers and low RAM systems can expect any worthwhile improvement by tweaking Win98's/Me's VCache, but read VCache Settings & Win98 page (especially gamers, and users with <64MB or 128MB+ RAM)

VCache works poorly in Win95. It can/does degrade performance by forcing paging to engage far too early. It NEEDS tweaking. ALL Win95 users read VCache Settings & Win95


WHAT THE VCACHE SETTINGS MEAN (1)

MaxFileCache
This sets the maximum size the disk cache (VCache) can expand to. When it starts, Windows will soon claim most of available RAM for its own use. This is good for Windows/Win Apps use (your RAM is being used, not wasted!). When not set by the user (dynamic setting), Windows will decrease/increase its level according to the needs of program(s) being run in the executable area.

Changing the default (dynamic) forces Windows to use only a maximum of xMB Ram for its own uses. Its usually set to about one eight (1/8) of total physical RAM. The higher you set it, then the less will be available to your own software/games. Obviously, the more RAM you have, then the more generous you can be with the size of MaxFileCache except, perhaps, for games-only users!

Limiting the no-upper-limit default for MaxFileCache is the critical setting

MinFileCache
This setting determines the initial size of the disk cache (VCache, in RAM) for your system. In the default setting, Windows decides on how much is needed to optimize its own performance, both now and in the near future. You can expect Windows to be a bit greedy and to retain much data (like DLLs) not required for basic operations - that should be good for Windows/Application usage (it is!), but not too good for games.

In practical terms, MinFileCache affects how quickly a program will open and, especially, how quickly it will reload. Curtailing its size forces Windows to concentrate on retaining only more essential/recent data in VCache. Its optimum size is usage/system dependent. It should be adjusted in Win95, and can normally be left unaltered in Win98/Se/Me except for gamers.


WHAT THE VCACHE SETTINGS MEAN (2)       All users

Setting the same value for MinFileCache as MaxFileCache has:
1. the advantage of disabling any time-consuming resizing of MinFileCache
2. the disadvantage of not allowing VCache to shrink below that level in times of great RAM need (it can't shrink to release some memory to the executable area - slow paging would occur!).
Not setting a MinFileCache:
This allows Windows to dynamically shrink MinFileCache 'according to need' (mostly its own, perhaps!). With todays large-RAM systems, its tempting to try not using a MinFileCache at all! Try with/without for your favourite large games/software and use what works best for you.

ChunkSize
ChunkSize also directly affects performance. VCache is a single block of memory that is divided into chunks. Smaller chunks are more efficient, but larger ones are faster. Generally, the best settings for ChunkSize are 512KB, 1024, and 2048KB. Try them, observing your game or application performance, and choose whichever one works best for you. Use 2048KB (with large RAM) if you don't notice a difference. Change the value in multiplies of 256.

NameCache and DirectoryCache
NameCache limits the amount of files, and DirectoryCache limits the amount of directories, Windows can track. These caches determine how much file information is stored within RAM at any given time. It's best to use the highest values allowed by Windows for Windows/Applications use. If this causes problems, you can set them back to the standard settings: 4,096KB for the NameCache, and 96KB for the DirectoryCache (half those numbers for Windows 95).

Remember, RAM used by VCache can not be used by applications/games (unless 'Aligned').


ALIGNED PROGRAMS & VCACHE         Intermediate users

98 Aligned programs open up 20% faster (Win98/SE/Me)

Linked, indirectly, with VCache are Aligned programs (read the Aligned Programs page).

The executable area of memory requires data to be in specific 4KB chunk sizes called Pages. However, applications/software are not stored (on the Hard Disk) in these chunk sizes.

Normally, Windows' MapCache has to spend some time making the data 'fit' into memory's 4KB Pages before it can be used. Also, this often results in having two copies of the same data in memory - one in the cache area, another in the executable area. Now! All that sounds very messy!

All programmers have been advised to create program code aligned in 4KB blocks - hence the name Aligned programs. This data, on transfer from the Hard Disk, will now automatically fit neatly into the 4KB memory structure and no delay will be incurred. That sounds very tidy indeed, especially when combined with FAT32 (4KB Clusters on the Hard Disk itself - think about it!).

It works well. Large aligned programs do open up some 20% faster.

A further refinement is that aligned programs could now be run directly from VCache itself, alleviating the need to transfer the data from VCache to the 'executable area' in RAM. VCache will act as both disk cache AND program execution (but only for programs that are 'aligned' ).

Yet further good news is that your current non-aligned programs can be aligned with Microsoft's WinAlign (x$) or WinMag's WMAlign (freeware). Read the Aligned Programs page for details.


VCACHE WITH WIN95

95 VCache needs to be limited in 95

In Windows 95 VCache simply does not function correctly and it is definitely necessary to limit the maxfilecache and the minfilecache i.e. the maximum and minimum amounts of RAM that VCache is allowed to use.

VCache expands to use up most of available RAM when Windows 95 is started.
When another program is launched, Win95's VCache is very slow to shrink in size. It refuses to release sufficient RAM to the executable area and forces the program to use the slooow swapfile (Virtual Memory) for the rest of its memory requirements.

Ironically, Win95's VCache is attempting to improve performance with a large memory cache (great!) and, at the same time, forcing programs to use the slooow Virtual Memory (terrible!). Also, Win95 (often Win98+) can have the same data in RAM twice; storage area and executable area!

All users of Windows 95 will benefit by setting a limit on the size of VCache.
There has been much discussion on the best settings for Win95. In truth, the absolutely optimal settings are system dependent and are likely to require a little experimentation by each user.
Gamers will benefit by using settings quite different from mainly Windows/Application users.

Comprehensive Win95 settings are on the VCache Settings & Win95 page.

In general, MaxFileCache should be about 1/8 of total physical memory. MinFileCache can be set to about 1/2 of MaxFileCache, or to the same as MaxFileCache.


VCACHE WITH WIN98/SE/Me

98 VCache can be limited for games under Win98, SE, Me

It is now accepted that Windows 98, SE, & Me are substantially improved over Windows 95 when it comes to the management of VCache. The default dynamic setting functions correctly (mostly).

The VCache resizing process has improved dramatically, and, its claimed, VCache will reduce in size almost instantly should more RAM be required by a program running in the executable area. This brings the VCache function to what it was intended to be originally!

There now appears to be little/no justification for mainly Windows/Win App users in making any VCache changes. These users can retain the dynamic VCache settings (default). This is especially true when there is ample RAM for that system and its usage (>64MB RAM).

There is still some speed gain to be achieved for gamers, and for low-memory systems.

THPC uses a Dual-boot or Multi-booting system (four versions of Win9x on the same PC) and has noticed the differences in performance between various VCache settings and different Win9x versions. The most dramatic speed gains occur, not surprisingly, in games and in low RAM situations and, of course, in Windows 95. Improvement in games under Win98/SE/Me appears to be quite variable and will probably be game/system dependent.

Comprehensive Win98 settings are on the Win98 & Me VCache Settings page.

In certain cases, programs can now be run from VCache - 'Aligned' programs (see above).


ALTERING VCACHE         All users

Use common sense when tweaking

Using Cacheman is simplicity itself, and creating your own settings for VCache is a simple procedure. Also, any change(s) you, or the utility, make can be unmade with easy.

The [VCache] setting will be in System.ini which can be found in your Windows directory. It does not have the Hidden (H), System (S), or Read-only (R) attributes set, so you have easy access to it from Explorer or even DOS. Whether you use a utility, or make manual changes, please keep these thoughts in mind:

1. Backup System.ini first - always before making a change - that's what experts always do!

2. It is virtual impossible for a correctly entered VCache change to damage your system.

3. Nevertheless, the effects of VCache on your computer can be equal to that of any system file, and more so than some, so be sure you have a backup (in case of that typing error!)

4. Do not try any other type of computer tweak(s) until you are sure you have the best VCache settings for your own system (or you may never know what's beneficial!)

5. Cacheman allows you to undo any change(s) you make.

6. To manually remove any changes, open System.ini in Notepad and [a] place a semi-colon (;) and a space (; ) at the start of the altered lines, or [b] simply delete the line(s).


VCACHE UTILITIES       All users

Tune your VCache with one of these utilities

Cacheman
Certainly the best, free, cache specific, utility is Cacheman. Just click on Optimize Disk Cache Size, and select the option which best suits your PC usage. It provides other VCache options. It also shows the Physical Memory (RAM) free at that time.
get it here Cacheman (freeware; v 2.0; 136KB)       Cacheman Home Site

MemMax
Easy to set MaxFileCache, MinFileCache, and ChunkSize (though you must enter your own numbers). THPC like this one because its primarily use is to free-up some main memory (clearing out unused DLLs etc from main memory) thereby often alleviating the need for a reboot.
get it here MemMax (freeware, 476KB)       MemMax Home Site

SwapMon
Again you alter the cache with the click of a button. Its primary use is to monitor your Swapfile (Virtual Memory), and it makes recommendations for more RAM.
get it here SwapMon (freeware; 44KB,   Swap Monitor without VB5 runtime file)
Get it  SwapMon (freeware; 1,489KB, Swap Monitor with VB5 runtime file)

• A full reboot is necessary after an alteration is made manually, or with a utility.


TUNE VCACHE MANUALLY         Intermediate users

EXAMPLE ONLY - Manually tuning VCache

Manually changing VCache is quite straightforward - just beware of 'typos'!
! Backup the file system.ini first (its in the Windows directory)

• Open System.ini in Notepad
    [Select Start • Run. Type in SYSEDIT (MSCONFIG for Win Me), and click OK.
• Scroll down to the [VCache] section of System.ini
Enter in, or Edit, these lines in the [VCache] section (numbers are in KBs)
Save the file. A reboot is necessary for the changes to take effect.

[VCache]
minfilecache=8192
maxfilecache=16384
chunksize=512
namecache=4096
directorycache=96

Initially, you can concentrate on the MaxFileCache (and MinFileCache), leaving the other settings for fine-tuning later. Also, when tweaking VCache, you should not try other types of computer tweaks until you have established your best settings for VCache! Focus on one major tweak at a time.

Note: Do not enter KB (for KiloBytes) after the numbers (and remember 1MB = 1024).


VCACHE & SPECIAL CASES       All users

occasions when you really SHOULD or MUST limit VCache use

This applies to all users, both mainly Windows users and mainly games users.
There are six circumstances under which you really must/should limit the MaxFileCache:

1 Games: Its reported that tests have shown a maxfilecache of 1/4 to 1/8 of RAM, even with 128MB (+), is better for many games (and therefore may be much better for some!).

2 Windows 95: Explained earlier on this page.

3 Large RAM: If you have 512MB, or more, RAM installed (you must limit VCache to 512MB).

4 128+ RAM: If you have 128MB, or more, RAM installed (SHOULD limit VCache to 70% RAM).

5 Many files: You may have very many files (many thousands) in your subdirectory structure

6 Huge files: You sometimes use some really gigantic files (about equal to your RAM size)

In 3, 4, 5 and 6 above, you can select a maxfilecache of about 70% of your total installed physical RAM - this will prevent the possibility of a run-away VCache expansion.

With 128(+) MB RAM installed, you'll gain speed by adding this line to the [386Enh] section of System.ini to prevent ANY use of Virtual Memory WHILE some RAM remains unused.
ConservativeSwapfileUsage=1


VCACHE & 128 - 512 MB RAM       All users

Setting VCache with 128MB to 512MB RAM (main Memory)

First, that matter of Windows 9x not being able 'to cache more than xMB RAM'. Wrong question / answer! The cache referred to is the L2 cache on older Motherboards which stores RAM data for the CPU's use. Having a RAM quantity in excess of L2's ability to cache all that RAM, will increase speed, provided you need all that RAM in the first place. If adding more RAM prevents excessive use of the swapfile, then performance improves - and it will not slow your system - its just that the uncached RAM will not be used as optimally as it could be. If you have an older Intel chipset (430Fx, VX, HX) and suffer from 'Hard Disk trashing', more RAM should help a lot.

For another reason, adding lots of RAM CAN cause a slowing of the system in Windows 9x.

Windows 95/98/SE/Me were intended, as operating systems, to address up to 2 GB of RAM. In practice, Win98+ is 'happiest' at the 128MB to 256MB level. Moving from 256MB to 512MB may cause decreased performance. Beyond 512MB, some problems start to occur, and above 1GB you may be unable to boot into Windows 9x at all.

The main cause seems to be Windows' inability to manage VCache correctly in large RAM system, and likewise, perhaps, for the swapfile on the Hard Disk (Virtual Memory).

The cure, for mainly Windows/Apps users, is to limit VCache's MaxFileCache to about 70%, or 510MB, whichever is smaller. The MinFileCache can be left unaltered (default, dynamic). Also, ensure a permanent Hard Disk swapfile is sufficiently large, or that a dynamic swapfile has sufficient room to expand. Gamers often use 1/8 of physical RAM for the MaxFileCache.


VCACHE & MORE THAN 512 MB RAM       All users

>512 MB of memory causes problems in Windows 9x/Me

Various operational difficulties can occur after installing more than 512 MB of system memory (physical RAM) under Windows 9x or Me. It's even more likely if you also use a AGP graphics card.

On systems with more than 512 MB RAM, VCache may reserve too much leaving none for other applications/hardware (such as AGP graphics adapters). Problems are likely to result.

1. With AGP graphics, try AGP Aperture Size set to default (or 64 MB) in the CMOS setup.
- and / or -
2. To determine if VCache is causing your problems, try reducing the amount of physical RAM that's installed in your computer to 512 MB or less (read > 1GB, next).
If the problem clears, try these VCache settings:
Set MaxFileCache in System.ini to reduce the maximum amount of memory that VCache can use to 512 MB (524,288 KB), or a little less (510MB, or 70% of RAM, whichever is least).
Example:
[VCache]
maxfilecache=522240


Note: For games. you are likely to gain some speed by using 32 MB (maxfilecache=32768)
Note: Read Virtual Memory to set ConservativeSwapfileUsage=1 (limits Virtual Memory)

Further reading (from MS): Out of Memory Error Messages . . ., and Error Message: Insufficient Memory . . ., and 32-Bit File Access Maximum Cache Size


VCACHE & MORE THAN 1GB RAM       All users

Windows 9x may not even start with more than 1GB of RAM!

This applies to Win95/98/SE/Me. Windows may not start if your computer has 1 gigabyte (GB) or more, of RAM memory installed. Also you may receive the following error message when you try to start your computer:
Insufficient memory to initialize Windows

The main cause seems to be Windows' inability to manage VCache correctly with large RAM.

The cure, according to Microsoft, is to artificially limit the quantity of accessed RAM to 768MB. Read Error Message: Insufficient Memory to Initialize Windows at the Microsoft site.

1. Quit one or more memory-resident programs or remove unnecessary utilities from your CONFIG.SYS and AUTOEXEC.BAT files, and restart your computer.
2. If the problem occurs during Windows Setup or its first run, add the following line in the [386Enh] section of System.ini (limits the physical RAM that Windows can access to 768MB)
MaxPhysPage=30000

This restriction may be too strict. You could try a value just below 1 GB, thereby making most of your RAM available - be prepared for a little experimentation.

Remember THPC's recommendation that you set MaxFileCache in System.ini (VCache section) to 510MB (maxfilecache=522240). The MinFileCache can be left alone (unless gaming).


VCACHE & CD R/W       All users

Potential problem with some Read/Write CD Drives

There have been some suggestions that changing the default VCache settings may cause problems with the operation of certain CD recorders.

Should you encounter this type of problem:

1 First remove your setting for minfilecache in System.ini - let Windows handle it.

2 If the problem is still present, now try increasing your maxfilecache setting.

3 If the problem still persists, remove all your VCache settings using the utility, or manually in the [VCache] section in System.ini, and let Windows handle VCache dynamically (the Windows default). Leave it at the default if the problem disappears!

If you encounter this type of problem, and successfully resolve it, please let us all know!
 



Read VCache Settings & Win98, SE, Me
Read VCache Settings & Win95
 


CONVERSIONS

MegaByte to KiloByte conversions

     MB (=KB)
      2 (2048)         3 (3072)
      4 (4096)         6 (6144)
      8 (8192)        10 (10240)       12 (12288)
     16 (16384)       20 (20480)       24 (16384)

     32 (32768)       48 (49152)
     64 (65536)       96 (98304)

    128 (131072)     160 (163840)     192 (196608)
    256 (262144)     320 (327680)     384 (393216)       448 (458752)
    512 (524288)     640 (655360)     768 (786432)       896 (917504)

   1024 (1048576)   1280 (1310720)   1536 (1572864)     1792 (1835008)

   2048 (2097152)

[top of page]

Please remember that you alone are responsible for the consequences of any changes you make to your computer hardware or software.

Copyright © LarryM 1998-2013 thpc@mail.com