Slow storage, networking and backup

Is my Ceph cluster slow because of consumer SSDs, and how do I prove it?

Sources checked · page updated · the question as people ask it: “My Ceph cluster (Proxmox hyper-converged) runs on consumer SATA or NVMe SSDs and has high write latency, low IOPS, slow recovery or slow ops - is it the SSDs, and how do I prove it?”

Quick answer

It is a documented cause: Ceph's BlueStore opens its drives with O_DIRECT and calls fsync() frequently, and Ceph's documentation says enterprise-class SSDs are best for Ceph because they almost always have power loss protection and do not suffer the cliffing client (desktop) models may show once a limited cache fills. Proxmox's Ceph benchmark paper rules out consumer and pro-sumer SSDs for Ceph. Prove it before buying anything: compare commit latency across OSDs with ceph osd perf, then run Proxmox's 4K sync-write fio test on a drive that is not an OSD.

What are you seeing?

Pick the closest symptom to open the matching diagnostic path. This is a guide to what to check and in what order; it does not read your system and does not diagnose it.

Find which OSDs are slow
  1. 1.Print per-OSD latency. This is read-only and safe on a live cluster. Use it comparatively: OSDs on the same drive model and host class should read alike.
    ceph osd perf
    ReadingColumns commit_latency(ms) and apply_latency(ms). We found no Ceph document giving a threshold. A set of OSDs sitting tens of milliseconds above their peers points at those devices; one Proxmox forum cluster on Crucial MX500s showed some OSDs at 81-124 ms while others sat at 3-4 ms.
  2. 2.Locate each slow OSD so you know which host and physical drive to look at.
    ceph osd find osd.<id>
    ReadingGives the OSD's location (its host). ceph osd tree shows the same OSDs grouped under their hosts.
  3. 3.Show utilization per OSD under its host, and check whether the slow OSDs sit on one node. This view does not name the drive model: identify the model of the slow OSDs' drives on that host. Proxmox's benchmark paper says a cluster that mixes disk types drops to the performance of the slowest disk.
    ceph osd df tree
    ReadingOSD utilization per OSD, grouped by host and device class, not by drive model. Read it beside ceph osd perf: if the high-latency OSDs sit on one host, find which drives they are on that host and test that model in path p3.
Read the slow-op warnings and rule out a failing drive
  1. 1.Check the health warnings. SLOW_OPS alone does not identify the SSD: Ceph lists extreme load, a slow storage device or a software bug as possible causes.
    ceph health detail
    ReadingSLOW_OPS means OSD or monitor requests are taking a long time. BLUESTORE_SLOW_OP_ALERT means BlueStore logged 'slow operation observed' latency lines, which Ceph says may indicate a failing drive that should be investigated. Start with the OSDs named.
  2. 2.On the host of a named OSD, dump its recent slow operations to see where the time went. dump_ops_in_flight and dump_historic_ops_by_duration give the same view for current and longest ops.
    ceph daemon osd.<id> dump_historic_slow_ops
    ReadingEach op carries an event timeline. Long gaps at 'waiting for subops from [X,Y]' mean the op waited on replica OSDs X and Y: check those OSDs' devices and the network to them, because the time was not necessarily spent on this OSD's own disk.
  3. 3.Check the kernel log on the OSD's host. Ceph lists a failing drive and kernel file-system bugs among the causes of slow requests and says to check dmesg for them.
    dmesg
    ReadingI/O errors, resets or timeouts against the OSD's device point to a failing drive rather than a merely slow one. A clean log rules out the two causes Ceph says to check in dmesg. It leaves a slow storage device (test it in path p3), an overloaded cluster (check system load and iostat), a ceph-osd bug, or, on HDD clusters with mClock, a suboptimal OSD shard configuration.
