Windows 98 VCACHE System Cache Allocation
In Microsoft Windows 98, disk caching was handled by a 32-bit protected-mode driver known as VCACHE, which dynamically allocated system RAM to speed up read and write operations from physical drives. While designed to expand and contract automatically based on application demands, VCACHE’s aggressive allocation routines frequently led to memory starvation and system instability, particularly on machines with larger amounts of physical RAM.
The Role of VCACHE
VCACHE replaced the older 16-bit real-mode disk caching utility, SMARTDrive, which had been used in MS-DOS and Windows 3.x. As a core Virtual Device Driver (VxD), VCACHE operated directly within the 32-bit memory architecture of the operating system. It cached file allocation table (FAT) structures, directories, and file data in unallocated RAM to minimize physical head movement and read latency on mechanical hard drives.
Dynamic Cache Sizing Mechanism
Unlike older caching mechanisms that reserved a fixed block of memory at system boot, VCACHE featured a dynamic sizing engine. Under this model:
- Idle State: When disk activity was low, VCACHE maintained a baseline cache pool.
- Disk-Heavy Workloads: During sequential reads or large file transfers, VCACHE rapidly expanded its cache footprint, claiming unallocated physical pages to hold incoming data.
- Memory Pressure: When a running program requested more memory, the Windows Virtual Memory Manager (VMM) was supposed to notify VCACHE, signaling it to release cached pages back into the general memory pool.
The Allocation Flaw and Swap Thrashing
In practice, VCACHE's dynamic shrinking routine was slow to respond. Because file operations often happened in bursts, VCACHE prioritized caching newly accessed data over preserving free memory. It would expand until it consumed virtually all available physical RAM.
When an application requested memory, the operating system frequently
chose to page running application code out to the hard drive via the
swap file (WIN386.SWP) rather than wait for VCACHE to flush
and release its file cache. This created an ironic bottleneck: the disk
cache, meant to reduce disk access, forced the operating system into
severe disk thrashing to maintain its virtual memory footprint.
The 512 MB RAM Threshold
The architecture of Windows 98 presented an additional architectural limitation when systems exceeded 512 MB of physical RAM. By default, VCACHE was permitted to grow up to the maximum available system address space allocated for file caching. On systems with more than 512 MB of memory:
- The cache could expand to a size where it exhausted available virtual address space mapped for other internal system drivers.
- Users frequently encountered "Out of Memory" errors during boot or when opening an MS-DOS prompt, despite having abundant physical RAM.
Manual Mitigation via SYSTEM.INI
To stabilize system performance, administrators and power users
routinely bypassed VCACHE’s dynamic allocation by manually defining
rigid boundaries in the SYSTEM.INI configuration file.
Under the [vcache] header, two parameters were used:
MinFileCache: Defined the minimum cache allocation in kilobytes.MaxFileCache: Hard-capped the maximum memory VCACHE could ever consume.
Setting MaxFileCache to a fixed ceiling—typically
between 128 MB and 256 MB (e.g.,
MaxFileCache=131072)—prevented VCACHE from ballooning,
stopped premature swap file usage, and restored predictable memory
allocation across Windows 98.