CephLXVII · Performance MethodologyPerformance Methodology
Working a blocked-ops report
What you'll learn
- Distinguish blocked from slow operations
- Identify the conditions that block I/O
- Diagnose each blocking condition
- Restore progress
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
A slow operation completes eventually. A blocked one does not, and the causes are structural rather than performance-related.
Slow versus blocked
| Slow | Blocked | |
|---|---|---|
| Completes | eventually | not until a condition changes |
| Cause | contention, a slow device | a state that forbids progress |
| Health check | SLOW_OPS | PG_AVAILABILITY, OSD_FULL, quotas |
| Fix | performance work | change the blocking condition |
The distinguishing observation is whether the age of the oldest operation keeps growing without any completing:
ceph health detail | grep -o 'blocked for [0-9]* sec'
sleep 60
ceph health detail | grep -o 'blocked for [0-9]* sec'
If the number grows by 60 and the count does not fall, operations are blocked rather than slow.
The blocking conditions
| Condition | Check |
|---|---|
PG below min_size | ceph pg dump pgs | grep -v active |
| PG peering or inactive | ceph -s PG states |
| OSD full | ceph health detail | grep OSD_FULL |
| Pool quota exceeded | ceph osd pool get-quota <pool> |
| CephFS quota exceeded | getfattr -n ceph.quota.max_bytes <dir> |
pause flag set | ceph osd dump | grep flags |
| Monitor quorum lost | ceph quorum_status |
| Client blocklisted | ceph osd blocklist ls |
# a single sweep
ceph -s
ceph health detail
ceph osd dump | grep flags
ceph quorum_status --format json 2>/dev/null | python3 -c '
import sys,json; d=json.load(sys.stdin); print("quorum:", d["quorum_names"])'
Diagnosing each
# PGs not active
ceph pg dump pgs | awk '$10 !~ /active/ {print $1, $10}' | head
# why a specific PG is stuck
ceph pg 3.1f query | python3 -c '
import sys,json; d=json.load(sys.stdin)
rs=d.get("recovery_state",[])
for s in rs[:2]: print(s.get("name"), "|", s.get("comment","")[:100])'
The recovery_state and blocked_by fields name what the PG is waiting
for, which is usually an OSD that is down.
ceph pg 3.1f query | python3 -c '
import sys,json; d=json.load(sys.stdin)
print("blocked_by:", d.get("peer_info") and [p["peer"] for p in d.get("peer_info",[])])
print("acting:", d.get("acting"), "up:", d.get("up"))'
Restoring progress
| Condition | Action |
|---|---|
PG below min_size | bring the missing OSD back, or accept the risk and lower min_size temporarily |
| PG peering | usually resolves; if stuck, restart the primary OSD |
| OSD full | free space |
| Quota exceeded | raise the quota or delete data |
pause set | unset it |
| Quorum lost | restore monitors |
| Client blocklisted | remove the entry after establishing why |
ADDR=10.20.0.11
ceph osd blocklist ls
ceph osd blocklist rm ${ADDR}
Lowering min_size deserves particular care: it permits I/O with less
redundancy than the pool was designed for, and it must be restored.
Quiz
Knowledge check · 4 questions
Q1. Why does a peering PG block I/O rather than serving from available copies?
Q2. Operations are blocked rather than slow when the age of the oldest keeps growing and the operation count does not fall.
Q3. Diagnose stopped I/O.
A pool has stopped serving I/O entirely. HEALTH_ERR is present. The oldest blocked operation is at 400 seconds and the count is not falling.
Q4. Name four conditions that block I/O without being performance problems.
Passing score: 75%. Answers are checked in this browser.
Production discipline
Distinguish blocked from slow by watching whether the operation count
falls — a growing age with a static count means a structural condition, and
performance tuning cannot help. Run the sweep (ceph -s, health detail,
OSD flags, quorum status, quotas) before investigating anything else.
Cross-course references
- Kubernetes: a Pending pod and a slow pod need entirely different investigations
- Linux: a blocked process in D state has a structural cause, not a performance one