
The reference to these commands is from Sébastien Han Blog Post "Ceph: validate that the RBD cache is active" and the rbd man Page. For more posts about Ceph, take a look at Sébastien Han Blog.
To be able to run a rbd benchmark, you need to create an image. The command to create an image for this would be:
$ RBD_IMAGE_NAME="bench1"
$ rbd create --size=10G $RBD_IMAGE_NAME
Takes normal rbd command flags like:
-p or --pool for the rbd pool to use.The following flags are for the benchmark configuration:
--io-type if read or write IO should be run.--io-size how big every IO should be (in B/K/M/G/T).--io-threads how many IOs are done in parallel.--io-total how much total IO should be done.--io-pattern sequential or random IO pattern.For sequential write benchmark:
$ rbd -p replicapool bench $RBD_IMAGE_NAME --io-type write --io-size 8192 --io-threads 256 --io-total 10G --io-pattern seq
For sequential read benchmark:
$ rbd -p replicapool bench $RBD_IMAGE_NAME --io-type read --io-size 8192 --io-threads 256 --io-total 10G --io-pattern seq
--io-pattern flag value to rand.Have Fun!