A bit similar to the rados bench, rados load-gen
is another interesting tool provided by Ceph, which runs out-of-the-box. As the name suggests, the rados load-gen tool can be used to generate load on a Ceph cluster and can be useful to simulate high load scenarios.
Let's try to generate some load on our Ceph cluster with the following command:
# rados -p rbd load-gen --num-objects 50 --min-object-size 4M --max-object-size 4M --max-ops 16 --min-op-len 4M --max-op-len 4M --percent 5 --target-throughput 2000 --run-length 60
The syntax for rados load-gen
is as follows:
# rados -p <pool-name> load-gen
--num-objects
: The total number of objects--min-object-size
: The minimum object size in bytes--max-object-size
: The maximum object size in bytes--min-ops
: The minimum number of operations--max-ops
: The maximum number of operations--min-op-len
: The minimum operation length--max-op-len
: The maximum operation length--max-backlog
: The maximum backlog (in MB)--percent
: The percentage of read operations--target-throughput
: The target throughput (in MB)--run-length
: The total run time in secondsThis command will generate load on the Ceph cluster by writing 50 objects to the rbd
pool. Each of these objects and operation lengths are 4M in size, with 5% of the read and test runtime as 60 seconds.
The output has been trimmed for brevity's sake. Once the load-gen
command finishes, it cleans all the objects it has created during the test and shows the operation throughput.
3.139.97.202