Skip to main content
RunBook Academy

CephXCIII · Changing CRUSH TopologyChanging CRUSH Topology

CRUSH weight and OSD reweight

Advanced⏱ ~17 minceph

What you'll learn

  • Distinguish CRUSH weight from OSD reweight
  • Use each for its intended purpose
  • Predict the movement each causes
  • Recognise when neither is the right tool

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

Ceph has two weights per OSD and they are frequently confused. They serve different purposes and behave differently.

The two weights

ceph osd df
ID  CLASS  WEIGHT   REWEIGHT  SIZE     USE     %USE
 0  hdd    14.55190   1.00000  16 TiB  9.2 TiB  57.5
WeightSet byRepresentsPersists across
WEIGHT (CRUSH weight)ceph osd crush reweightthe device’s capacity, in TiBeverything
REWEIGHTceph osd reweighta 0–1 overridereset when the OSD is marked out and back in
ceph osd crush reweight osd.0 14.55190
ceph osd reweight osd.0 0.85

What each is for

CRUSH weight:
  should equal the device's usable capacity
  changed when the device changes size
  or set to 0 to drain permanently

reweight:
  a temporary adjustment to correct distribution
  superseded by the balancer in almost every case
  reset when the OSD goes out and comes back

The reweight mechanism predates the upmap balancer and is largely obsolete: the balancer achieves better distribution with less movement.

ceph balancer status
ceph balancer mode upmap

Predicting the movement

CRUSH weight change:
  the OSD's share of its bucket changes proportionally
  data moves in or out to match the new share
  reducing weight by 10% moves roughly 10% of its data away

reweight change:
  the OSD's selection probability changes
  affects many PGs, including correctly placed ones
  produces movement disproportionate to the correction
# before changing, know the OSD's contents
ceph osd df | awk -v o=0 '$1==o {print $5, "TiB weight,", $7, "used"}'

When neither is the right tool

SituationCorrect tool
Uneven distributionthe balancer, in upmap mode
Draining an OSD permanentlyceph orch osd rm
Draining temporarilyceph osd out
A device replaced with a different sizeCRUSH reweight to the new capacity
One OSD consistently fuller than peersthe balancer
Correcting an incorrect weightCRUSH reweight to the correct value
# the balancer, rather than manual reweighting
ceph balancer on
ceph balancer optimize plan
ceph balancer eval plan
ceph balancer execute plan

Quiz

Knowledge check · 4 questions

  1. Q1. What distinguishes `ceph osd crush reweight` from `ceph osd reweight`?

  2. Q2. A distribution correction applied with ceph osd reweight is silently lost the next time that OSD is marked out and back in.

  3. Q3. Correct a recurring imbalance.

    An operator has repeatedly applied `ceph osd reweight` to correct uneven utilisation, and the imbalance returns every few months.

  4. Q4. What should an OSD's CRUSH weight equal?

Passing score: 75%. Answers are checked in this browser.

Production discipline

Use the upmap balancer rather than ceph osd reweight for distribution — reweight corrections are reset by any out-and-in cycle and move far more data than the correction requires. Keep the CRUSH weight equal to the device’s usable capacity.

Cross-course references

  • Kubernetes: explicit scheduling constraints beat probability-based weighting
  • Linux: a targeted correction always moves less than a global parameter change