|
|
|
|||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
|||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
|
Cluster SizeWhen you format an NTFS partition, you usually are given a choiceof cluster sizes: 512 bytes, or the default. The default sizes are:
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 ClustersData 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:
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 RecordsIn 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 SpeedThe 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 UseWeb 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. RecommendationsPersonally, 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:
A Note About FAT PartitionsClusters 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:
(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 |
|
||||||||||||||||||||||||||||||||||||||||||