Jan 092018
 
This file finds out the best number of buffers for your config..
File THRASH.ZIP from The Programmer’s Corner in
Category System Diagnostics
This file finds out the best number of buffers for your config..
File Name File Size Zip Size Zip Type
AUTOEXEC.BAT 250 164 deflated
BUFFERS.RPT 1139 152 deflated
CONFIG.SYS 12 12 stored
JOBQ.BAT 109 95 deflated
THRASHER.DOC 10723 3784 deflated
THRASHER.EXE 42804 28498 deflated
WARMBOOT.COM 16 16 stored

Download File THRASH.ZIP Here

Contents of the THRASHER.DOC file


"THRASHER"

A program to test the optimum BUFFERS number for your CONFIG.SYS

By Monte Ferguson rel 1.0 12/16/86


DOS, starting with version 2.0, uses a special file called CONFIG.SYS when
it boots to set certain parameters and options. One of the options that can
be set is the number of BUFFERS to be allocated.

If you don't know what the BUFFERS command does, I suggest you get out your
DOS manual and look it up. In brief, the BUFFERS command allows DOS to do
some disk cacheing. That is, it will keep the most often used portions of the
disk in memory, and look to memory for what it needs before going out to the
disk. Because memory access is much faster than disk access, this can save a
considerable amount of time. This is a glossed-over description of what's
going on, but it should suffice (go read your Fine DOS Manual, fer cryin out
loud !).

Now, in your CONFIG.SYS file, you can specify just HOW MANY buffers DOS
should use. This is done with the following command:

BUFFERS=x

where "x" is a number between 1 and 99. If you don't use a BUFFERS command,
DOS will default to 2 buffers.

Every buffer you ask DOS to use eats up 528 bytes of your RAM. Now, if
you've got oodles and oodles of RAM, you figure, "What the heck - let's crank
that sucker up to 64 and get these disks really jumping !".

Well, no.

You reach a point of diminishing returns - that is, if you specify TOO MANY
buffers, it will take DOS so long to look through them all, that it would
have been faster just to read the *@#%`%^! thing directly from the disk !

So, how do you find the OPTIMUM number of buffers to use for your system ?
Unfortunately, no one can give you a magic number and say "here - use this".
The number you should use depends on the types of disk you're using, and
probably the phase of the moon. So, it's suggested that you use trial and
error to figure out your number.

Ick. In order to change the number of buffers DOS is using, you've not only
got to change the CONFIG.SYS, but you have to re-boot your computer and run
your tests all over again... time consuming, and not much fun.

Which brings us to THRASHER. These programs will basically do all your trial
and error testing for you, while you get on with doing more important and
exciting things (like trimming your toenails).

Here's the list of files that you SHOULD have in your .ARC file:

AUTOEXEC.BAT - An example AUTOEXEC batch file. You can write your own
if you're so inclined. As it is, you'll probably have
to edit this one anyhow...
JOBQ.BAT - You don't really need this, but it's included for the
sake of completeness. THRASHER.EXE creates this. I'll
describe it's use below.
WARMBOOT.COM - A very tiny program that will cause your computer to
warm boot (as though you had pressed the Ctrl-Alt-Del
key sequece). This was written by Gee M. Wong, and I
thank him (her ?) for it.
THRASHER.DOC - What you're reading now !
THRASHER.EXE - The main program.
CONFIG.SYS - An example CONFIG.SYS file. Again, write yer own, or
edit this one.



How to use THRASHER

1) Format a new floppy disk with the /S option (so it's bootable). See
your DOS manual for details. We'll refer to this as the "Thrasher Disk" from
now on.

2) Copy the following files from your ARC file to the Thrasher Disk:
THRASHER.EXE AUTOEXEC.BAT CONFIG.SYS WARMBOOT.COM

3) Use some sort of ASCII editor (or even *uugh* EDLIN) to change the
THRASHER line in AUTOEXEC.BAT to the parameters you need (see below for
details).

4) Again using your ASCII editor, change the BUFFERS statement in the
CONFIG.SYS file to the number of buffers you want to start testing with
(probably 1).

5) Stick the Thrasher disk in drive A: of your system, and re-boot.

6) Go kill some time while it grinds away.

When the program is done running, it'll be at the DOS prompt. And you'll
have a file on your Thrasher Disk called BUFFERS.RPT. This is a report
telling you just how the different BUFFERS values worked out. You can send
the report to your printer by executing the command

TYPE A:BUFFERS.RPT >LPT1:

or, you can see it on the screen by executing the command

TYPE A:BUFFERS.RPT

By looking at the elapsed times of the different BUFFERS values, you can
find out what the best BUFFERS value for the drive tested is.


