Skip to main content
RunBook Academy

CephLXXII · BenchmarkingBenchmarking

rbd bench

Intermediate⏱ ~16 minrbd

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

Not yet marked complete on this device.

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
FlagMeaning
--io-typeread, write, or rw
--io-sizeblock size
--io-threadsconcurrency
--io-totaltotal bytes to transfer
--io-patternseq or rand
--rw-mix-readread 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

Capabilityrbd benchfio
Latency percentilesnoyes
Latency distributionnoyes
Mixed block sizesnoyes
Multiple jobs against several imagesnoyes
Time-based rather than total-based runsnoyes
Structured output for automationnoJSON
Ramp-up period exclusionnoyes

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

SituationTool
A quick capability checkrbd bench
No packages installable on the hostrbd bench
Establishing a baselinefio
Investigating latencyfio
Comparing configurationsfio
Automated regression testingfio with JSON output
# cleanup
rbd rm rbd-vms/bench

Quiz

Knowledge check · 4 questions

  1. Q1. What is the most significant limitation of `rbd bench` for performance work?

  2. Q2. Two total-based benchmark runs can be uncomparable with each other even when both complete successfully.

  3. 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.

  4. 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