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.
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.
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
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 :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.