EXAMPLE REPORT:
Tested drive A:. With BUFFERS=01, elapsed time is 2009 seconds.
Tested drive A:. With BUFFERS=02, elapsed time is 954 seconds.
Tested drive A:. With BUFFERS=03, elapsed time is 480 seconds.
Tested drive A:. With BUFFERS=04, elapsed time is 334 seconds.
Tested drive A:. With BUFFERS=05, elapsed time is 327 seconds.
Tested drive A:. With BUFFERS=06, elapsed time is 323 seconds.
Tested drive A:. With BUFFERS=07, elapsed time is 320 seconds.
Tested drive A:. With BUFFERS=08, elapsed time is 315 seconds.
Tested drive A:. With BUFFERS=09, elapsed time is 310 seconds.
Tested drive A:. With BUFFERS=10, elapsed time is 339 seconds.
Tested drive A:. With BUFFERS=11, elapsed time is 337 seconds.
Tested drive A:. With BUFFERS=12, elapsed time is 332 seconds.
Tested drive A:. With BUFFERS=13, elapsed time is 328 seconds.
Tested drive A:. With BUFFERS=14, elapsed time is 323 seconds.
Tested drive A:. With BUFFERS=15, elapsed time is 319 seconds.
Tested drive A:. With BUFFERS=16, elapsed time is 314 seconds.
Tested drive A:. With BUFFERS=17, elapsed time is 311 seconds.
Tested drive A:. With BUFFERS=18, elapsed time is 306 seconds.
Tested drive A:. With BUFFERS=19, elapsed time is 333 seconds.
Tested drive A:. With BUFFERS=20, elapsed time is 331 seconds.
Tested drive A:. With BUFFERS=21, elapsed time is 327 seconds.
Tested drive A:. With BUFFERS=22, elapsed time is 323 seconds.
Tested drive A:. With BUFFERS=23, elapsed time is 319 seconds.
Tested drive A:. With BUFFERS=24, elapsed time is 315 seconds.
Tested drive A:. With BUFFERS=25, elapsed time is 311 seconds.
Tested drive A:. With BUFFERS=26, elapsed time is 308 seconds.
Tested drive A:. With BUFFERS=27, elapsed time is 313 seconds.
Tested drive A:. With BUFFERS=28, elapsed time is 328 seconds.
Tested drive A:. With BUFFERS=29, elapsed time is 325 seconds.
Tested drive A:. With BUFFERS=30, elapsed time is 322 seconds.
Tested drive A:. With BUFFERS=31, elapsed time is 318 seconds.
Tested drive A:. With BUFFERS=32, elapsed time is 314 seconds.


This is the report I got from running my Thrasher Disk on a plain old IBM
PC, 640k RAM, DOS version 3.1. As we can see, there is a DRAMATIC difference
between just two buffers, and three buffers ! Now you see how important using
the buffers command is... Anyhow, it would seem that a BUFFERS=9 command
would be best for a system that used it's floppy drive primarily.


DETAILS, DETAILS

How does the Thrasher Disk work ? Here's the sequence, as the computer sees
it:



Load DOS into memory

Read the CONFIG.SYS file, set up BUFFERS

Execute the AUTOEXEC.BAT file

AUTOEXEC sez: Run THRASHER

THRASHER sez: Test the drives, write a report, change CONFIG.SYS

THRASHER sez: If we're done, write WARMBOOT to JOBQ.BAT, else write DONE

THRASHER ends...

AUTOEXEC sez: Run JOBQ.BAT

Execute the JOBQ.BAT file

JOBQ.BAT (was written by Thrasher)
Either do a WARMBOOT (go to START) or tell user we're done, and quit.



Got that ?


How THRASHER.EXE works

The THRASHER.EXE program does several things:

1) It puts the requested disk drive through it's paces, and times the
action.

2) It writes the results of the test to the A:BUFFERS.RPT file.

3) It updates the A:CONFIG.SYS file with an incremented BUFFERS number.

4) It writes the JOBQ.BAT file, which tells DOS to either re-boot, or quit
running.

THRASHER creates a test file called THRASHER.$$$. This can be deleted, it
contains no useful data (it just exists to give THRASHER something to do).

There are two command line parameters that THRASHER looks for. Here is the
syntax:

THRASHER /TARGET=d: [/MAXBUF=nn]

where d: is the drive you want to test, and nn is how high the BUFFERS
statement can go before THRASHER quits.

You MUST specify a /TARGET= parameter, or you'll get a message from
THRASHER, and it'll quit.

The /MAXBUF= parameter can be ommited. If it is NOT present, THRASHER will
execute a "One-Shot" test of the target, and it will NOT write to the
BUFFERS.RPT file, JOBQ.BAT file, or CONFIG.SYS file. This can be used to
compare disk drive speeds to each other...


Yet More Details

Thrasher uses three tests on a disk: 1) It writes a file (THRASHER.$$$) with
1000 records, each 100 bytes long. 2) It then swaps these records around:
record 1 with record 1000, 2 with 999, 3 with 998, etc. 3)It then shuffles
the records - writing record 1 to record 2, 2 to 3, 3 to 4, etc.

I called the program THRASHER for a very good reason - your drive head is
gonna thrash around like you won't believe (especially at the lower BUFFERS
numbers). This puts a fair amount of wear and tear on a disk drive in a short
period of time. I don't recommend running this program every day...

When THRASHER writes it's report to the BUFFERS.RPT file, it appends the
file. So if it doesn't exist, it will be created... if it does exist, it will
be added to.


That's all I can think of to say about this program. I hope you find it
useful... you will probably only run it once, or whenever you get a new
kind of disk drive. Have Fun !



THRASHER

Written by: Monte Ferguson

Comments, critique, questions, etc should be addressed to:
Monte Ferguson
833 W. Highland
Ravenna, Oh
44266

Or contact me on PC-OHIO, (216) 381 3320


Send me $10.00 and I'll send you the source code....

Another fine product from GIANT FLAMING TOAD SOFTWARE


 January 9, 2018  Add comments

Leave a Reply