Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Relation of BUFFERS and FILES ? (Miscellaneous)

posted by bretjohn(R) Homepage E-mail, Rio Rancho, NM, 30.03.2018, 18:17

> Hi, I wonder what is the optimum number of BUFFERS and FILES for a given
> DOS application? FILES seems to make sense, the largest number of files
> that will be open at once. But what about BUFFERS ? Should this be the
> same number? Larger? Smaller ? From what I can gather a Buffer is 512
> bytes corresponding to a sector.
> Thanks for any insight or a pointer to a web site describing how they work.

There really isn't an "optimum" value for either of these that's universal -- it depends on your hardware and applications. At least on my newer systems, I use FILES=80 and BUFFERS=8 (actually, I use FILESHIGH=80 and BUFFERSHIGH=8 to save conventional memory). I've seen FILES=80 recommended by some programs, so I think it is a reasonable value to use.

You're correct that BUFFERS corresponds to a sector on a disk (normally, though not always, 512 bytes). The BUFFERS are used as a small cache by DOS. This, at least in theory, keeps DOS from needing to access the same data from the disk over and over again -- it keeps the last few sectors of data in memory. On the two systems I use most nowadays, one has a Solid State Disk (SSD) and the other doessn't. On the one with the SSD I don't use a cache at all (but still have BUFFERS=8) since the disk is so fast that a cache really doesn't buy me much. On the system with a spinning hard drive, I have a caching program installed which helps disk reads perform much faster (but doesn't help with writes). I also have BUFFERS=8 on that system.

At least in theory, if you're using caches and/or SSD's, the BUFFERS really don't do much for speed and could probably be eliminated altogether. At least in MS-DOS you can't completely eliminate the BUFFERS (the minimum value you can set is 1). If you're not using an SSD or a cache, more BUFFERS is probably better. MS-DOS 7 uses a default value of 15 but you can specify up to 99. MS-DOS also has a secondary cache (you can set BUFFERS=m,n) and the default value for the secondary cache (the n value) is 0 but can be as high as 8.

As with most things in life, there's a trade-off. FILES and BUFFERS use memory, so the higher you set them the less memory there is for other programs to use.


Complete thread:

Back to the forum
Board view  Mix view
15818 Postings in 1454 Threads, 263 registered users, 16 users online (0 registered, 16 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum