Document:

 DiskGraf.htm

 Creation Date:

 22 January 2001

 Revision Date:

 10 December 2003

 Title:

DiskGraf Benchmark

 Keywords:

PC Benchmark Disk Performance Graph CPU Utilisation

 Abstract:








The program measures disk write and read speeds at different block sizes, producing a graph of megabytes per second and CPU utilisation. Latest version does the same for bus/DMA speeds and measures random reading time of various sized files. Results are saved in a text file. The program can now be executed via commands in a BAT file to run, log results and exit without intervention. For quicker viewing and comparison an extra program is supplied to load from logs, display and re-scale if required.

 Contributor:

 Roy_Longbottom@compuserve.com.

 Source:

 Compuserve PC Hardware Forum, Library 10 Benchmarks


 Revision:


Version 1.1 March 2001 - Menu options added to load graph from text log file and save graph as BMP file (allowing configuration notes to be changed).


 


Version 1.2 September 2001 - Measurements of bus/DMA and random access speeds included. Producing graph is no longer default. Facilities to run via command with no intervention included. LoadGraf produced.


 


Version 1.3 January 2002 - Method of displaying graphs whilst running changed to avoid window becoming hidden using WinXP.- Now OldDG.exe. This version also runs via Windows 95 using FAT16 format. So DiskGr16 is no longer required.


 


Version 1.3A December 2003 - Earlier versions used FILE_FLAG_WRITE_THROUGH in CreateFile. On some disks this reduced writing speeds. This version does not use this flag and is otherwise identical to Version 1.3.


Roy Longbottom's DiskGraf Benchmark

Copyright (C) Roy Longbottom 2001, 2002, 2003

Run LoadGraf program to view graphs from log files in TextRes (or other) folder.


The program measures disk write and read speeds at different block sizes, producing a graph of megabytes per second and CPU utilisation. When the program starts a few measurements are made and warnings given if DMA does not appear to be set, writing is much slower than reading or speed is generally slow. In the latter case, default parameters of 5 files, each 8 MB, with block sizes between 1 KB and 1024 KB will be reduced to ensure that running time is not too long. Up to 16 files of 10 GB can be used which can be used to demonstrate performance variations over the whole surface to 160 GB capacity. The program checks that space is available. Speed and CPU utilisation is shown separately for each file. This can demonstrate that the disk is fragmented or other peculiarities.

Data files are written in the folder containing the exe files. Results are saved in text file DiskGraf.txt, a menu option being available to load and redisplay. Optionally, the graph can be saved in BMP format. These files will also be in the same folder. The BMP graph is 135 KB but can be loaded with appropriate software and saved as a compressed GIF file to shrink size to around 16 KB.

Version 1.2 has an added function that rereads the first record of the last file used 25 to 100 times, again at block sizes 1 KB to 1024 KB. At many sizes, the data is likely to be cached in the disk’s buffer where measured average transfer rate shows maximum bus/DMA speed. A second function measures random reading time in milliseconds of 1KB blocks out of 1, 2, 4 and 8 MB or larger (up to 1 GB, depending on maximum file size used for the other tests). Speed on small files can be very fast when cached in the disk’s buffer. The data for these is also saved in the log file and menu options allow the graphs to be displayed and saved. Maximum DMA speed and range of random reading speeds are also shown on the disk speed graph.

Note: for the DMA test, Windows 95 appears to read data using smaller block sizes into memory and access it from there instead of from the disk's buffer leading to faster speeds than expected.

The program can now be executed via commands in a BAT file where the number of files and file size can be specified. This runs the tests, logs the results and exits without any warning messages that need intervention. Example command is DisKGraf Files 6, MB 16 - see RunGraf.bat.

The program determines the version of Windows being used, memory size, disk/partition size, free disk size after writing files, CPU ID and speed, data and time of test. These are shown on the graph along with parameters used and any text on disk type etc. entered in the variables boxes. Example of configuration data is:

Windows 98 Version 4.10, build 2222, A. Wed Jan 10 17:52:09 2001
CPU AuthenticAMD, Features Code 0183F9FF, Model Code 00000630, 950 MHz
Memory 130416 KB, Free 54224 KB. Disk/partition 995 MB, Free 977 MB

Examples below are for this configuration, with a late year 2000, ATA100, 30 GB, 7200 RPM, Maxtor disk.


On starting the buttons shown can be clicked or selections can be made from the options menu. Variables (Parameters and Notes) - see panel below. Quick Test - writes and reads two 4 MB files at 64 KB block size for a quick check to see if DMA is on. Run (Write and Read) - runs the tests according to the selected variables and parameters. Exit - ends the program.

View Normal Graph, View DMA Graph and View Random Graph enable displaying the three graphs. Load Graph From TXT Log allows selection of a log file. Save Graph As BMP saves the currently displayed graph.


Variables

File Size and Number of Files require the number typed in the boxes in the range shown. Minimum and Maximum Block Sizes between 1 KB and 1 MB are selected via a drop down list. A single block size can be selected. The Use Windows Memory File Cache switch causes the files to be opened with a switch that forces Widows to write the files via File Cache. If RAM is sufficiently large, the data will still be in the cache on reading and measured data transfer rate will be much higher than from disk, reflecting reading speed from RAM to CPU or RAM to RAM to CPU. Use 1 file for the cached test. CPU utilisation measurement makes use of a background low priority thread to use the CPU when waiting for I/O. In the event of problems, first switch off Measure CPU Utilisation. Memory used for data is the same as block size unless the Memory data size as file size option is selected. This can be used to induce paging to disk from RAM besides normal writing and reading. The program limits the size to 2 GB. The name of the Graph BMP file can be changed. Data can be typed in the Disk type boxes. This is included for reference on the graph.
The variables information is displayed at the side of the graph along with the peak DMA/bus speed and range of random reading times. The particular example shows the sort of DMA speed that could be expected via an ATA100 interface.

Example 1: Windows 98, DMA switched on via Control Panel, System, Device Manager, Disk Drives, Generic IDE Type 47, Properties, Settings. Write graphs are red and read graphs blue. Scale numbers 1 to 1024 are block sizes in KBytes. Disk is a late year 2000, Maxtor ATA100, 30 GB, 7200 RPM.

Example 2: Windows 2000. Note write speed reaches peak at larger block sizes than Win98

Example 3: Windows 98, DMA switched off. Note low data transfer rates and CPU utilisation around 100%.

Example 4: Windows 2000. Use one file with Windows File Cache option selected. Note fast reading speeds with CPU utilisation at 100%. Win98 is slower than this when caching option is selected.

Example 5: First partition 1.5 GB with about 300 MB free, fragmented. Note low performance and spikey graphs.

Example 6: After defragmentation, with some speeds up to scratch but still spikey.

Example 7: Graph of bus/DMA speeds on UDMA66 connection.

Example 8: Graph of random reading times 1 KB out of 1 MB to 1 GB files.

LoadGraf.exe

Sample results are in the TextRes folder. Details of configurations used are in Index.txt.

This uses the same display as DiskGraf but has an option to change the scale to make comparisons easier. Files can also be loaded via studying configuration details in the index file. OtherGraf button can be selected to run further copies of the program to enable visual comparisons.