{
  "slug": "crush-placement",
  "term": "CRUSH",
  "aliases": [
    "Controlled Replication Under Scalable Hashing",
    "CRUSH placement"
  ],
  "definition": "CRUSH is a deterministic, pseudorandom placement algorithm that maps an identifier to storage targets using a weighted cluster hierarchy and placement rules.",
  "note": "Clients derive targets from a map and rule without a per-object directory. A rule selects distinct items of the requested type. The 2006 design retries collisions, failed devices and overloaded targets; failed devices remain in the hierarchy so only their data moves. [crush-paper]\n\nRules can separate replicas or encoded shards across hosts, racks or shared power. CRUSH provides placement, not an erasure code, consensus or an availability guarantee. [ceph-crush]\n\nStraw2 is local to a single bucket. With other inputs fixed, winner changes involve the reweighted item, possibly a subtree. This is not a whole-hierarchy guarantee that each move touches the reweighted leaf. The original paper's section 3.3 describes the separate ancestor-weight effect; its straw algorithm predates straw2. [crush-paper] [ceph-crush]\n\nceph osd crush reweight changes a CRUSH capacity weight; ceph osd reweight uses a 0-to-1 override without changing ancestor bucket weights. These interventions differ. [ceph-control]\n\nIn v19.2.0, straw2 can use position-dependent weights and substitute hash IDs. The returned item still comes from the bucket's item array; an alternate hash ID is not a replacement OSD destination. Keep these inputs fixed in weight-only comparisons. [ceph-straw2-source]",
  "related": [
    "rush-placement",
    "failure-domain",
    "placement-group",
    "erasure-coding",
    "mean-time-to-data-loss"
  ],
  "citations": [
    {
      "id": "crush-paper",
      "title": "Weil, Brandt, Miller and Maltzahn, CRUSH: Controlled, Scalable, Decentralized Placement of Replicated Data, SC 2006, sections 3 to 4.3",
      "url": "https://ceph.io/assets/pdfs/weil-crush-sc06.pdf",
      "accessed": "2026-11-07"
    },
    {
      "id": "ceph-crush",
      "title": "Ceph Squid documentation: CRUSH Maps, hierarchy and placement rules",
      "url": "https://docs.ceph.com/en/squid/rados/operations/crush-map/",
      "accessed": "2026-11-07"
    },
    {
      "id": "hesela-availability",
      "title": "Storage availability and correlated failures: placement boundaries",
      "url": "https://hesela.com/analyses/storage-availability-correlated-failures/",
      "accessed": "2026-10-13"
    },
    {
      "id": "ceph-straw2-source",
      "title": "Ceph v19.2.0 mapper.c: get_choose_arg_weights, get_choose_arg_ids and bucket_straw2_choose",
      "url": "https://github.com/ceph/ceph/blob/v19.2.0/src/crush/mapper.c",
      "accessed": "2026-11-07"
    },
    {
      "id": "ceph-control",
      "title": "Ceph Squid Control Commands: CRUSH weights and OSD override reweight",
      "url": "https://docs.ceph.com/en/squid/rados/operations/control/",
      "accessed": "2026-11-07"
    }
  ],
  "status": "shipping",
  "advantages": [
    {
      "text": "For the same input, rule and map, clients compute the same targets; the paper reports mapping times in the tens of microseconds in its tests.",
      "citationIds": [
        "crush-paper"
      ]
    },
    {
      "text": "The paper reports constant-time uniform-bucket selection and logarithmic-time tree-bucket selection; uniform-bucket changes reshuffle data. In its 1,000-device benchmark, marking half failed increased mapping time by 71%.",
      "citationIds": [
        "crush-paper"
      ]
    }
  ],
  "limitations": [
    {
      "text": "In the paper's capacity-addition model, the ideal moved fraction is added weight divided by final total weight; doubling capacity moves half the data. Hierarchy and bucket choices can add movement. Ceph also limits retries, with legacy choose_total_tries 19 and 50 suggested for typical clusters.",
      "citationIds": [
        "crush-paper",
        "ceph-crush"
      ]
    },
    {
      "text": "Placement across modeled domains reduces correlated-loss exposure, but the paper leaves the size of that gain unquantified without real failure data.",
      "citationIds": [
        "crush-paper"
      ]
    },
    {
      "text": "Bucket-local movement minimization is not a cluster-wide migration bound; a placement result does not establish completed migration or repair.",
      "citationIds": [
        "crush-paper",
        "ceph-crush"
      ]
    }
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-07",
  "provenance": [
    "crush-paper re-read 2026-10-23, sections 3.2, 3.3, 4.2 and 4.3, for rule steps, the three retry causes, movement bounds, bucket costs and the 71% failed-device figure.",
    "ceph-crush re-read 2026-10-23 for hierarchy factors, straw2 and the choose_total_tries tunable.",
    "The mean-time-to-data-loss entry links here because the paper names its future need for real failure data before quantitative models can estimate the effect of placement on mean time to data loss.",
    "A companion analysis on correlated failures is listed but not used in prose.",
    "2026-11-07: reconciled the hierarchy supplement with later production prose and relations; reviewed SC2006 section 3.3, Squid weight/override documentation and v19.2.0 choose arguments. No Ceph execution or new fleet measurement."
  ]
}
