1

Is there a benchmark program I can use to measure random read speeds of a vps without interference from the kernel cache? Also looking for something where you can change the read sizes say 4k-64k.

incognito2
  • 915
  • 4
  • 13
  • 16

2 Answers2

4

I would recommend using iozone and/or bonnie++ to benchmark. If you're solid on what you need to test, both tools are customizable to those requirements.

For iozone, try something like the following to run a single-threaded random read/write test with a 4k record size using a 4 Gigabyte file.

Run this from the directory you wish to test: iozone -t1 -i2 -r4k -s4g

ewwhite
  • 194,921
  • 91
  • 434
  • 799
  • I tried running iozone but I keep getting "iozone.DUMMY.0: No such file or directory". Do you know how to fix this error? – incognito2 Aug 13 '11 at 16:09
  • Make sure you are running iozone in a directory that you have write permissions to. – ewwhite Aug 13 '11 at 16:20
  • I get the same error as @incognito2. I'm running iozone from my desktop folder which I definitely have write permissions for. – Zero3 Mar 25 '16 at 19:09
  • I have the same error, I have all permissions and available space. – Vedmant Sep 05 '19 at 07:42
0

Note that you have to use iozone -t1 -i0 -i2 -r4k -s4g for the test in ewwhite answer to run. This -i0 (write test) is required before a read test as noted in https://superuser.com/questions/365588/iozone-runs-fail-with-no-such-file-or-directory-errors :

The iozone manual states that if you're going to use the -i argument, you need to include -i 0 in order to have files to test against. In your case, use -i 0 -i 2 to get your write test. If you don't specify that test, the other tests have no file to work with and you'll get the error you see.

Or you can run with -w -f <file> and do an initial -i 0 run. Then the file will be there for the following -i 2 test.