tllcurv.gif (1047 bytes)  

 

 

 

 

 

Home

Free Downloads

Product FAQs (NT)

Product FAQs (OpenVMS)

Product Alerts

Technical References

Links

brlcurv.gif (1043 bytes)

Cluster Size

When you format an NTFS partition, you usually are given a choiceof cluster sizes: 512 bytes, or the default. The default sizes are:

Partition Size (MB)

Cluster Size

Up to 512

512 bytes

513 - 1024

1 kilobyte

1025 - 2048

2 kilobytes

More than 2048

4 kilobytes

When you format an NTFS partition using Disk Administrator, you havea choice between the default and 512 bytes. If you want some other cluster size, you must run format/d:<size> from the command line (where " d " is the drive letter of the partition). Your choices arelimited to the four sizes listed above, as well as 8, 16, 32 and 64 kilobytes. Note, however, that compressionis not supported on partitions with a cluster size of more than 4 kilobytes. Now, how do you decide which sizeto use?

Disk Space Wasted by Clusters

Data is written to disks in units of the cluster size. If you havea 1024 byte cluster size, the actual space used by any file will always be a multiple of 1 kilobyte. So, the differencebetween the actual amount of data in the file and the amount of space used on the disk will always be between 0and 1023 bytes. That means that for each file on the disk, you will have an average of 512 bytes of wasted space.For any disk or partition, multiply the number of files by one-half the cluster size to get the approximate amountof unused space lost due to the disk cluster size.

Suppose you are going to have 50,000 files on a partition. The approximateamount of wasted space by cluster size will be:

Cluster Size

Wasted Bytes

512 bytes

12,800,000 

1 kilobyte

25,600,000 

2 kilobytes

51,200,000 

4 kilobytes

102,400,000 

This may seem like a lot, but bear in mind that the 100 megabyteswasted with 4 kilobyte clusters is only 5% of a 2 gigabyte partition; 25 megabytes wasted with 1 kilobyte clustersis only 1.25% of a 2 gigabyte partition. It's probably not significant, but if you have many more files or a smallerpartition, it could become important.

MFT Records

In the Master File Table (MFT), there is a record for each file, includingdirectories, on the partition. This record is called the File Record Segment (FRS). The FRS is always 1 kilobytein size. If you are using a 512 byte cluster, the FRS can be fragmented into two pieces. On the other hand, ifyou use a 2 or 4 kilobyte cluster size, more than one FRS will fit in each cluster, wasting no disk space at all.

I/O Speed

The smaller the cluster size, the more fragmented a file can become,and the more fragmented the file, the longer I/O operations will take. But, if the file is contiguous, clustersize will not matter. If you run Diskeeper regularly, fragmentation will not be an issue.

The MFT is another matter. Since the MFT is always open for exclusiveuse by Windows NT, Diskeeper cannot defragment it. If you are using 512 byte clusters, the MFT will fragment, performancewill suffer, and there is nothing you can do about it except backup, reformat, restore.

The upper limit on a physical I/O from a Windows NT application is64 kilobytes. This is completely independent of cluster size, and thus will not impact I/O speed.

Internet Use

Web pages normally run between three and four kilobytes in size. Ifyou use a 4 kilobyte cluster size, web pages will usually be contiguous. If your work is mainly with web pages(lots of browsing), this can be significant.

Recommendations

Personally, I recommend using a 1 kilobyte cluster size. While 512byte clusters will save disk space, the amount, as shown above, is not enough to matter. Nor is the size limit,since an NTFS partition with a 512 byte cluster size can be up to 2 terabytes (TB).

The only exceptions to our recommendations would be:

  • If you will have a large number of files (say, 100,000 or more),because this will extend the MFT and cause it to fragment. If you use a 4 kilobyte cluster size, the MFT fragmentationwill be only a quarter of what you would have with 1 kilobyte clusters.
  • If you will be using a volume set larger than 4 terabytes. A 1 kilobytecluster can only handle 4 terabytes, a 2 kilobyte cluster can handle 8 terabytes, and so on.

A Note About FAT Partitions

Clusters on FAT partitions are similar to NTFS, with a few importantexceptions. Partitions under 16 megabytes use FAT-12, with 4 kilobyte clusters. Larger partitions use FAT-16, withdefault cluster sizes as follows:

Partition Size (MB)

Cluster Size

16 - 127

2 kilobytes 

128 - 255

4 kilobytes 

256 - 511

8 kilobytes 

512 - 1,023

16 kilobytes 

1,024 - 2,047

32 kilobytes 

2,048 - 4,095

64 kilobytes 

4,096 - 8,191

 128 kilobytes 

8,192 - 16,383

256 kilobytes 

(NOTE: Windows NT 3.51 and earlier do not support FAT clusters largerthan 64 kilobytes.) Since 256 kilobytes is the largest possible cluster size for a FAT partition, partitions ofmore than 16,384 megabytes (16 gigabytes) simply waste space; FAT partitions are limited to 65,535 clusters, sothey just can't address more than 16,384 megabytes. Due to this limit in the number of clusters, the default clustersizes listed above are also the minimum sizes. (For example, if you format a 511 megabyte FAT partition with 4kilobyte clusters, you won't be able to access the entire partition, since 65,535 4 kilobyte clusters total 268,431,360bytes, or just under 256 megabytes, leaving half the partition inaccessible.) Of course, none of the data aboutthe MFT applies to FAT partitions, since MFT is only used with NTFS.

 

If you have any comments about this article orany requests for new technical articles e-mail

 

Executive Software Europe