Testing IO performance in Linux [closed] Testing IO performance in Linux [closed] linux linux

Testing IO performance in Linux [closed]


IO and filesystem benchmark is a complex topic. No single benchmarking tool is good in all situations. Here is a small overview about different benchmarking tools:

Block Storage:

  • IOMeter - Highly customizable and allows to coordinate multiple clients. Needs a Windows PC for the coordination application. Developed by Intel. On Linux, take maximum rates of older (at least 2006.07.27 and earlier) with a pinch of salt because the submission method was not optimal.

File System (synthetic):

  • FFSB - Flexible Filesystem Benchmark. Very neat benchmarking for Linux. Good customization of workload. NFS benchmarking (net-ffsb) a bit unsound.
  • Filebench - Extremely powerful, but originally developed for Solaris. Linux support isn't good.
  • sysbench - Mainly a DB benchmarking tool, but also basic filesystem benchmarking tool.
  • bonnie - Seems to be obsolete.
  • bonnie++ - C++ port of bonnie. Easy, but seems not to be very customizable.

File System (workload):

  • Postmark - Simulates the IO behavior of a mail server. Too small to stress good IO systems.

Stony Brook University and IBM Watson Labs have published a highly recommended journal paper in the "Transaction of Storage" about file system benchmarking, in which they present different benchmarks and their strong and weak points: A nine year study of file system and storage benchmarking. The article clearly points out that the results of most benchmarks at least questionable.


A note: Is the question programming related? Maybe not, but maybe it is. I spend a lot of time benchmarking the IO performance of the systems I develop. At least for me, questions about how to benchmarking these things is highly programming related. Please: Do not close all questions that are not development/programming related from your point of view. The point of view of other developers might be different.


tool: fio

link: http://freshmeat.net/projects/fio/

test physical disk IO:

    ./fio examples/disk-zone-profile 

set parameter:sequential r/w: rw=read or rw=writerandom r/w: rw=randread or rw=randwrite


if you need a quick way without hassle of installing anything . This is the method I use for write speed test:

dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync

And the output is something like this

root@rackserver:/# dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync16384+0 records in16384+0 records out1073741824 bytes (1.1 GB) copied, 4.86922 s, 221 MB/s

Also : delete the test file after this to recover the extra space used

Some explanation :

bs = block sizecount = the no of blocks to be written

Adjust these parameters to change the size of the file written as per your server specs and the amount of time you want to spend writing.

the read speed as suggested already by gtsouk, can be checked by using /dev/null as output.