RBD benchmarking

Finally, we will test the performance of RBDs using our favorite tool, fio. This will test the entire software and hardware stack, and the results will be very close to what clients would expect to observe. By configuring fio to emulate certain client applications, we can also get a feel for the expected performance of these applications.

To test the performance of an RBD, we will use the fio RBD engine, which allows fio to talk directly to the RBD image. Create a new fio configuration and place the following into it:

[global]
ioengine=rbd
randrepeat=0
clientname=admin
pool=rbd
rbdname=test
invalidate=0
rw=write
bs=1M
direct=1
time_based=1
runtime=30
numjobs=1
iodepth=1

You can see that, unlike the disk benchmarking configuration, instead of using the libaio engine, this configuration file now uses the rbd engine. When using the rbd engine, you also need to specify the RADOS pool and the cephx user. Finally, instead of specifying a filename or block device, you simply need to specify an RBD image that exists in the RADOS pool that you configured.

Then, run the fio job to test the performance of your RBD:

As can be seen in the preceding output, the fio tool is using the RBD engine directly, bypassing the requirement for an RBD to be mounted to the Linux operating system before it can be tested.