Clusters (Allocation Units)

Reprinted, with permission, from The PC Guide
Clusters (Allocation Units)
 Reference Guide - Hard Disk Drives 

As described here, the smallest unit of space on the hard disk that any software can access is the sector, which contains 512 bytes. It is possible to have an allocation system for the disk where each file is assigned as many individual sectors as it needs. For example, a 1 MB file would require approximately 2,048 individual sectors to store its data.

Under the FAT file system (and in fact, most file systems) individual sectors are not used. There are several performance reasons for this. It can get cumbersome to manage the disk when files are broken into 512-byte pieces. A 2 GB disk volume using 512 byte sectors managed individually would contain over 4 million individual sectors, and keeping track of this many pieces of information is time- and resource-consuming. Some operating systems do allocate space to files by the sector, but they require some advanced intelligence to do this properly. FAT was designed many years ago and is a simple file system, and is not capable of managing individual sectors.

What FAT does instead is to group sectors into larger blocks that are called clusters, or allocation units. The cluster size is determined primarily by the size of the disk volume: generally speaking, larger volumes use larger cluster sizes. For hard disk volumes, each cluster ranges in size from 4 sectors (2,048 bytes) to 64 sectors (32,768 bytes). Floppy disks use much smaller clusters, and in some cases use a cluster of size of just 1 sector. The sectors in a cluster are continuous, so each cluster is a continuous block of space on the disk.

Cluster sizing (and hence partition or volume size, since they are directly related) has an important impact on performance and disk utilization. The cluster size is determined when the disk volume is partitioned. Certain utilities (like Partition Magic) can alter the cluster size of an existing partition (within limits) but for the mostpart, once the partition size is selected it is fixed.

Every file must be allocated an integer number of clusters--a cluster is the smallest unit of disk space that can be allocated to a file, which is why clusters are often called allocation units. This means that if a volume uses clusters that contain 8,192 bytes, an 8,000 byte file uses one cluster (8,192 bytes on the disk) but a 9,000 byte file uses two clusters (16,384 bytes on the disk). This is why cluster size is so important in making sure you maximize the efficient use of the disk--larger cluster sizes result in more wasted space. This issue is given a full treatment here.

Next: File Chaining and FAT Cluster Allocation