How to benchmark MD raid disk?

Red Squirrel

[H]F Junkie
Joined
Nov 29, 2009
Messages
9,223
In Linux, how would I go about benchmarking the read/write speed of a MD raid array? In fact, how do I benchmark any mount point at all? Is there a built in command of doing it or do I need some specialized software? I suppose I could even write software that writes a chunk and measures how long it took, but not sure if I'd be getting true stats that way as it would just be a sequential write/read and not random.
 
Think I just found out. bonnie++. Running a test now, but from my reading looks like it does what I want.
 
There's a tool called IOZone which is available for Linux, which will bench any storage device. Additionally, as far as I am aware, you bench the device, not its mount point, so it'd be /dev/md0 or /dev/md1 or whatever number your md device is.

EDIT:

I might be talking crap on that last point. :p
 
I second the iozone recommendation. I like it better than bonnie++.

You can specify a path and file location with the -f flag. Here is a relatively quick test you can try:

iozone -a -y4K -q16M -s32M -I -e -f /path/to/your/drive/iozone.dat -i0 -i1 -i2

That uses direct I/O, which is supposed to bypass any caches, but it does not always work. You can also try the brute-force approach, which is to make the test file much larger than any cache. Here is an example:

iozone -a -y64K -q16M -s24G -e -f /path/to/your/drive/iozone.dat -i0 -i1 -i2

That writes 24GB test files (I was running it on a machine with 12GB of RAM, so I wanted to make the test file bigger than any possible buffer cache). Note that I started the IO size at 64KB there. You can lower it to 4KB if you like, but it will take quite a while.

If you want to see the effect of cache on speeds, you can use a fixed IO size, say 256KB, and try different test file sizes, like this:

iozone -a -n1M -g64G -r256K -e -f /path/to/your/drive/iozone.dat -i0 -i1 -i2

That will test 256KB IOs with test file sizes from 1MB to 64GB.

Note that I am referring to iozone, NOT iometer. iozone is available as a package with most linux distro's. Or you can get it from the official website:

http://www.iozone.org/
 
Last edited:
I generally use dd for mdraid benchmarking. That is good at getting STR numbers but not access times. So I am interested in other applications like phoronix-test-suite iometer and bonnie++.

So bookmarked.
 
Gonna have to fess up, I was actually thinking of IOMeter but couldn't remember the name. :p I knew IOZone existed though... :p
 
Back
Top