Subject: Re: IDE fun on the 5160
From: "Michael B. Brutman" <[email-masked]>
To: Jim Leonard <[email-masked]>
Date: Thu, 09 Feb 2006 20:38:58 -0600

Well, here's the code.  And here are the disclaimers:

I intended this to be a test of the interface, not a test of the disk. 
So it uses sequential reads and writes.

It's using fwrite, so it depends on the fragmentation of the disk.  I 
usually run this on a clean partition.  (I couldn't this time because 
when I booted with DOS 5, the other partitions of the disk were not seen 
and I don't know why - it may be a limitation of the SCSI BIOS.)

If I were to do this again, I would do same sector reads and writes. 
The better drives would cache that sector so that you would be truly 
measuring the interface, not the disk.  The problem is that on older 
drives and controllers it might not cache the sector, so it would be 
misleadingly low.

Usage is something like this:

   iotest write 1024 32

This creates a 1mb file called tmp writing 16K at a time.  32 is the 
number of 512 byte blocks.

   iotest read 1024 32

This reads the file back using a 16K read buffer.

The read and write buffer is important.  I found that for DOS 5 32 seems 
to be the magic number.  YMMV depending upon the configuration.

The zip is encrypted to prevent virus scanners from going nuts.  The 
password is password.

SpinRite doesn't like the Jr ..

Mike