Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the simplest way to check read/write performance to a specific location (e.g. a mounted iSCSI device).

I suspect I can't use hdparm because that's lower level. Am I right?

share|improve this question
up vote 11 down vote accepted

bonnie++ is an aging but good one, as well as iozone.

share|improve this answer

Found this link: Quick SAN Performance Test, NFS, iSCSI, IOZONE – Part I

time sh -c "dd if=/dev/zero of=/tmp/disk_write_test.tmp bs=64k count=125000 && sync"

Note from the article:

  • Use more than the machine's free memory to make sure caching isn't being taken into account

Or, to force the caching off

time sh -c "dd if=/dev/zero of=/mnt/home/disk_write_test.tmp bs=64k count=125000 oflag=direct"
share|improve this answer
instead of running dd ... && sync, you can just use "oflag=direct" as a dd parameter. This causes dd to write using the O_DIRECT flag, which bypasses the vmfs cache. This means your time isn't slowed down due to linux syncing all it's cache to all it's devices (including the ones you're not testing), and has the additional benefit of meaning you can inspect dd's output rate directly. – Daniel Lawson Feb 10 '11 at 21:08
Thanks, have added it. Does that do away with the need to fill up the machine's RAM too? – pufferfish Feb 14 '11 at 12:43
hmmm... it's REALLY slow using the "oflag=direct" flag (0.5MB/s vs 100MB/s). Can get it up to about 80MB/s if I use a huge bs like 65536 – pufferfish Feb 14 '11 at 13:40
Running dd ... && sync has the advantage that it works on multiple operating systems, beyond just GNU/Linux. – Stefan Lasiewski Jan 27 '15 at 20:40

I use sysbench:

sysbench --test=fileio prepare

sysbench --test=fileio --file-test-mode=rndrw run

sysbench --test=fileio --file-test-mode=seqrewr run

There are a lot of configuration options but that will give you a good idea.


share|improve this answer

there are many tools available for the performance test. Like if you want to test sequencial read,random read/write etc. iozone is too much elaborate in its output. couple of others are also discussed here. file system performance test

share|improve this answer

iozone, bonnie and bonnie++ are common benchmark tools.

share|improve this answer

Check out bonnie++.

share|improve this answer

'dd' is really a good way to do it. To get an accurate test though you probably want to make sure that device is not mounted, and you actually 'dd' straight to the block device itself, or one of its partitions. If it is a multipath'd device, you should use the dm-device instead, i.e.: /dev/dm-* or /dev/mapper/*, or if you have a custom configuration, whatever the pathing is to your MP devices.

share|improve this answer
Actually I'm interested in the "real" performance, via the mount. So I shouldn't use the block device itself right? – pufferfish Feb 10 '11 at 15:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.