CephLXXIX · Slow OpsSlow Ops
Correlating slow ops with cluster state
What you'll learn
- Follow a systematic correlation procedure
- Use cluster state to narrow the cause quickly
- Reach a specific attribution
- Record the correlation for future incidents
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
The cluster state at the moment of a slow ops report narrows the cause sharply, and reading it takes one command. Working from state to cause is faster than working from evidence to hypothesis.
The decision procedure
flowchart TD
A[SLOW_OPS reported] --> B{OSDs down?}
B -->|yes| C[The down OSDs and their cause]
B -->|no| D{Recovery running?}
D -->|yes| E{Slow ops concentrated?}
E -->|yes| F[A fault exposed by recovery]
E -->|no| G[Recovery load]
D -->|no| H{Capacity warnings?}
H -->|yes| I[Nearfull or full]
H -->|no| J{Scrub running?}
J -->|yes| K[Scrub contention]
J -->|no| L{One OSD or many?}
L -->|one| M[Device or host]
L -->|many| N[Network or client]
The single command
ceph -s
cluster:
health: HEALTH_WARN
47 slow ops, oldest one blocked for 92 sec
services:
osd: 96 osds: 95 up, 96 in ← one OSD down
data:
pgs: 3891 active+clean
102 active+recovering+degraded ← recovery running
That output answers three of the branches at once: an OSD is down, recovery is running, and no capacity warning is present.
The correlation table
| Cluster state | Most likely cause | Confirm with |
|---|---|---|
| OSDs down + slow ops | the failure and its recovery | ceph osd tree |
| Recovery + slow ops, spread | recovery load | pause test |
| Recovery + slow ops, concentrated | a fault recovery exposed | ceph osd perf |
| Nearfull + slow ops | capacity pressure on some OSDs | ceph osd df |
| Scrubbing + slow ops | scrub contention | noscrub and drain |
| Nothing else + one OSD | device or host | device metrics |
| Nothing else + many OSDs | network or a slow replica | iperf3, flag points |
| Flapping + slow ops | network | interface counters |
Reaching the attribution
# a compact evidence gather
{
echo "== state"; ceph -s
echo "== health"; ceph health detail | head -30
echo "== osd perf"; ceph osd perf | sort -k2 -rn | head -5
echo "== flags"; ceph osd dump | grep flags
echo "== slow op stages"
for o in $(ceph health detail | grep -oE 'osd\.[0-9]+' | sort -u | head -3); do
echo "-- $o"
ceph daemon "$o" dump_ops_in_flight 2>/dev/null | python3 -c '
import sys,json
from collections import Counter
d=json.load(sys.stdin)
c=Counter(op.get("type_data",{}).get("flag_point") for op in d.get("ops",[]))
[print(" %4d %s" % (v,k)) for k,v in c.most_common(3)]' 2>/dev/null
done
} > /tmp/slowops-$(date +%s).txt
One script, one file, everything the correlation needs.
Recording it
Slow ops incident, 2026-08-18 14:02
State: 1 OSD down, recovery running, no capacity warnings
Spread: 14 OSDs across 9 hosts
Flag point: waiting for subops from [31] dominant
Attributed: osd.31 — device with 74 pending sectors
Action: drained, replaced; slow ops cleared
Time to attribution: 12 minutes
Recording the time to attribution is what shows whether the procedure is improving.
Quiz
Knowledge check · 4 questions
Q1. Why does `ceph -s` belong first in a slow ops investigation?
Q2. Gathering all available evidence before considering causes is the most reliable approach.
Q3. Attribute a slow ops report systematically.
SLOW_OPS is reported. The responder wants to reach a specific attribution quickly rather than investigating everything.
Q4. What distinguishes recovery load from a fault that recovery exposed?
Passing score: 75%. Answers are checked in this browser.
Production discipline
Run ceph -s before gathering any specific evidence — it eliminates
most causes in one command and keeps the investigation from accumulating
observations. Record the cluster state, the attribution, and the time
taken; the record is what makes the next incident faster.
Cross-course references
- Kubernetes: checking cluster events before pod logs narrows the same way
- Linux: system state before process-level detail is the standard triage order