Configure the cluster size of the hard disk partition
1 January 2000 by Snakefoot | Comment » | Trackback OffThe 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 Amount, Cluster Size and Partition Size:
Note the abilities of the NTFS volumes are dependent on whether they are placed on basic or dynamic disks. More Info MS KB Q314343.
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 KB Q225551.
Note the 16 Bit limit in FAT32 is only important if planning to use 16 bit disk tools such as DOS scandisk, which cannot handle 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):
More Info MS KB Q93496
More Info MS KB Q100108
More Info MS KB Q118335
More Info MS KB Q120138
More Info MS KB Q140365
More Info MS KB Q154997
More Info MS KB Q184006
More Info MS KB Q224526
More Info MS KB Q240672
More Info MS KB Q310525
More Info MS KB Q310561
More Info MS KB Q314463
More Info MS KB Q314878
Credits pureperformance.com
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 Amount, Cluster Size and Partition Size:
Note the different filesystems(FAT, FAT32, NTFS, etc.) can impose a Max Cluster Amount or Max Cluster Size.Cluster Amount * Cluster Size = Partition Size
| FAT16 | FAT32 | NTFS | |
|---|---|---|---|
| Max Cluster Size | 32K (64K WinNT) | 32K | 64K (4K Compression) |
| Max Cluster Amount | 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) |
| Min Partition Size | 360 KByte (FAT12) | 512 MByte | 10 MBytes |
| Max File Size | 2GB (4GB WinNT) | 4GB | 16EB (Basic - 2TB) |
| Max File Name Length | 8.3 (255 VFAT) | 255 | 255 |
| Max Path Name Length | 260 | 260 | 32767 |
| Max Files in Partition | 65536 (32768 VFAT) | 4,194,304 | 4,294,967,295 |
| Max Files in Directory | 65536 (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) |
| Compression | 3rd Party | 3rd Party | Native |
| Access Control | No | No | 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) |
| Cross Platform | Native | 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 KB Q314343.
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 KB Q225551.
Note the 16 Bit limit in FAT32 is only important if planning to use 16 bit disk tools such as DOS scandisk, which cannot handle 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):
To format a partition with specific cluster size:Chkdsk X:
- 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
- Backup the partition.
- Format the partition with the new cluster-size.
- Restore the backup.
- Benchmark the partition using the disk critical application.
- Repeat until optimal cluster-size is found.
- 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 KB Q93496
More Info MS KB Q100108
More Info MS KB Q118335
More Info MS KB Q120138
More Info MS KB Q140365
More Info MS KB Q154997
More Info MS KB Q184006
More Info MS KB Q224526
More Info MS KB Q240672
More Info MS KB Q310525
More Info MS KB Q310561
More Info MS KB Q314463
More Info MS KB Q314878
Credits pureperformance.com
Tags:
Category:
Updated: 15 June 2008