Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the board
Thread view  Mix view  Order
cordata

29.03.2018, 23:12
 

Relation of BUFFERS and FILES ? (Miscellaneous)

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.

bretjohn

Homepage E-mail

Rio Rancho, NM,
30.03.2018, 18:17

@ cordata

Relation of BUFFERS and FILES ?

> 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.

Guti

Homepage

31.03.2018, 09:46
(edited by Rugxulo, 01.04.2018, 05:09)

@ bretjohn

Relation of BUFFERS and FILES ?

Also the value of BUFFERS depends if you are already using a diskcache software such as NWCACHE.

---
Visit my personal blog at https://www.javiergutierrezchamorro.com

RayeR

Homepage

CZ,
03.04.2018, 03:11

@ bretjohn

Relation of BUFFERS and FILES ?

In my case I use:
BUFFERS=15
FILES=60
I met one program that needs bigger files to work properly, maybe 120 or so I don't remember. I don't care much about buffers as I use big XHDD cache.

---
DOS gives me freedom to unlimited HW access.

Back to the board
Thread view  Mix view  Order
22049 Postings in 2034 Threads, 396 registered users, 254 users online (0 registered, 254 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum