{
  "slug": "subpacketization",
  "term": "Subpacketization",
  "aliases": [
    "sub-packetization"
  ],
  "definition": "Subpacketization is the number of base-field symbols stored by each node for one codeword in a vector erasure code.",
  "note": "Repair can select part of a fragment rather than fetch the entire fragment. A storage chunk can contain many codewords, so a coding symbol is not necessarily one network packet or one disk read. Scalar codes have a sub-packetization level of 1. [clay]\n\nFor a (20, 16) code repaired from 19 helpers, the evaluated construction uses a sub-packetization of 1024 and reads 256 symbols from each helper, so logical helper bytes are 19/64 (about 0.297) of the data stored on 16 nodes. This excludes sending the rebuilt fragment from a primary helper to its replacement. [clay]\n\nThe layout and size of sub-chunks determine whether selected data can be read efficiently. With a 64 kB chunk split into 1024 symbols, a worst-case repair reads 256 fragments of 64 bytes each. At a 4 kB read granularity only 1 kB of each 4 kB read is useful, so disk read is 4 times the data needed. [clay]\n\nThe CLAY sub-chunk formula needs shortening when q=d-k+1 does not divide n. Ceph v18.2.7 uses q^ceil(n/q): n=14, k=10, d=13 therefore needs 256 sub-chunks. Rounding the exponent down would describe a different construction. [ceph-clay-source]",
  "related": [
    "zigzag-code",
    "row-diagonal-parity",
    "piggybacking-code",
    "optimal-access-repair",
    "minimum-storage-regenerating-code",
    "erasure-coding",
    "codeword",
    "repair-read-amplification",
    "maximum-repair-load",
    "hitchhiker",
    "clay-code"
  ],
  "status": "shipping",
  "advantages": [
    {
      "text": "A helper can return a fraction of a chunk: with 64 sub-chunks per chunk, repair reads 16 of them, a quarter of the chunk.",
      "citationIds": [
        "clay-plugin-manual"
      ]
    }
  ],
  "limitations": [
    {
      "text": "High sub-packetization pushes sub-chunks below the device read size unless stripes grow; a 4 KB sub-chunk with 1024 sub-chunks and 16 data chunks needs a 64 MB stripe.",
      "citationIds": [
        "clay-plugin-manual"
      ]
    }
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-22",
  "citations": [
    {
      "id": "clay",
      "title": "Vajha et al. Clay Codes: Moulding MDS Codes to Yield an MSR Code. FAST 2018, 139-154; sections 2 and 5.",
      "url": "https://www.usenix.org/system/files/conference/fast18/fast18-vajha.pdf",
      "accessed": "2026-10-23"
    },
    {
      "id": "clay-plugin-manual",
      "title": "Ceph: CLAY code plugin, development documentation; helper ranges, sub-chunks and deprecation notice.",
      "url": "https://docs.ceph.com/en/latest/rados/operations/erasure-code-clay/",
      "accessed": "2026-10-23"
    },
    {
      "id": "hesela-lrc",
      "title": "Hesela: Local repair is not whole-node repair",
      "url": "https://hesela.com/analyses/lrc-repair-costs-locality/",
      "accessed": "2026-10-18"
    },
    {
      "id": "ceph-clay-source",
      "title": "Ceph v18.2.7: ErasureCodeClay::parse, shortening and sub-chunk count.",
      "url": "https://github.com/ceph/ceph/blob/v18.2.7/src/erasure-code/clay/ErasureCodeClay.cc",
      "accessed": "2026-11-22"
    }
  ],
  "provenance": [
    "clay re-read 2026-10-23, sections 2 and 5, for Table 2 parameters and the 64-byte fragment example.",
    "clay-plugin-manual re-read 2026-10-23 for sub-chunk counts and the stripe-size example.",
    "A companion analysis on local repair is listed but not used in prose.",
    "2026-11-22: linked the CLAY construction; reviewed shortening and distinguished helper-byte accounting from primary-forwarding traffic."
  ]
}
