Disk - Logical Block (or Cluster)


A cluster is a group of sectors (block) on a hard disk drive that is addressed as one logical unit by the operating system.

In computer file systems, a cluster is the unit of disk space allocation for files and directories. To reduce the overhead of managing on-disk data structures, the file system does not allocate individual disk sectors, but contiguous groups of sectors, called clusters.

A cluster need not be physically contiguous on the disk; it may span more than one track or, if sector interleaving is used, may even be discontinuous within a track. This should not be confused with fragmentation, as the sectors are still logically contiguous.

Most HDD come from the factory with a low level format where block size = 512 bytes. The filesystem (in this case NTFS) can create cluster sizes of a multiple of 512 (with a default of 4k or 8 blocks).

A cluster is defined at the file system level and a blocks is defined at the physical disk.

Clusters are referenced under Windows Server as the Allocation Unit Size for the file system.

Balance between file and cluster size

A cluster is the smallest logical amount of disk space that can be allocated to hold a file. Storing small files on a filesystem with large clusters will therefore waste disk space; such wasted disk space is called slack space. For cluster sizes which are small versus the average file size, the wasted space per file will be statistically about half of the cluster size; for large cluster sizes, the wasted space will become greater. However, a larger cluster size reduces bookkeeping overhead and fragmentation, which may improve reading and writing speed overall.

Typical cluster sizes range from 1 sector (512 B) to 128 sectors (64 KiB).

Documentation / Reference

Powered by ComboStrap