home *** CD-ROM | disk | FTP | other *** search
- DOS 2.0 Buffers
-
- Don Watkins
- Marin/Sonoma IBM PC Users Group
-
- A feature that I initially overlooked
- in DOS 2.0, but now find extremely
- helpful is the BUFFERS facility in
- the CONFIG.SYS file.
-
- When DOS is initialized, it sets up
- two memory buffers which are used to
- store disk data. These are used for
- both reading and writing when the
- amount of data is not an exact
- multiple of a sector. For example,
- when a file is read, DOS reads
- the entire sector into one of
- its buffers, locates the correct
- record in the buffer and then moves
- the selected record into the
- application's area of memory. The
- buffer area is marked as being
- recently used. On the next request
- for a record, DOS looks in the buffer
- area before accessing the disk to see
- if that record is contained in the
- buffer. If it is, the record is
- transferred to the application and no
- disk access takes place. Thus, DOS
- acts as its own mini-RAM drive.
-
- This buffering method becomes more
- effective as the number of buffers
- increases. As more buffers are
- available, the more the likelihood
- that the record will be in one of the
- buffers - up to a point. If DOS has
- to look in a hundred buffers for a
- record, system performance drops
- significantly. I've found that for my
- use, 16 buffers works best. (I have a
- lot of memory on my system and do a
- lot of *.* copying.)
-
- You will also notice improved
- performance in the use of the COPY
- command. After increasing my buffers
- to 16, I've found that a COPY *.* can
- be executed just as fast as a
- DISKCOPY.
-
- The number of buffers you use will
- depend on the amount of memory
- available on your machine since each
- additional buffer increases the
- resident size of DOS by 528 bytes.
- Don't be afraid to experiment with
- the number of buffers as it can
- always be changed.
-
- To change the default buffer setting
- add BUFFERS=NN, where NN is the
- buffer number to your CONFIG.SYS
- file. Remember that the CONFIG file
- changes take effect only on IPL.
-
- If you don't have a CONFIG.SYS file,
- create one by:
-
- 1. Entering COPY CON: CONFIG.SYS{CR}
- -- Copy from the keyboard
- (CONsole) a file named
- Config.sys.
-
- 2. Entering BUFFERSnn{CR} --
- Where nn is the number of buffers
- you wish to use.
-
- 3. Pressing CTRL Z{CR} -- Place an
- end-of-file mark on the file.
-
- The number of buffers will be changed
- to your new setting the next time you
- IPL. If you want to change the number
- of buffers, use any word processor or
- text editor.