Skip to main content
RunBook Academy

CephXXXVIII · RBD PerformanceRBD Performance

Why one slow OSD dominates RBD latency

Advanced⏱ ~17 minceph

What you'll learn

  • Explain why the slowest replica bounds every write
  • Estimate the blast radius of one slow OSD
  • Detect latency outliers before users do
  • Respond to a confirmed outlier

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

A single degraded device in a cluster of hundreds can make the entire cluster feel broken. The mechanism is simple and the arithmetic is stark, and once you have seen it, outlier detection becomes the monitoring you care most about.

The mechanism

A write completes when every OSD in the acting set has committed. So:

write latency = 2 × RTT + max(device latency across the acting set)

Not the average — the maximum. One OSD at 200 ms makes every write to every PG it participates in take 200 ms, regardless of how fast its peers are.

The blast radius

cluster: 100 OSDs, 4096 PGs, size 3
PG replicas total: 4096 × 3 = 12,288
PGs per OSD: 12,288 / 100 ≈ 123
share of PGs touched by one OSD: 123 / 4096 ≈ 3%

Three percent of PGs sounds small. But client objects distribute evenly across PGs, so roughly 3% of all operations hit that OSD — and for an application doing thousands of operations, essentially every user transaction touches it at some point. The user-visible effect is not “3% of requests are slow” but “the p99 is terrible and the application feels broken.”

Detecting it

ceph osd perf | sort -k2 -n | tail -10
osd  commit_latency(ms)  apply_latency(ms)
 47                  11                 13
 83                  12                 14
 12                 847                861

The check that matters is not an absolute threshold but the ratio to the cluster median:

ceph osd perf --format json | \
  jq -r '.osdstats.osd_perf_infos[] |
         "\(.id) \(.perf_stats.commit_latency_ms)"' | \
  sort -k2 -rn | head -5

Alert when any OSD exceeds, say, five times the median for its device class. An absolute threshold either misses outliers on slow hardware or fires constantly on fast hardware.

Responding

# 1. confirm it is the device, not the host
HOST=stor-04
DEVICE_ID=12
ceph osd metadata 12 | jq -r '.hostname, .devices'
ssh ${HOST} 'iostat -x 5 3'
ceph device get-health-metrics ${DEVICE_ID}

# 2. reduce its share of traffic while investigating
ceph osd reweight 12 0.5

# 3. if the device is failing, drain and replace
ceph osd out 12

Reweighting is the graduated response: it moves some PGs away, reducing the outlier’s blast radius without the full rebalance that marking it out triggers.

Quiz

Knowledge check · 4 questions

  1. Q1. One OSD out of 100 has 800 ms commit latency while the rest are under 15 ms. What is the user-visible effect?

  2. Q2. Alerting on OSD latency should use a fixed absolute threshold rather than deviation from the cluster median.

  3. Q3. Respond to a detected latency outlier during business hours.

    Monitoring flags osd.31 at 12 times the cluster median commit latency. Users have started reporting application slowness. The cluster is at 78% capacity and it is mid-morning on a weekday.

  4. Q4. Why does cluster average latency fail to reveal a single degraded OSD?

Passing score: 75%. Answers are checked in this browser.

Production discipline

Alert on per-OSD latency deviation from the median within each device class; it is the single highest-value Ceph alert and an absolute threshold cannot substitute for it. Use reweighting as the graduated response so an outlier can be relieved immediately without committing to a full rebalance at an inconvenient time.

Cross-course references

  • Kubernetes: one slow node in a service backend degrades p99 the same disproportionate way
  • Linux: the slowest device in a RAID array bounds every synchronous write identically