{
  "slug": "static-wear-leveling",
  "term": "Static wear leveling",
  "aliases": [
    "static wear levelling"
  ],
  "definition": "Static wear leveling relocates infrequently updated data so that lightly worn occupied flash blocks can return to the write-allocation pool.",
  "note": "In the pinned Linux UBI implementation, ordinary wear-leveling work selects a lightly worn used eraseblock and a more-worn free destination; their erase-counter difference must be at least the configured threshold. Bit-flip-triggered scrubbing follows a separate branch. The condition is not a continuously enforced global wear-spread bound. [ubi]\n\nCONFIG_MTD_UBI_WL_THRESHOLD defaults to 4096 in that revision's build configuration. It is not a universal static-policy threshold or a managed-SSD setting. [ubi-kconfig]\n\nA worked example of dynamic leveling has rarely updated code occupying 25% of capacity and frequently updated data using the remaining 75%. Static leveling copies cold code into more-worn free blocks, releasing less-worn source blocks for reuse. The destination still needs retention margin; a block near wear-out can be unsuitable for persistent code. [macronix]\n\nRelocation adds flash writes, and cold here describes update frequency, not temperature. In a simulated drive with 1 MiB blocks and 11% over-provisioning under a skewed workload, one aggressive static policy reached an overall write amplification factor of 11.49, including garbage collection; section 2.2 attributes 5.4 to wear leveling. These are different counters, not two estimates of the same quantity. [jiao] OBP, DP and PWL are static policies evaluated in a 2025 extension of that work, which excludes dynamic wear leveling, so it cannot establish that every dynamic policy has the same tradeoffs. [jiao2025]",
  "status": "shipping",
  "advantages": [
    {
      "text": "Drawing on the endurance left in blocks that hold rarely rewritten data extends the apparent wear life of the device.",
      "citationIds": [
        "macronix"
      ]
    }
  ],
  "limitations": [
    {
      "text": "The pinned UBI configuration's 4096 default and lower 128/256 examples are implementation-specific guidance, not endurance ratings or universal tuning advice.",
      "citationIds": [
        "ubi-kconfig"
      ]
    }
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-05",
  "related": [
    "wear-leveling",
    "dynamic-wear-leveling",
    "ftl",
    "data-retention",
    "write-amplification",
    "hot-cold-data-separation",
    "effective-spare-factor",
    "over-provisioning",
    "greedy-garbage-collection"
  ],
  "citations": [
    {
      "id": "ubi",
      "title": "Linux UBI wl.c at c7decec2f2d2ab0366567f9e30c0e1418cece43f: subsystem overview and wear_leveling_worker candidate-selection branches.",
      "url": "https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux/+/c7decec2f2d2ab0366567f9e30c0e1418cece43f/drivers/mtd/ubi/wl.c",
      "accessed": "2026-11-05"
    },
    {
      "id": "macronix",
      "title": "Macronix. Wear Leveling in NAND Flash Memory. AN0289, revision 1, March 10, 2014, p. 2.",
      "url": "https://www.macronix.com/Lists/ApplicationNote/Attachments/1913/AN0289V1-Wear%20Leveling%20in%20NAND%20Flash%20Memory.pdf",
      "accessed": "2026-11-05"
    },
    {
      "id": "jiao",
      "title": "Jiao, Bhimani and Kim. Wear Leveling in SSDs Considered Harmful. HotStorage 2022, sections 1-2. DOI 10.1145/3538643.3539750.",
      "url": "https://www.cs.fsu.edu/~awang/courses/cop5611_s2024/wear-leveling-harmful.pdf",
      "accessed": "2026-10-23"
    },
    {
      "id": "hesela-foundations",
      "title": "Hesela: Wear Leveling, mechanisms and tradeoffs",
      "url": "https://hesela.com/tech/wear-leveling/",
      "accessed": "2026-10-18"
    },
    {
      "id": "jiao2025",
      "title": "Jiao and Yang. Wear Leveling in SSDs Considered Harmful: A Case for Capacity Variance. Electronics 14, 4169 (2025), sections 3-5.",
      "url": "https://mdpi-res.com/d_attachment/electronics/electronics-14-04169/article_deploy/electronics-14-04169.pdf",
      "accessed": "2026-10-18"
    },
    {
      "id": "ubi-kconfig",
      "title": "Linux UBI Kconfig: MTD_UBI_WL_THRESHOLD default and guidance (pinned source revision).",
      "url": "https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux/+/c7decec2f2d2ab0366567f9e30c0e1418cece43f/drivers/mtd/ubi/Kconfig",
      "accessed": "2026-11-05"
    }
  ],
  "provenance": [
    "ubi re-read 2026-10-23 at the pinned revision for low-to-high erase-counter moves and scrubbing.",
    "ubi-kconfig read 2026-10-23 at the same revision for the 4096 default and the 128 or 256 suggestion.",
    "macronix re-read 2026-10-23 for the 25%/75% code and data example and the retention caution.",
    "jiao re-read 2026-10-23 for the 1 MiB block, 11% over-provisioning setup and the 11.49 factor.",
    "The greedy-garbage-collection entry links here because the cited wear-leveling simulation runs its static policies on top of greedy block cleaning.",
    "A companion analysis on wear-leveling foundations is listed but not used in prose.",
    "2026-11-05: checked UBI candidate selection and the less-than rejection test, not the worker's reversed-direction comment. Equality meets this condition; other eligibility and failure paths remain. Source inspection only, not a UBI runtime experiment."
  ]
}
