Ceph RADOS bench

Ceph ships with an inbuilt benchmarking tool known as the RADOS bench, which can be used to measure the performance of a Ceph cluster at the pool level. The Rados bench tool supports write, sequential read, and random read benchmarking tests, and it also allows the cleaning of temporary benchmarking data, which is quite neat.

How to do it…

Let's try to run some tests using the rados bench:

  1. To run a 10 second write test to the pool rbd without cleanup, use the following command:
    # rados bench -p rbd 10 write --no-cleanup
    

    We get the following screenshot after executing the command:

    How to do it…
  2. Similarly, to run a 10 second sequential read test on the rbd pool, run the following:
    # rados bench -p rbd 10 seq
    
    How to do it…

    Note

    It might be interesting to know, in this case, why the read test finished in a few seconds, or why it didn't execute for the specified 10 seconds. It's because the read speed is faster than the write speed, and rados bench had finished reading all the data generated during the write test. However, this behavior depends highly on your HW and SW infrastructure.

    • Similar to running a random read test with the rados bench, execute the following:
      # rados bench -p rbd 10 rand
      

How it works…

The syntax for the rados bench is as follows:

# rados bench -p <pool_name> <seconds> <write|seq|rand> -b <block size> -t --no-cleanup
  • -p or --pool: Specify the pool name
  • <seconds>: Test the time in seconds
  • <write|seq|rand>: The type of test, for example, write, sequential read, or random read
  • -b: For the block size; by default, it's 4M
  • -t: The number of concurrent threads; the default is 16
  • --no-cleanup: The temporary data that is written to the pool by the RADOS bench should not be cleaned. This data will be used for read operations when they are used with sequential reads or random reads. The default is cleaned up.

    Note

    As specified in the last recipe, I am running these tests against a physical Ceph cluster. You can definitely run these commands on a Ceph cluster created on virtual machines, however, you might not get satisfactory results in a virtual environment.

The Rados bench is a pretty handy tool to quickly measure the raw performance of your Ceph cluster, and you can creatively design your test cases based on write, read, and random read profiles.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.254.192