Skip to main content
RunBook Academy

CephLXVII · Performance MethodologyPerformance Methodology

Working a blocked-ops report

Advanced⏱ ~18 minceph

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

Not yet marked complete on this device.

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

SlowBlocked
Completeseventuallynot until a condition changes
Causecontention, a slow devicea state that forbids progress
Health checkSLOW_OPSPG_AVAILABILITY, OSD_FULL, quotas
Fixperformance workchange 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

ConditionCheck
PG below min_sizeceph pg dump pgs | grep -v active
PG peering or inactiveceph -s PG states
OSD fullceph health detail | grep OSD_FULL
Pool quota exceededceph osd pool get-quota <pool>
CephFS quota exceededgetfattr -n ceph.quota.max_bytes <dir>
pause flag setceph osd dump | grep flags
Monitor quorum lostceph quorum_status
Client blocklistedceph 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

ConditionAction
PG below min_sizebring the missing OSD back, or accept the risk and lower min_size temporarily
PG peeringusually resolves; if stuck, restart the primary OSD
OSD fullfree space
Quota exceededraise the quota or delete data
pause setunset it
Quorum lostrestore monitors
Client blocklistedremove 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

  1. Q1. Why does a peering PG block I/O rather than serving from available copies?

  2. Q2. Operations are blocked rather than slow when the age of the oldest keeps growing and the operation count does not fall.

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

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