Measure 4K sync-write performance with fio
  1. 1.Do not clear a drive on the OSD bench alone. Ceph warns that the OSD bench can show unrealistic or inflated results and recommends establishing IOPS capacity with fio. Its arguments write 12,288,000 bytes (about 12 MB) in 4 KiB writes, spread over up to 100 objects of 4 MiB, through the live OSD, so expect it to add some load.
    ceph tell osd.0 bench 12288000 4096 4194304 100
    ReadingArguments are TOTAL_BYTES, BYTES_PER_WRITE, OBJ_SIZE, NUM_OBJS, so this writes 4 KiB blocks. A good number here does not outweigh a poor fio sync-write result: on the MX500 cluster above, osd bench reported about 13,058 IOPS at 4KB while commit latency sat at 81-124 ms.
  2. 2.Run Proxmox's published sync-write test, which gives figures you can compare directly. WARNING: Proxmox states 'This command will destroy any data on your disk.' Run it only on a drive that is not an OSD: before you create the OSD, or after the OSD is destroyed and the cluster has finished recovering. Replace /dev/sdx with that drive. The PDF prints the filename flag with a typographic dash; type two hyphens as shown here.
    Destructive. This command destroys what is on the device and cannot be undone. Confirm the device path twice and have a backup of anything you still need before running it.
    fio --ioengine=libaio --filename=/dev/sdx --direct=1 --sync=1 --rw=write --bs=4K --numjobs=1 --iodepth=1 --runtime=60 --time_based --group_reporting --name=fio --output-format=terse,json,normal --output=fio.log --bandwidth-log
    ReadingSingle job, queue depth 1, synchronous writes. We found no Ceph document giving a pass/fail threshold, so compare drives against each other and against Proxmox's table (January/February 2018, this command): Samsung SM863 240GB 17,485 IO/s at 0.06 ms; Intel DC S3510 120GB 12,518 IO/s; Samsung 850 EVO 1TB 339 IO/s at 2.94 ms; Crucial MX100 512GB 254 IO/s at 3.93 ms. Those are measurements of those exact models, not of any other drive.
Check the write cache setting, but do not treat it as the fix
  1. 1.Read the SATA or SAS drive's volatile write cache state. These are read-only queries. Ceph's paragraph on disabling the cache is about enterprise SSDs and HDDs with power loss protection, and it tells you to benchmark with fio and keep whichever setting measures best.
    hdparm -W /dev/sda; sdparm --get WCE /dev/sda; smartctl -g wcache /dev/sda; cat /sys/class/scsi_disk/0\:0\:0\:0/cache_type
    Reading'write back' in cache_type means the volatile cache is on; 'write through' means it is off. Changing it alters a drive setting, not data, and some drives need it reapplied at every boot. On consumer drives the forum record runs the other way: it helped MX500s only temporarily, and on Samsung 990 Pros it pushed latency above 50 ms.
  2. 2.For an NVMe drive, read feature 0x06 (Volatile Write Cache). Read-only.
    nvme get-feature /dev/nvme0 -f 0x06
    ReadingThe returned value shows whether the drive's volatile write cache is enabled. Setting it with nvme set-feature changes drive behaviour; measure with fio before and after if you try it.

Causes, how to confirm each, and whether hardware fixes it

CauseHow to confirmFixHardware?
Consumer SSDs without power loss protection are slow at the small synchronous writes BlueStore issues, and client models may cliff once their limited cache fillsfio sync-write result (IO/s and latency) far below enterprise drives on the same test, matching the high-latency OSDs in ceph osd perfReplace those OSDs with enterprise drives whose maker documents power loss protection; Ceph's current page states production clusters use enterprise-class drives with PLPYes
Mixed drive types: some OSDs or one node on slower drives hold the whole pool backceph osd perf names the high-latency OSDs and ceph osd df tree shows whether they sit on one host; identify the drive model on that host, then test it in path p3Make the pool uniform by replacing the slow drives; Proxmox says a mixed cluster drops to the performance of the slowest diskYes
A consumer SSD used as the shared DB/WAL device for several HDD OSDsCheck your own layout for which HDD OSDs share that one SSD for DB/WAL. If it is the cause, expect those OSDs to read high together in ceph osd perfUse a fast SSD or NVRAM for DB/WAL, balanced against the OSDs it serves; Proxmox warns that otherwise the shared device becomes the bottleneck for all linked OSDsYes
A failing drive rather than a slow modelBLUESTORE_SLOW_OP_ALERT in ceph health detail, and I/O errors, resets or timeouts against that device in dmesgInvestigate that one drive and replace it with a drive of the pool's own model, not from the list below; the rest of the pool may be fineYes
The op is waiting on replica OSDs or the cluster is overloaded, not on the local diskdump_historic_slow_ops shows long gaps at 'waiting for subops from [X,Y]', or system load and iostat show an overloaded nodeCheck the named replica OSDs with ceph osd perf and the network path to them, and reduce load before replacing any driveNo
If replacement SSDs are the fix

