Benchmarking Basics

= Introduction =

In General, benchmarking of storage hardware is a useful task in determining minimum and maximum performance thresholds.

When attempting to produce any benchmarking results, the key is to start with the lowest level benchmarking against the hardware you can achieve.

A simple example of this methodology would be to utilize a low-level block reader / writer tool such as `dd' to test against a single disk.

Such a simple test would allow you to quickly determine the maximum sequential read and write performance of the disk in question (for example).

Following this process throughout your testing regime will allow you to quickly determine where performance is being lost.

= General Benchmarking Tools =

dd
The dd utility copies a file (from standard input to standard output, by default) with a changeable I/O block size, while optionally performing conversions on it. The reason this is useful is because dd can:
 * Can read and write from raw block devices
 * Block size is specifiable
 * Reads and Writes are sequential

hdparm
The hdparm utility allows you get and set various ATA and SATA disk parameters. It can be very useful in, for instance figuring out drive caching effects on your benchmark run.

sdparm
The sdparm utility allows you to get and set various SCSI device parameters, similar to how hdparm functions. Again, this utility can be extremely useful in determining how your disk is functioning and what is causing the behavior you're seeing when benchmarking.

bonnie++
Bonnie++ is a benchmark suite, based on Bonie, that is aimed at performing a number of simple tests of hard drive and file system performance.

fio
fio is an I/O tool meant to be used both for benchmark and stress/hardware verification. It has support for 19 different types of I/O engines (sync, mmap, libaio, posixaio, SG v3, splice, null, network, syslet, guasi, solarisaio, and more), I/O priorities (for newer Linux kernels), rate I/O, forked or threaded jobs, and much more. It can work on block devices as well as files. fio accepts job descriptions in a simple-to-understand text format. Several example job files are included. fio displays all sorts of I/O performance information, including complete IO latencies and percentiles. Fio is in wide use in many places, for both benchmarking, QA, and verification purposes. It supports Linux, FreeBSD, NetBSD, OpenBSD, OS X, OpenSolaris, AIX, HP-UX, Android, and Windows.

IOzone
IOzone is a filesystem benchmark tool. The benchmark generates and measures a variety of file operations. Iozone has been ported to many machines and runs under many operating systems.

IOR
The IOR software is used for benchmarking parallel file systems using POSIX, MPIIO, or HDF5 interfaces.

mdtest
mdtest is an MPI-coordinated metadata benchmark test that performs open/stat/close operations on files and directories and then reports the performance.

= File system specific benchmarking tools =

The various tools below are file system specific

obdfilter-survey
Lustre's obdfilter-survey script, which is part of the lustre IO Toolkit is designed to allow you perform node level file system benchmarks, using various thread counts against the nodes ldiskfs file system.

mds-survey
Lustre's mds-survey script, which is also part of the Lustre IO Toolkit functions in much the same way as the obdfilter-survey script with the biggest difference being that mds-survey is intended to test metadata performance against the MDT, rather than object creation performance on the OSTs