Wednesday, October 12, 2011

Default Cluster Size for NTFS, FAT32, exFAT

I needed to reformat my SanDisk 16GB USB flash drive to NTFS file format as I wanted to transfer a large 9++ GB movie file to view it on my media player box. So when the format dialog box came up, I was wondering what would be the best default cluster size for NTFS and what did the "default allocation size" meant.
 
Although I would like to keep my thumbdrive in its default format of FAT32, it was not able to handle any files larger than 4 GB. NTFS filesystem although has more features (encryption, compression, ownership, etc.), it would also mean using up more computer resource in Windows when processing files. Hence I still prefer the simpler FAT 32 drive format, but I have no choice here as the file size was greater than 4 GB. (Note: exFAT or extended FAT can store files larger than 4GB but this disk format is not supported by many media boxes, unfortunately! It was introduced to overcome the 4GB limit but due to lack of support from many devices, access to the files would be limited to Windows Vista/7 onwards.)
 
As for cluster size, checking around the Microsoft Support pages, they did provide a good long explanation between the possible cluster size and the default cluster size for NTFS, FAT32 and exFAT for Windows starting from XP, Vista and Windows 7.
 
It was a long explanation going around explaining the default cluster size, from what I gather the default size is 4 KB (or 4096 bytes). So if you chose the "default" rather than specifying any other cluster size, you would most likely get 4 KB. However the default cluster size would also depends on the drive size. Since most of the new drive are all in the GB region, you would end up with 4 KB.
 

Drive size
(logical volume) Cluster size Sectors
----------------------------------------------------------
512 MB or less 512 bytes 1
513 MB - 1,024 MB (1 GB) 1,024 bytes (1 KB) 2
1,025 MB - 2,048 MB (2 GB) 2,048 bytes (2 KB) 4
2,049 MB and larger 4,096 bytes (4 KB) 8
 
Why 4KB? Because that is the minimum required by Windows XP, Vista and 7, to be able to compress files.
 
And if you were to convert it from FAT to NTFS, you would get the small 512 bytes which is the default for FAT16 and FAT32 size. This is due to the way FAT sectors are aligned to the 512 bytes sizes.
 
I also noticed in their explanation, if you go into > 16 TB drives, the default cluster allocation size will increase to 8 KB and > 64 TB it will be 32 KB, etc
 
So far the Hard disk sold in the market are mainly in the 500 GB to 2 TB range, so it is going to take some years before it reaches that high.
 
So at least now I know what is the default size when I format the drive. Basically whether it is NTFS, FAT32 or exFAT, the default size for most of the current drives would be 4 KB (4,096 bytes).
 
Now what would be the optimum cluster size for NTFS, FAT32, exFAT?
 
There is a trade off between speed and space wastage when choosing a cluster size. A smaller cluster means less space wasted when saving small files. eg if you got a 1 KB file, saving on a 8 KB cluster, would mean using up 8 KB to store a 1 KB file. So if you have lots of documents which are usually very small size files, small cluster would be good for you.
 
If you use very small cluster (eg 512 bytes) to glean out more storage from your drive, your drive performance will slow down when reading / writing large files (eg music files and videos takes up a lot of storage space) as it would take many reads/writes to find the cluster where the files are stored. A large cluster eg 16 KB or 32 KB will speed up performance, but waste space.
 
So in the end you would need to decide your own preference for storage vs performance.
 
As for me, I think I would just go for the current default of 4 KB which seems like a good balance.
 
Whether to go for 4 KB, 8 KB, 16 KB drive cluster size is entirely up to you. At least with the above explanation, you have a fair idea what it means between choosing default cluster size or any other sizes for NTFS, FAT32 or exFAT for that matter.
 

2 comments:

Luke said...

Thank you so much for clarifying! To sum up, you could say: Just leave it to the defaults and you will be fine. ;)

Anonymous said...

Some people believe that setting larger cluster size will enhance performance when using large files. The performance gain is usually less than 1%. Beware, that most disk utilities (defraggers, file recovery tools, etc.) will not work on clusters over 4,096. Unless the disk drive is dedicated to something like an enterprise database (no programs or user files), leave the cluster size as default or 4,096.
MeritComputerServices.com