Buy only after fio measures poor 4K sync-write results on the installed drives. The list below filters on an enterprise form factor (U.2, U.3, E1.S or E3.S) or a SAS interface, plus a stated TBW or DWPD rating; our catalogue stores no power loss protection field, so confirm PLP in each model's own maker document, and check that your controller and backplane support each listed drive's interface (SAS or NVMe) before you buy.

When not to buy: Do not buy if fio shows the installed drives already sync-write at rates close to the enterprise figures, if dump_historic_slow_ops points at replicas or the network, or if dmesg shows one failing drive (replace that one). Do not add a few new drives beside the old ones in the same pool and expect it to speed up: Proxmox says a mixed cluster runs at the slowest disk.

Every row below meets: Enterprise form factor (U.2, U.3, E1.S, E3.S) · Rated endurance stated as DWPD · Rated endurance stated as TBW · SAS interface (enterprise 2.5-inch). A listing whose field is not stated is excluded from a required criterion and marked “not stated” on an optional one; nothing is assumed. What the catalogue cannot evaluate: power-loss protection (PLP) (no column stores PLP; the page must not claim any listed drive has it. Enterprise form factor is stored but is not PLP (f15: a PLP claim may be printed only per model from the maker's own document, as Solidigm PLI / Micron 7450 M.2 in s8/s9).); minimum DWPD/TBW threshold (no research fact gives a numeric endurance threshold for Ceph; criterion is not_null only and the page prints each drive's stated figure.); measured 4K sync-write performance (the catalogue stores no sync-write IOPS/latency; fit for Ceph is proven by the reader's own fio run (d1/d2), not by any stored field.). Check these on the maker's data sheet.
Product · part numberCapacityInterface · formConditionPrice$/TBCriteria
Dell 3.84TB SAS SSD Read Intensive 12G
MZILT3T8HBLS · details
3.84TBSAS-12G · 2.5" · 0.8 DWPDREFURB / USED Amazon: Used / LikeNew · sold by Tech on Time (SN RECORDED)$799.99$208.33Rated endurance stated as DWPDSAS interface (enterprise 2.5-inch)Buy on Amazon
Samsung PM9A3 7.68TB U.2 NVMe
MZQL27T6HBLA-00A07 · details
7.68TBNVMe-PCIe4 · U.2 · 1 DWPDREFURB / USED Amazon: Used / LikeNew · sold by Tech on Time (SN RECORDED)$2,715.99$353.64Enterprise form factor (U.2, U.3, E1.S, E3.S)Rated endurance stated as DWPDRated endurance stated as TBWBuy on Amazon
Samsung MZ-QL27T600 7.68TB U.2 NVMe
MZ-QL27T600 · details
7.68TBNVMe-PCIe4 · U.2 · 1 DWPDREFURB / USED Amazon: Used / VeryGood · sold by Arsenal PC · seller's note on the listing$3,499.99$455.73Enterprise form factor (U.2, U.3, E1.S, E3.S)Rated endurance stated as DWPDRated endurance stated as TBWBuy on Amazon
Micron 7450 PRO 3.84TB U.3
MTFDKCC3T8TFS · details
3.84TBNVMe-PCIe4 · U.3 · 1 DWPDREFURB / USED Amazon: Used / LikeNew · sold by CorteseInc$1,990.00$518.23Enterprise form factor (U.2, U.3, E1.S, E3.S)Rated endurance stated as DWPDRated endurance stated as TBWBuy on Amazon
Samsung PM9A3 7.68TB U.2 NVMe
MZQL27T6HBLA · details
7.68TBNVMe-PCIe4 · U.2 · 1 DWPDNEW Amazon: New / Unknown · sold by SiliconValleySeller (SN# Recorded)$4,099.00$533.72Enterprise form factor (U.2, U.3, E1.S, E3.S)Rated endurance stated as DWPDRated endurance stated as TBWBuy on Amazon
Micron 7600 PRO 3.84TB U.2 PCIe5
MTFDLAL3T8THG · details
3.84TBNVMe-PCIe5 · U.2 · 1 DWPDNEW Amazon: New / Unknown · sold by Hard2FindParts$2,599.00$676.82Enterprise form factor (U.2, U.3, E1.S, E3.S)Rated endurance stated as DWPDRated endurance stated as TBWBuy on Amazon
Samsung PM9A3 960GB U.2 NVMe
MZQL2960HCJR · details
0.96TBNVMe-PCIe4 · U.2 · 1 DWPDNEW Amazon: New / Unknown · sold by DiscTech (USA)$798.00$831.25Enterprise form factor (U.2, U.3, E1.S, E3.S)Rated endurance stated as DWPDRated endurance stated as TBWBuy on Amazon
WD Ultrastar DC SN655 7.68TB U.3
WUS5EA176ESP7E1 · details
7.68TBNVMe-PCIe4 · U.3NEW Amazon: New / Unknown · sold by vCloud Choice$8,334.11$1,085.17Enterprise form factor (U.2, U.3, E1.S, E3.S)Rated endurance stated as TBWBuy on Amazon
Samsung PM1643A 1.92TB SAS SSD
MZILT1T9HBJR · details
1.92TBSAS-12G · 2.5" · 1 DWPDNEW Amazon: New / Unknown · sold by SiliconValleySeller (SN# Recorded)$2,095.00$1,091.15Rated endurance stated as DWPDRated endurance stated as TBWSAS interface (enterprise 2.5-inch)Buy on Amazon
Samsung PM1643a 1.92TB SAS SSD
MZILT1T9HBJR-00007 · details
1.92TBSAS-12G · 2.5" · 1 DWPDNEW Amazon: New / Unknown · sold by SiliconValleySeller (SN# Recorded)$2,145.00$1,117.19Rated endurance stated as DWPDRated endurance stated as TBWSAS interface (enterprise 2.5-inch)Buy on Amazon
Tracked, currently unavailable

Prices are Amazon US, re-checked about once a day; newest price in this table . A click here is a click, not a purchase; we earn a commission on qualifying purchases. The table shows what the catalogue holds against the criteria, not an endorsement of any model for your server.

Read next on this site

Frequently asked questions

Will disabling the write cache fix my consumer SSDs in Ceph?

Do not count on it. Ceph's documentation says disabling the volatile write cache may increase IOPS and cut commit latency on enterprise SSDs and HDDs with power loss protection, and tells you to benchmark with fio and keep the best setting. On consumer drives, Proxmox forum users found it made Samsung 990 Pro latency worse (above 50 ms) and helped Crucial MX500s only for a while.

How do I check whether a particular SSD has power loss protection?

Read the maker's own document for that exact model; form factor alone does not prove it. Samsung's 2016 white paper describes capacitors in its enterprise SSDs that keep the controller, DRAM and NAND powered long enough to flush the cache, and Solidigm's D7-P5510 brief names its scheme power-loss imminent (PLI). Those statements cover the models they name, not other drives.

Does a UPS make consumer SSDs safe enough for Ceph?

Samsung's white paper says a UPS is not enough to prevent unexpected power loss, because a power supply glitch can cut power to a drive on its own, and client SSDs lose the pending write data held in DRAM when that happens.

My OSD bench numbers look fine. Why do VMs still crawl?

Ceph's mClock reference warns that the OSD bench may show unrealistic or inflated results depending on the drive configuration, and recommends establishing an OSD's IOPS capacity with fio instead. The value it sets at OSD start (osd_mclock_max_capacity_iops_ssd) comes from the same bench.

Sources

Every technical statement above rests on one of these documents, each read on the date shown. Where a document did not state something, the page says so rather than filling the gap.

  1. Ceph Hardware Recommendations (Squid documentation) - Solid State Drives, Write Caches, Benchmarking · checked
  2. Ceph Hardware Recommendations (latest documentation) · checked
  3. Samsung White Paper: Power Loss Protection in SSDs (2016) · checked
  4. Proxmox Ceph Benchmark - Hyper-converged infrastructure with Proxmox VE (2018/02) · checked
  5. Ceph Health checks - SLOW_OPS and BLUESTORE_SLOW_OP_ALERT · checked
  6. Ceph mClock Config Reference - OSD capacity / osd bench · checked
  7. Solidigm D7-P5510 Product Brief · checked
  8. Proxmox VE Administration Guide - Deploy Hyper-Converged Ceph Cluster (pveceph) · checked
  9. ceph(8) man page · checked
  10. Ceph Troubleshooting OSDs - Blocked Requests or Slow Requests · checked
  11. nvme-get-feature(1) documentation · checked

Where people hit this

Discussions we opened and read while researching this page. They are evidence that the problem occurs and of what people tried; no specification above is sourced to a forum post.

Share:WhatsAppFacebookPost on X