Configure the cluster size of the hard disk partition

The physical HDD is divided into sectors, which is the smallest unit of storage possible. The sector-size is defined during the low-level format performed by the HDD-manufacture (Standard 512 Bytes).
When formatting a HDD-partition it is divided into clusters with a certain cluster-size. A cluster is a group of sectors and can can only be occupied by one file, so if having a 10 KByte file and a 4 KByte cluster-size, the file would occupy 3 clusters and 12 KByte space. This would create a so called “slack” of 2 KByte.

There is the following relation between Cluster Count, Cluster Size and Partition Size:

Cluster Count * Cluster Size = Partition Size

Note the different filesystems(FAT, FAT32, NTFS, etc.) can impose a Max Cluster Count and Max Cluster Size.

Max Cluster Size 32K (64K WinNT) 32K 64K (4K [Compression](/article/winnt-ntfs-compress.html)) 32 MByte
Max Cluster Count 65526 268,435,445 (4,177,920 16Bit) 4,294,967,296 ?
Max Partition Size 2GB (4GB WinNT)8TB (Actual 2TB, 127GB 16Bit) 64 TB (Basic - 2TB) 64 ZB (Best 512 TB)
Min Partition Size 360 KByte (FAT12)[512 MByte](/article/fdisk-small-fat32.html) 10 MBytes ?
Max File Size 2GB (4GB WinNT)4GB 16EB (Basic - 2TB) 64 ZB (Best 512 TB)
Max File Name Length8.3 (255 VFAT)255 255 ?
Max Path Name Length260 260 32767 ?
Max Files in Partition65536 (32768 VFAT)4,194,304 4,294,967,295 ?
Max Files in Directory65536 (32768 VFAT)65536 4,294,967,295 ?
Max Files in Root 512 (256 VFAT) 65536 4,294,967,295 ?
Performance High (Small Volume)High High (Large Volume) High (Flash Drives)
File FragmentationHigh (First free location)High (First free location)Low (Free Space Bitmap)Low (Free Space Bitmap)
Compression 3rd Party 3rd Party Native ?
Access Control No No Native Native
Encryption 3rd Party 3rd Party Native ?
Resizable 3rd Party 3rd Party Native ?
Software RAID No No Native (Basic - No) ?
Recoverability Little Better (Several FATs) Best (Logged) Best (Logged)
Cross Platform Native 3rd Party 3rd Party 3rd Party

Note the abilities of the NTFS volumes are dependent on whether they are placed on basic or dynamic disks. More Info MS KB314343.
When a basic disk is converted to a dynamic disk, then any volumes that existed on the basic disk will still only be able to extend into unformatted areas next to them using diskpart. More Info MS KB225551.

Note the 16 Bit limit in FAT32 is only important if planning to use 16 bit disk tools such as DOS scandisk, which cannot allocate enough memory to handle a file allocation table (FAT) larger than 16 MByte.
There is also a limit in Win2k/XP not to create and format FAT32 partitions beyond 32 GByte to encourage usage of NTFS.

Note the VFAT (Virtual-FAT) is an extension of the FAT16 to support long filenames, but it can halve the amount of max files/directories because it uses an extra entry for storage of each long filename (If the filename is beyond the 8.3 mask). This can be important if having many files/directories with long filenames in the root like on a floppy disk.

To check the cluster size of an already formatted partition (Where X is the partition letter):

Chkdsk X:

To format a partition with specific cluster size:

  • In Win95 OSR2 and beyond it is possible to specify the cluster-size when formatting (Before the choice was made for you). With the parameter /Z one can specify a multiplier of sector size (Standard 512 bytes), so if using 8, then one will get a cluster size of 4096 bytes:

Format X: /Z:8

  • In WinNT the /FS parameter specifies filesystem (NTFS/FAT16/FAT32) and /A specifies cluster size (aka Allocation-unit):

Format X: /FS:NTFS /A:4096

Usually an cluster-size of 4 KByte seems to be a good choice as it matches the page size used in memory, but there is no standard optimal cluster-size which can be applied for every disk critical application in every environment. It depends on the HDD, Controller (If RAID also the selected Stripe-Size), Filesystem (FAT,NTFS, etc.) and the application itself. To find the optimal cluster-size:

  1. Backup the partition.
  2. Format the partition with the new cluster-size.
  3. Restore the backup.
  4. Benchmark the partition using the disk critical application.
  5. Repeat until optimal cluster-size is found.

Considerations about choosing cluster-size:

  • A small cluster size (4 KByte) is good when the partition will contain lots of small files, as it will minimize “slack”.
  • A large cluster size (16-32 KByte) is good when the partition will contain large files (Fileserver, video-editing, etc.), as it will lower the possibility of file fragmentation, and also makes the File Table (Maps files to what clusters they uses) smaller.
  • Windows 2000 cannot defrag a partition if the cluster size is larger than 4 KByte.

More Info MS KB39927
More Info MS KB93496
More Info MS KB100108
More Info MS KB118335
More Info MS KB120138
More Info MS KB140365
More Info MS KB154997
More Info MS KB184006
More Info MS KB224526
More Info MS KB240672
More Info MS KB310525
More Info MS KB310561
More Info MS KB314463
More Info MS KB314878