CephLXXII · BenchmarkingBenchmarking
rbd bench
What you'll learn
- Run rbd bench with appropriate parameters
- Interpret its output
- Know its limitations relative to fio
- Choose between rbd bench and fio
Prerequisites
None — start here.
Verified against Ceph Tentacle 20.2.x · Ceph Squid 19.2.x (supported previous) · cephadm matches the verified Ceph release · podman 4.x · csi-rbd and csi-cephfs current · RBD / CephFS / RGW current (matches Ceph release) · Linux kernel 5.15+ (5.10 minimum) · Ubuntu 24.04 LTS (Ceph host baseline) · Debian 12 (Bookworm) (Ceph host baseline) · Rocky Linux / RHEL / AlmaLinux 9.x (Ceph host baseline) · Proxmox VE 9.x (cross-course integration) · Kubernetes 1.31+ (cross-course integration) · 2026-08-18
Why this matters in production
rbd bench is built in and needs no extra packages, which makes it the
fastest way to get a number. Knowing where it stops being sufficient
prevents over-relying on it.
Running it
rbd create --size 100G rbd-vms/bench
rbd bench --io-type write --io-size 4K --io-threads 16 \
--io-total 10G --io-pattern rand rbd-vms/bench
rbd bench --io-type read --io-size 4M --io-threads 16 \
--io-total 20G --io-pattern seq rbd-vms/bench
| Flag | Meaning |
|---|---|
--io-type | read, write, or rw |
--io-size | block size |
--io-threads | concurrency |
--io-total | total bytes to transfer |
--io-pattern | seq or rand |
--rw-mix-read | read percentage for rw |
# a mixed workload
rbd bench --io-type rw --rw-mix-read 70 --io-size 4K \
--io-threads 32 --io-total 20G --io-pattern rand rbd-vms/bench
The output
elapsed: 42 ops: 2621440 ops/sec: 62415.24 bytes/sec: 255.68 MiB/s
Three numbers: elapsed time, total operations, and the rates. That is the whole output, and its brevity is both the tool’s convenience and its limitation.
Limitations relative to fio
| Capability | rbd bench | fio |
|---|---|---|
| Latency percentiles | no | yes |
| Latency distribution | no | yes |
| Mixed block sizes | no | yes |
| Multiple jobs against several images | no | yes |
| Time-based rather than total-based runs | no | yes |
| Structured output for automation | no | JSON |
| Ramp-up period exclusion | no | yes |
The absence of percentiles is the significant one: an average operations-per-second figure says nothing about the tail, and the tail is what users experience.
Choosing between them
| Situation | Tool |
|---|---|
| A quick capability check | rbd bench |
| No packages installable on the host | rbd bench |
| Establishing a baseline | fio |
| Investigating latency | fio |
| Comparing configurations | fio |
| Automated regression testing | fio with JSON output |
# cleanup
rbd rm rbd-vms/bench
Quiz
Knowledge check · 4 questions
Q1. What is the most significant limitation of `rbd bench` for performance work?
Q2. Two total-based benchmark runs can be uncomparable with each other even when both complete successfully.
Q3. Choose a benchmarking tool.
An operator needs to compare two RBD cache configurations and decide which to deploy fleet-wide. They have rbd available and can install packages.
Q4. Why does `fio --ramp_time` matter for benchmark accuracy?
Passing score: 75%. Answers are checked in this browser.
Production discipline
Use rbd bench for a quick capability check and fio whenever the
result will inform a decision — the missing latency percentiles are
exactly what distinguishes configurations users notice. Prefer time-based
runs with a ramp period so results across runs are directly comparable.
Cross-course references
- Kubernetes: quick smoke tests and decision-grade benchmarks need different tools
- Linux: dd is convenient and hdparm is quick; neither replaces fio for a decision