Allocation unit size

Also known as: cluster size

On this page 7

Allocation unit size, also called cluster size, is the smallest amount of disk space that a file system can assign to a file. In OS storage on desktop operating systems, every file occupies a whole number of allocation units, so a 1-byte file still consumes one full cluster, and a file that is one byte larger than a cluster consumes two.

The value is chosen when a volume is formatted and normally stays fixed for the life of that file system. It shapes three things at once: how much space is lost to partially filled clusters, how large a volume the file system can address, and how much metadata the system must track to describe each file.

How allocation units map files to disk sectors

A storage device exposes sectors, usually 512 bytes or 4,096 bytes, while a file system groups a fixed number of consecutive sectors into one allocation unit. The file system then tracks clusters instead of individual sectors, which keeps allocation tables and bitmaps much smaller.

In FAT32 and exFAT, the File Allocation Table or an allocation bitmap records which clusters are free and how they chain together. In NTFS, a cluster bitmap marks used clusters and each file record lists its data as runs of contiguous clusters. Linux file systems such as ext4 use the word block for the same concept, and the default ext4 block is 4 KB.

The following table shows the default allocation unit sizes for common desktop file systems on typical volume sizes.

File systemTypical defaultAllowed rangeNotes
NTFS4 KB512 bytes to 2 MBLarger sizes needed above 16 TB volumes
FAT324-32 KB512 bytes to 32 KBDefault grows with volume size
exFAT32-128 KB512 bytes to 32 MBLarge defaults suit flash media
ext44 KB1-64 KBCalled block size; page size limits mounting
APFS4 KBFixed at 4 KBNot chosen by the user
Typical default allocation unit sizes

Slack space and the space-efficiency trade-off

The unused part of a file’s last cluster is called slack space, and on average each file wastes about half a cluster. With many small files, larger clusters therefore waste significantly more space, while with few large files the loss is negligible.

The table below estimates the overhead for a volume holding 100,000 small files with an average size of 6 KB.

Cluster sizeSpace per fileApproximate total slackOverhead
4 KB8 KBAbout 200 MBLow
16 KB16 KBAbout 1 GBModerate
64 KB64 KBAbout 5.8 GBVery high
128 KB128 KBAbout 12 GBSevere
Estimated slack space for 100,000 files of about 6 KB

NTFS reduces the problem for very small files by storing them as resident data inside the Master File Table record, typically when the content is below roughly 700 bytes, so those files occupy no separate cluster at all. Compression and sparse files on NTFS also require clusters of 4 KB or smaller.

Performance and volume size limits

Larger clusters can improve sequential throughput and reduce fragmentation, because large files need fewer, longer runs and the allocation map is smaller. On modern SSDs and NVMe drives, however, the benefit is usually small, and the default size is the right choice for general use.

Cluster size also limits maximum volume size. NTFS addresses up to 2^32 clusters in current Windows implementations, so 4 KB clusters allow volumes up to 16 TB, and 64 KB clusters allow 256 TB. FAT32 is limited in practice by the size of the allocation table, which is one reason Windows refuses to format FAT32 volumes above 32 GB with its own tools.

Alignment matters as well. An allocation unit should be a multiple of the physical sector and of the flash page size; a mismatch forces the drive to perform read-modify-write cycles that lower speed and increase wear on SSDs.

Allocation unit size is a file system parameter, which distinguishes it from physical properties of the drive and from structures in the partition table. The comparison below separates terms that are often mixed up.

TermDefined byTypical sizeCan the user change it
Allocation unit (cluster)File system at format time4 KB to 128 KBYes, by reformatting
Logical sectorDrive firmware interface512 bytes or 4 KBRarely, with vendor tools
Physical sectorDrive hardware4 KB on modern drivesNo
Partition alignmentPartition table offsets1 MB boundaryYes, when partitioning
Memory pageProcessor and kernel4 KB on x86-64No
Related storage units and where they are defined

Choosing an allocation unit size

The safest rule is to keep the default unless the workload is known and uniform. Specialized volumes justify a deliberate choice, as the decision table shows.

WorkloadSuggested sizeReason
System and general dataDefault, usually 4 KBMixed file sizes and full feature support
Video editing or media archive64 KBVery large files, fewer allocation records
Database or virtual machine files64 KB on NTFS or ReFSMatches large I/O patterns recommended by vendors
USB flash drive with exFATDefault 32-128 KBAligns with flash erase blocks
Millions of small files4 KB or smallerKeeps slack space low
Choosing a cluster size by workload
  • Changing the size requires reformatting, which erases the volume unless data is copied off first.
  • Some tools convert in place, but they carry a real risk of data loss and need a verified backup.
  • On NTFS, sizes above 4 KB disable built-in file compression.

A plain-language summary

Think of a disk as a parking garage painted with spaces of one fixed size. Every file must park in whole spaces. A tiny scooter still takes a full space, and a long truck takes several. The allocation unit size is the size of each painted space.

Small spaces waste little room when most vehicles are small, but the garage needs a bigger directory of who parks where. Large spaces make big vehicles easy to park but waste room when many small ones arrive. The key point is that the default size fits most people, and only special uses justify changing it.

An example from practice

A video production studio prepares a new 8 TB external drive for raw camera footage. Each clip is between 2 GB and 40 GB, and the drive will hold only footage, never documents or project caches. The technician formats it with NTFS and an allocation unit size of 64 KB.

With about 1,500 clips on the drive, total slack space is under 50 MB, which is irrelevant at this capacity. The cluster bitmap is sixteen times smaller than with 4 KB clusters, and copying footage produces fewer fragmented runs. A second drive used for project files containing hundreds of thousands of small cache files is left at the 4 KB default, where 64 KB clusters would have wasted many gigabytes. The outcome is two drives tuned for two different workloads with no measurable downside.