{
  "slug": "free-space-fragmentation",
  "term": "Free-space fragmentation",
  "aliases": [
    "free space fragmentation"
  ],
  "definition": "Free-space fragmentation is the division of a filesystem's available allocation space into separated contiguous runs.",
  "note": "The same number of free blocks can have different run sizes and locations. This constrains later allocation, but a scan of allocated file contents does not traverse free space itself. Geriatrix targets both allocated-file and free-space layout. Its publisher abstract and proceedings PDF disagree on the headline SSD percentage; neither is a universal aging penalty. Keep the workload and comparison denominator with a reported rate change. [geriatrix] [geriatrix-record]\n\nState the allocation unit when comparing layouts. With ext4 bigalloc, allocation-bitmap bits describe clusters rather than individual filesystem blocks. A 1 MiB cluster of 4 KiB blocks makes each bit cover 256 blocks and shrinks the bitmaps of a 2-terabyte filesystem from 64 MB to 256 KB, so equal free-unit counts can describe different capacities. [ext4-bigalloc]\n\nRun lengths alone do not establish alignment-sensitive capacity. For a free interval [s, e) and region size B, the count of complete aligned regions is max(0, floor(e/B) - ceil(s/B)); all addresses must use the same alignment origin. Hesela's synthetic examples isolate this geometry, not actual hugepage mappings, allocator success or device performance. [hesela-aligned-geometry]",
  "related": [
    "filesystem-aging",
    "dynamic-layout-score",
    "ssd-preconditioning",
    "allocation-bitmap",
    "fat-cluster-chain",
    "exfat",
    "ext4-bigalloc",
    "range-write",
    "winefs"
  ],
  "limitations": [
    "An occupancy percentage is not a free-extent distribution.",
    "Logical free runs do not reveal the physical NAND layout behind an SSD's mapping layer."
  ],
  "citations": [
    {
      "id": "geriatrix",
      "title": "Kadekodi, Nagarajan, Ganger and Gibson. Geriatrix: Aging what you see and what you don't see. USENIX ATC 2018, pp. 691-704, sections 4-6.",
      "url": "https://www.usenix.org/system/files/conference/atc18/atc18-kadekodi.pdf",
      "accessed": "2026-10-23"
    },
    {
      "id": "conway19",
      "title": "Conway et al. Filesystem Aging: It's more Usage than Fullness. HotStorage 2019, sections 3-4 and Figure 3.",
      "url": "https://files.usenix.org/s3fs-public/cdn/hotstorage19-paper-conway.pdf",
      "accessed": "2026-10-14"
    },
    {
      "id": "ext4-bigalloc",
      "title": "Linux kernel documentation: ext4 bigalloc and clustered allocation",
      "url": "https://docs.kernel.org/filesystems/ext4/bigalloc.html",
      "accessed": "2026-10-23"
    },
    {
      "id": "geriatrix-record",
      "title": "USENIX ATC 2018. Geriatrix publisher abstract, whose headline SSD percentage differs from the proceedings PDF.",
      "url": "https://www.usenix.org/conference/atc18/presentation/kadekodi",
      "accessed": "2026-11-14"
    },
    {
      "id": "hesela-aligned-geometry",
      "title": "Hesela. A long free extent can still miss the boundary: executable synthetic geometry.",
      "url": "https://hesela.com/analyses/filesystem-aging-free-space-fragmentation/#aligned-geometry",
      "accessed": "2026-11-14"
    }
  ],
  "status": "shipping",
  "advantages": [
    {
      "text": "A free-run distribution exposes allocation constraints that an occupancy figure alone cannot show.",
      "citationIds": [
        "geriatrix"
      ]
    }
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-14",
  "provenance": [
    "geriatrix re-read 2026-10-23 for the dual fragmentation target and the 30% and 80% figures from the abstract. ext4-bigalloc re-read for the 1 MiB cluster example.",
    "The ssd-preconditioning entry links here because aging free space is one way to set a filesystem state before a measurement, alongside device-level preparatory writes.",
    "2026-11-14: removed the unqualified headline percentage, reconciled with the existing Observatory source/denominator discussion; source versions are not interchangeable.",
    "2026-11-14: added original deterministic geometry illustration; no hardware measurement or WineFS performance replication."
  ]
}
