CephLXVIII · OSD LatencyOSD Latency
The device latency floor
What you'll learn
- State the latency floor for each device class
- Compute the achievable cluster latency from it
- Set expectations against the floor
- Identify when a device is below its class
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 request for 1 ms write latency on an HDD-backed pool cannot be met by any configuration change. Knowing the floor turns that from an investigation into a conversation about hardware.
The floors
| Device | 4k random read qd1 | 4k random write qd1 | Sustained random IOPS |
|---|---|---|---|
| HDD 7200 rpm | 5–15 ms | 5–15 ms | 80–180 |
| SATA SSD | 0.1–0.5 ms | 0.05–0.3 ms | 20k–90k |
| SAS SSD | 0.1–0.3 ms | 0.05–0.2 ms | 50k–200k |
| NVMe TLC | 60–150 µs | 20–80 µs | 200k–800k |
| NVMe Optane | 10–30 µs | 10–20 µs | 500k+ |
HDD latency is mechanical: a seek plus rotational delay. No firmware, driver, or Ceph setting reduces it.
From device floor to cluster latency
client write latency ≥ network RTT
+ OSD processing
+ slowest replica's device write
For a size=3 pool on HDD with a 0.2 ms network RTT:
≈ 0.2 ms (network)
+ 0.5 ms (OSD processing)
+ 10 ms (slowest of three HDD writes)
≈ 11 ms, before any queueing
The device term dominates so completely that everything else is noise — which is precisely why HDD clusters are configured with NVMe for the DB and WAL.
What the DB device changes
ceph osd metadata 12 | python3 -c '
import sys,json; d=json.load(sys.stdin)
print("data:", d.get("bluestore_bdev_type"), d.get("bluestore_bdev_dev_node"))
print("db: ", d.get("bluefs_db_type"), d.get("bluefs_db_dev_node"))'
BlueStore’s metadata operations — the RocksDB writes that record where data lives — go to the DB device. On an HDD OSD with an NVMe DB, those operations run at NVMe latency while the data writes run at HDD latency. For metadata-heavy workloads the improvement is substantial; for large-object streaming it is marginal.
Setting expectations
| Request | Achievable on HDD | Achievable on NVMe |
|---|---|---|
| p50 write under 1 ms | no | yes |
| p50 write under 15 ms | yes | yes |
| 50k IOPS per OSD | no | yes |
| 150 IOPS per OSD | yes | trivially |
# measure your actual floor rather than assuming the table
fio --name=floor --filename=/dev/sdX --direct=1 --rw=randread \
--bs=4k --iodepth=1 --runtime=30 --time_based --readonly
Identifying a device below its class
A device measuring well above its class range is failing or misconfigured:
smartctl -a /dev/sdX | grep -iE 'pending|reallocated|error'
smartctl -a /dev/sdX | grep -i 'rotation rate' # confirm it is what you think
nvme smart-log /dev/nvme0n1 | grep -iE 'percentage_used|media_errors'
hdparm -W /dev/sdX # write cache state
A consumer SSD in a cluster is a common finding: it meets its class latency briefly and then collapses when its SLC cache is exhausted.
Quiz
Knowledge check · 4 questions
Q1. Why do enterprise SSDs with power-loss protection outperform faster-specified consumer drives in Ceph?
Q2. A short benchmark is sufficient to evaluate an SSD for OSD use.
Q3. Respond to a latency requirement.
An application team requires p50 write latency under 2 ms from an HDD-backed pool with size=3. The current p50 is 12 ms. They ask what tuning would achieve it.
Q4. What does an NVMe DB device improve on an HDD-backed OSD, and what does it not?
Passing score: 75%. Answers are checked in this browser.
Production discipline
Measure your devices’ actual floor with a queue-depth-1 test rather than assuming published figures, and run long enough to exhaust any SLC cache. When a latency requirement is below the device floor, present the decomposition — it converts an open-ended tuning request into a hardware decision.
Cross-course references
- Kubernetes: node hardware sets a floor no scheduling policy can beat
- Linux: fsync latency without write cache protection is the same order-of-magnitude effect