Cluster (disk)

from Wikipedia, the free encyclopedia

A cluster or an allocation unit is a logical combination of data blocks of a file system used on a data storage device .

more details

The "allocation unit" or the "cluster" (from the English cluster , literally "[the] heap") is a technical term in the parlance of Microsoft MS-DOS and Windows , in other operating systems such units are usually "block" or more precisely " data block " " called. Both terms are used with the same meaning, but when using the term “block”, a clear distinction must be made between the data blocks of the data carrier and the blocks of the file system (= cluster ).

The file system can generally only address complete clusters; it is not possible to address individual sectors or even individual bytes within a cluster without the help of special programs. Therefore, files always occupy an integer number of clusters on a disk. The larger these clusters, the less administrative overhead there is on large files and the less external fragmentation of a file becomes . However, since half a cluster is not used on average at the end of each file (based on the assumption of random file sizes) and is wasted as internal fragmentation (slack space), larger clusters are disadvantageous in terms of the efficient use of the storage space of a data carrier, in particular when storing a large number of small files.

The maximum number of clusters possible on a disk varies depending on the file system. FAT16 only allows 65,524 (2 16 −12) clusters, FAT32 , on the other hand , supports up to 2 28 (268,435,456), NTFS even more than 18 trillion (more precisely 2 64 −1) clusters.

The maximum size of a file system results from the maximum number of clusters and the selected cluster size - typically between 512 and 32,768 bytes. For example, with a cluster size of only 512 bytes, a FAT32 file system can contain up to 128 gibibytes (around 137 gigabytes) (2 28  x 512 bytes); if larger clusters are used, the file system limit is correspondingly larger.

See also