DOS Disk Tester

From Lo-tech Wiki
Revision as of 21:21, 8 July 2012 by Lo-tech>James
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Due to the difficulties running IOMeter with 16-bit hardware, a simple utility to perform key tests has been devised in Turbo Pascal, DiskTest.pas. The executable can be downloaded here.

Functionality has been extended for the development of XT-IDE controller prototypes.

Since all tests are performed through the file system, hardware compatibility should be universal. Various command-line options control test size and a number of operating modes.

System Requirements

  • IBM PC or above (8088 or above)
  • 256KB system RAM or more
  • MS-DOS or PC-DOS 2 or above

Command Line Options

With no command line parameters, a file-system based performance test will be performed, with a test file size of 4MB and 256 seeks. The test file size will be truncated to available free space if it is less.

  • Specify /? or -h, to display command line help.

Performance Test Options

  • maxseeks: 4096 seeks (default is 256)
  • highseeks: 1024 seeks
  • lowseeks: 128 seeks
  • minseeks: 32 seeks (use for floppy drives)
  • size=nn[k|m]: specify the test file size, which will be truncated to available free space. To use all free space use maxsize instead. Value is in bytes, specify K or M as required (examples: size=4M (default), size=16M, size=300K).
  • readonly: to perform a read-only test against an existing test file.

Example: disktest size=8M maxseeks

Reliability Test Options

Two test programs are included, primarily designed to facilitate the development of the XT-IDE prototypes but with potential usage beyond this, testing system and storage stability and reliability.

  • mediatest performs a 10-pass pattern test. Can be used with maxsize. With the default 4MB test file, run time is typically 7 to 15 minutes on a 4.77MHz 8088.
  • signaltest is an interactive test mode that is design to enable assessment of signal quality (with an osciloscope) at various points in the system.

Note: These tests run in isolation; that is, no performance test is undertaken when specified.

Performance Testing

The tests performed are,

  • 32K Sequential Read (KB/s)
  • 32K Sequential Write (KB/s)
  • 8K Random (IOPS) - 70% read, 8K aligned
  • 512-byte (single sector) random read IOPS, sector aligned

These tests have been chosen since they form the basis of storage performance testing using IOMeter in current systems. All tests are performed through DOS file IO, hence are realistic application layer performance figures.

By default, a test file of 4MB is created, unless:

  • there is insufficient disk space, in which case all available disk space is used; or
  • maxsize is specified, in which case all available disk space is used; or
  • size=nn[k|m] is specified, defining the test file size specifically.

Since file IO in DOS is synchronous, there is no real concept of outstanding IOs. Hence tests are broadly comparitive to running IOMeter with 1 outstanding IO.

File System Performance and Caching

The utility tests file system, rather than raw device performance. Hence, the results will be greatly influenced by disk caching and file system overhead.

DOS doesn't keep the entire FAT in memory (since DOS 2) and therefore with no caching the drive will be continually seeking to the FAT as well as the data areas. Caching of such structures in DOS, prior to SMARTDRV, is achieved with the CONFIG.SYS BUFFERS statement.

In general, to minimse the impact of FAT seeks:

  • For FAT-12 volumes, ensure at least 16 buffers are allocated (BUFFERS=16 in CONFIG.SYS)
  • For FAT-16 volumes, ensure the maximum 99 buffers are allocated.

Random throughput is also highly skewed by the relationship between the test file size and the FAT allocation unit size, presumably due to the computational overhead of following the FAT to ultimately calculate disk block addresses. This impact is dramatic on slow processors: on an PC/XT running a test on a compact-flash card with a 4MB test file, sector IOPS rates vary from 60 IOPS (2GB partition) to 14 IOPS (60MB partition).

Reliability Testing

mediatest

For media testing, mediatest command line option runs a 10-pass pattern test with a default file size of 4MB (which can be set with size=nn[k|m] or maxsize). As with the performance test, test size will be automatically truncated to available disk space.

The test is potentially time consuming (onscreen progress marks are shown though) and tests can be skipped (to the next part) by pressing any key.

Pattern testing works by exercising the interface with specific bit patterns, which tests the system memory, interface reliability, and ultimately the storage medium reliability. All tests are designed around the 8-bit data bus (that the XT-IDE boards use). Tests are:

  • 0000h - Every byte low.
  • FFFFh - Every byte high.
  • FF00h - Bytes flipped relative to the last (FFh, 00h, FFh, 00h etc)
  • F00Fh - Bytes flipped relative to the last (F0h, 0Fh, F0h, 0Fh etc)
  • AA55h - Checkerboard test (AAh, 55h, AAh, 55h etc)
  • A55Ah - Similar to AA55h
  • 18E7h - Pattern of 3-2-3 bits
  • E718h - Inversion of 18E7h
  • Walking-Ones - cross-talk test. Starts with 01h, then rotates each byte left one place, so writes 01h, 02h, 04h, 08h, and so on.
  • Walking-Zeros - cross-talk test. Starts with FEh, then rotates each byte left one place, so writes FEh, FDh, FBh, F7h, and so on.

signaltest

For interface testing, special patterns can be tested using the command line option signaltest. This option runs patterns that enable assessment of signal quality with an osciloscope:

  • Test 1 - For testing at IDE DD7. Flips the bit continually, all others will be low. Line DD7 has a 10k pull-down at the interface.
  • Test 2 - For testing at IDE DD11. Holds the bit low and flips all other bits continually. Enables measurement of cross-talk as the line serving this bit is in the middle of the data lines on the 40-pin connector.
  • Test 3 - For testing on the ISA Bus at data bit 4 (ISA slot pin A5). To enable assessment of signal quality on the ISA bus. Flips this bit repeatedly.


Sample Output

Performance Testing

C:\>disktest
DiskTest, by James Pearce.  Version 2.2

Preparing drive...
Configuration: 4096 KB test file, 256 IOs in random tests.

Write Speed         : 61.99 KB/s
Read Speed          : 63.90 KB/s
8K random, 70% read : 3.5 IOPS
Sector random read  : 5.7 IOPS

Average access time (includes latency and file system overhead), is 176 ms.

C:\>

Pattern Test

C:\>disktest mediatest
DiskTest, by James Pearce.  Version 2.2

Preparing drive...
Pattern testing with 10 patterns over 4.0 MB.
Press any key to skip on, S to skip test completely, Q to quit.

Pattern 0x0000 - Writing: .................... Comparing: vvvvvvvvvvvvvvvvvvvv
Pattern 0xFFFF - Writing: .................... Comparing: vvvvvvvvvvvvvvvvvvvv
Pattern 0xFF00 - Writing: .................... Comparing: vvvvvvvvvvvvvvvvvvvv
Pattern 0xF00F - Writing: .................... Comparing: vvvvvvvvvvvvvvvvvvvv
Pattern 0xAA55 - Writing: .................... Comparing: vvvvvvvvvvvvvvvvvvvv
Pattern 0xA55A - Writing: .................... Comparing: vvvvvvvvvvvvvvvvvvvv
Pattern 0x18E7 - Writing: .................... Comparing: vvvvvvvvvvvvvvvvvvvv
Pattern 0xE718 - Writing: .................... Comparing: vvvvvvvvvvvvvvvvvvvv
Walking 1s - Writing: ...................... Comparing: vvvvvvvvvvvvvvvvvvvvvv
Walking 0s - Writing: ...................... Comparing: vvvvvvvvvvvvvvvvvvvvvv

Test ran for 00:10:33.  No blocks had errors.

C:\>

Source

See DOS Disk Tester Source Code. Source can be compiled using Turbo Pascal 6.

See Also