MS-DOS 6.22 BUFFERS: Disk and Memory Performance

The BUFFERS directive in the MS-DOS 6.22 CONFIG.SYS file controls the amount of memory allocated for disk caching, directly influencing both system throughput and available RAM. By determining how many 512-byte disk sectors DOS can hold in memory simultaneously, this setting balances the speed of repetitive disk read and write operations against the consumption of precious conventional memory or the High Memory Area (HMA).

How the BUFFERS Directive Works

When an application requests data from a disk, MS-DOS checks its internal buffers before executing a physical read operation on the drive. If the requested sector is already in a buffer, DOS completes the read instantly in RAM, avoiding mechanical drive latency.

The standard syntax is:

BUFFERS=n[,m]
  • n (Primary Buffers): Specifies the number of primary disk buffers, ranging from 1 to 99. Each buffer holds one 512-byte sector plus a 16-to-20-byte management header (approximately 532 bytes total).
  • m (Secondary Look-Ahead Buffers): Specifies secondary look-ahead buffers (ranging from 1 to 8) to read ahead sequential sectors.

Impact on Disk Performance

Increasing the primary buffer count improves performance for programs that frequently access files randomly, such as databases, compilers, and accounting software. Sequential access also benefits, as DOS can retain portions of directory tables and the File Allocation Table (FAT) in memory.

However, setting the buffer count too high leads to diminishing returns. MS-DOS searches buffers sequentially using CPU cycles. If too many buffers are defined, the processor spends more time searching through RAM buffers than it would take to read directly from a modern hard drive controller.

Impact on Memory Allocation

Because each buffer consumes roughly 532 bytes of RAM, allocating a large number of buffers directly reduces available system memory:

  • Conventional Memory: By default, all buffers reside in the lower 640 KB of RAM. A setting of BUFFERS=50 consumes over 26 KB of conventional memory, which can prevent memory-intensive DOS games and large applications from running.
  • High Memory Area (HMA): If CONFIG.SYS contains DOS=HIGH and an XMS driver like HIMEM.SYS is loaded, MS-DOS places its buffers into the HMA alongside the DOS kernel. Because the HMA has limited space (approx. 64 KB), setting BUFFERS too high (typically above 30 to 40, depending on the kernel footprint) forces DOS to spill all remaining buffers back down into conventional memory.

Interaction with SMARTDrive

In MS-DOS 6.22, the role of BUFFERS changes significantly if the disk caching utility SMARTDRV.EXE is loaded via AUTOEXEC.BAT.

SMARTDrive is a dynamic, protected-mode cache that uses extended memory (XMS) rather than conventional memory or the HMA. Because SMARTDrive manages track-level caching far more efficiently than the basic DOS sector cache, maintaining a high BUFFERS count alongside SMARTDrive is redundant and wastes RAM.

  • Using SMARTDrive (Standard MS-DOS 6.22 Setup): Set BUFFERS=10 to BUFFERS=15. This provides enough basic buffering for initial boot tasks while leaving the primary caching workload to SMARTDrive and conserving maximum memory.
  • Without SMARTDrive (Low-Memory Systems): Set BUFFERS=20 to BUFFERS=30. This range provides an optimal trade-off between disk read performance and memory conservation for systems relying solely on native DOS file management.