{
  "slug": "allocation-unit",
  "term": "Filesystem allocation unit",
  "aliases": [
    "allocation unit",
    "allocation cluster",
    "filesystem cluster"
  ],
  "definition": "A filesystem allocation unit is a granularity at which a filesystem allocator reserves storage space, with the unit and rules depending on the format.",
  "note": "In exFAT, a cluster consists of one or more consecutive volume sectors; its byte size follows from the sector-size and sectors-per-cluster fields. Allocation state is tracked per cluster. [exfat-geometry]\n\nAn allocation unit need not equal a filesystem block. Ext4 bigalloc allocates clusters containing multiple blocks, without changing the block-addressed layout. A larger cluster makes allocation coarser, not the drive's logical sectors larger. [ext4-bigalloc]\n\nAllocation can also be finer than a block. FreeBSD newfs exposes separate block and fragment sizes for UFS1/UFS2, permitting power-of-two fragment sizes from one eighth of a block up to a whole block. A cluster is not a universal name for the smallest allocation unit. [freebsd-newfs]\n\nAllocation granularity alone does not determine a file's total storage cost: ext4 inline data can live inside an inode without a separate data block. Likewise, a volume's logical cluster number is not a guaranteed physical HDD-sector location. [ext4-inline] [windows-clusters]\n\nIn the historical Berkeley FFS design, extending a fragment-backed tail can allocate new space and copy the existing tail. Repeated small extensions can repeat that work. Final allocation size alone does not reveal this copying history; this is not a NAND write-amplification measurement. [ffs1984]\n\nFilesystem geometry and reporting units are distinct. For statvfs, f_blocks, f_bfree and f_bavail are counted in f_frsize units; the API does not guarantee meaningful values for every field on every filesystem. This is a filesystem report, not a per-file allocation map. [linux-statvfs]",
  "status": "shipping",
  "advantages": [],
  "limitations": [
    {
      "text": "A cluster size is not by itself an atomic-write or durability guarantee.",
      "citationIds": [
        "exfat-geometry",
        "ext4-bigalloc"
      ]
    }
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-02",
  "related": [
    "filesystem-block",
    "ext4-bigalloc",
    "exfat",
    "logical-sector",
    "physical-sector",
    "allocation-bitmap",
    "file-extent",
    "statvfs"
  ],
  "citations": [
    {
      "id": "exfat-geometry",
      "title": "Microsoft exFAT specification: sections 3.1.14, 3.1.15, 5.1 and 7.1.5",
      "url": "https://learn.microsoft.com/en-us/windows/win32/fileio/exfat-specification",
      "accessed": "2026-11-01"
    },
    {
      "id": "ext4-bigalloc",
      "title": "Linux kernel documentation: ext4 clustered allocation",
      "url": "https://docs.kernel.org/filesystems/ext4/bigalloc.html",
      "accessed": "2026-11-01"
    },
    {
      "id": "ext4-inline",
      "title": "Linux kernel documentation: ext4 inline data",
      "url": "https://docs.kernel.org/filesystems/ext4/inlinedata.html",
      "accessed": "2026-11-01"
    },
    {
      "id": "windows-clusters",
      "title": "Microsoft: clusters and extents, VCN/LCN and physical-mapping limits",
      "url": "https://learn.microsoft.com/en-us/windows/win32/fileio/clusters-and-extents",
      "accessed": "2026-11-01"
    },
    {
      "id": "freebsd-newfs",
      "title": "FreeBSD newfs(8): separate block-size and fragment-size parameters",
      "url": "https://man.freebsd.org/cgi/man.cgi?query=newfs&sektion=8&format=html",
      "accessed": "2026-11-01"
    },
    {
      "id": "ffs1984",
      "title": "McKusick, Joy, Leffler and Fabry. A Fast File System for UNIX. ACM TOCS 2(3), 1984, section 3.1, pp. 186-187.",
      "url": "https://cs162.org/static/readings/FFS84.pdf",
      "accessed": "2026-11-01"
    },
    {
      "id": "linux-statvfs",
      "title": "Linux man-pages: statvfs(3), block-counter units and field-availability limits",
      "url": "https://man7.org/linux/man-pages/man3/statvfs.3.html",
      "accessed": "2026-11-01"
    }
  ],
  "provenance": [
    "Filesystem-level definition synthesized from ext4, exFAT and FreeBSD documentation; no universal file-allocation formula or device performance result is claimed.",
    "The atomicity and durability limitation is an engineering inference: allocation geometry alone specifies no completion or persistence contract."
  ]
}
