How FASTOPEN Speeds Up File Access in MS-DOS 6.22

This article explains how the FASTOPEN command-line utility improves disk performance in MS-DOS 6.22 by reducing disk head movement and directory traversal times. By maintaining a memory-resident cache of recently accessed directory paths and file cluster locations, FASTOPEN bypasses the standard file allocation table (FAT) lookup process. Below, you will learn the mechanics behind this MS-DOS utility, how it handles directory structures, and its specific operational impact on FAT16 file systems.

The Standard MS-DOS File Lookup Bottleneck

In MS-DOS 6.22, disks are formatted using the FAT16 file system. Under standard operations, every time a program requests access to a file, the operating system must locate it by traversing the directory tree starting from the root directory.

For files nested deeply within subdirectories (such as C:\APPS\DATABASE\DATA\RECORD.DAT), MS-DOS must:

  1. Read the root directory to find the cluster of the APPS directory.
  2. Move the mechanical disk heads to read the APPS directory to locate DATABASE.
  3. Read the DATABASE directory to find DATA.
  4. Read the DATA directory to locate RECORD.DAT and identify its starting cluster.
  5. Access the File Allocation Table to trace the cluster chain.

On mechanical hard drives, this traversal creates significant physical read-head movement (seek latency) and multiple read operations simply to locate the file before any actual data is read.

How FASTOPEN Accelerates the Process

FASTOPEN is a terminate-and-stay-resident (TSR) program designed to eliminate repetitive directory searches. It reserves a portion of memory (conventional or expanded) to act as a specialized name-and-location cache.

  • Tracking File Locations: When a file or directory is first opened, FASTOPEN records the file's name and its exact physical location—specifically, its starting cluster on the disk.
  • Direct Memory Lookups: When an application requests that same file or directory again, MS-DOS consults the FASTOPEN cache in RAM before initiating a disk search.
  • Bypassing Directory Traversal: If the entry exists in the cache, MS-DOS skips the step-by-step traversal of the directory structure entirely. The drive heads move directly to the file's starting cluster rather than scanning intermediate directory sectors.

Syntax and Cache Allocation

FASTOPEN is typically loaded via CONFIG.SYS or executed through AUTOEXEC.BAT. It allows users to define the number of files and continuous extents to track for specific drives:

FASTOPEN C:=(50, 25)

In this configuration:

  • 50 represents the maximum number of file and directory entries FASTOPEN tracks for drive C:.
  • 25 represents the number of continuous file extents (fragmented file segments) FASTOPEN caches.

MS-DOS 6.22 also supports the /X switch, which directs FASTOPEN to place the cache table in expanded memory (LIM EMS) rather than consuming valuable conventional memory below 640 KB.

Scope of Performance Improvement

FASTOPEN specifically reduces file open latency. It does not increase the raw data transfer rate, nor does it cache file contents like SMARTDRV. Its performance benefits are most noticeable in environments where:

  • Programs repeatedly open and close the same data files (such as database applications or compilers).
  • Files are stored several layers deep within a nested directory hierarchy.
  • System files, batch scripts, and overlay files (.OVL) are accessed frequently during normal system use.