Richard HJ's Web Site

disk_test Home Page

Tool to Measure Data Transfer Rates between Memory and Disk Sub-system

The disk_test programs read_file and write_file read or write blocks of data between memory and the RAID or disk sub-system and measure the data transfer rates in Mbyt/s and Mbit/s. There is a sample command file, 'cmd_file_rw', showing how read_file and write_file may be run; they produce a text files containing the results, one per set of conditions. The distribution also contains an Excel spreadsheet file that will accept these files and plot them for you!

write_file

This program fills a ring buffer with random numbers and measures the time to write this to disk. For long files the ring buffer is continuously filled. The program can make the following measurements:

The Parameters are:

-b = <size of block read/written to/from disk in bytes (20 kbytes is the default) >
-f = <name of file>
-r = <size of ring buffer in memory in Mbytes (20 Mbytes is the default) >
-s = <size of file in Mbytes>
-v = turn on debug printout
-B = <bin width of histogram in us>
-H = print the histogram
-M = <min (low limit) of histo in us>

Example:

write_file -b20000 -s 2000 -f /hraid/my_test.dat

read_file

This program measures the time to read an existing file from the disk sub-system and fill a ring buffer in memory. The file is read until the End of File is reached and the ring buffer is continuously filled. The program can make the following measurements:

The Parameters are:

-b = <size of block read/written to/from disk in bytes (20 kbytes is the default) >
-f = <name of file>
-r = <size of ring buffer in memory in Mbytes (20 Mbytes is the default) >
-v = turn on debug printout
-B = <bin width of histogram in us>
-H = print the histogram
-M = <min (low limit) of histo in us>

Example:

write_file -b20000 -s 2000 -f /hraid/my_test.dat

Installation of disk_test

From disk_test version 1.0.0 automake was used and the distribution was split into two tarballs: the disk_test tool and the supporting library libhj. The disk_test-a.b.c tarball creates directory disk_test-a.b.c and libhj-l.m.n creates directory libhj-l.m.n. For installation and compilation in your home directory having downloaded the corresponding disk_test and library files start by cd to the library directory then:

./configure --prefix=$HOME
make install

$HOME/include and $HOME/lib are created. Then cd to the directory containing disk_test and do:

./configure --prefix=$HOME --with-hj-location=$HOME
make install

$HOME/sbin is created with the disk_test programs.

Installation of Older Versions

Prior to version 1.0.0 the tar file contained both tool and library and when unpacked, created two directories:
disk_test_vxx containing the test programs and "src_vxx" containing library functions. xx is the version number of the kit.

Versions of disk_test

Version

Download
tcpmon

Download
libhj library

Write-up

Excel plots example

Notes

disk_test-1.1.0

tar file -1.1.0 libjh-4.2.6      

disk_test-1.0.3

tar file -1.0.3 libhj-4.1.3   Spreadsheet June03

knows about 3Ware9000 interrupts

file does not have to be n* buffer size

disk_test-1.0.2

tar file -1.0.0 libhj-4.0.2   Spreadsheet June03  

disktest

disktest_Jun03

none

  Spreadsheet June03  

Some scripts

Measures memory-disk transfer rates as a function of file size. For each file size it writes 4 files and then reads them.

Input: ./cmd_file_rw <file prefix>

Output: 2 files with write and read transfer rates

Perl script to test read and write thoughput as a function of the program buffer size. For each buffer size loop $iteration (5) times

Input: ./cmd_scan_bufsiz -o myfile -s1000
-o= prefix for output files [test_x]
-s= size of file in Mbytes

Output:
two files one for writes one for reads

Perl script to measure write or read memory-disk transfer rates as a time series $iteration (100) long.

Input: ./cmd_time_rw -o myfile

-o= prefix for output files [test_x]
-r= do read not write

Output: Two file with the transfer rates one with 8kbyte program buffer the other with a 64kbyte bffer.

Script to record system information

Input: ./get_sys_info >sys_info_node_date_time.txt

Enjoy, but the usual disclaimers apply!

Feedback and bug-reports are welcome and I will do my best to fix things!

©2003, 2004, 2005 Richard Hughes-Jones (R.Hughes-Jones@manchester.ac.uk)
22 Jan 2011.

Copyright notice | Disclaimer | Privacy Policy |