Why is exFAT's default allocation size in Windows so high?

Because exFAT is used primarily for things like large capacity SD cards, and on SD cards you must erase a sector before you can write to it. If you were to use small clusters on a card with a large erase sector size it would result in many erase and write commands to the same sector write a several sequential clusters worth of data to disk not only reducing performance but also prematurely wearing out the flash cells. The erase sector size is generally not documented in card datasheets but can be found in the CSD register of the card. The contents of this register will vary from card to card depending on its internal design. Since SD cards are generally used in things like cameras which store large files, the wasted space of a large cluster size isnt important, and only would be if you were storing very large numbers of very small files which generally does not happen.

This webpage has the contents of this register for about a dozen cards:

http://goughlui.com/2014/01/03/project-read-collect-decode-sd-card-csd-register-data/

And if you enter its contents in to the following calculator you can see for a few of the 32/64GB cards the erase sector size is 128 blocks with a block being 512 bytes. And for a 2GB card the erase sector size is 32 blocks with a block being 1024 bytes.

http://goughlui.com/static/csdecode2.htm

Wether or not Windows is smart enough to query the CSD register and suggest a cluster size, or if it simply guesses based on the partition or disk size is unknown. If you were to emulate a SD card with a microcontroller, you could find out.


The earlier answer to this question is wrong and shouldn't have been upvoted or accepted. exFAT isn't a flash file system. It's never used directly on "raw" flash. That would be horrendously inefficient, even if the cluster size matched the flash erase block size.

What actually happens is that exFAT runs on top of a block-device emulation layer, which is typically implemented in firmware on the flash device itself. Suppose the exFAT cluster size is 128K, the (fake) block device's sector size is 4K, and you write a 5K file to the exFAT volume. The exFAT driver allocates 128K for the file, but (ignoring metadata) it only writes 8K: the two sectors that actually contain file data. That's the same amount of data that would have been written if the cluster size was 4K. The difference is that if you write a bunch of 5K files, they will be separated by 30 unused fake sectors that are never read or written to. But that doesn't matter, because the real location where the data goes on the raw flash is unrelated to the sector numbers of the virtual block device. The exFAT cluster size probably has little effect on the amount of data written to the raw flash, or the number of block erase operations. When you include exFAT metadata overhead, larger clusters should be somewhat more efficient – but that has nothing to do with the size of the erase blocks of the raw flash, which is completely hidden by the emulation layer.


Of course, large clusters mean you run out of space on the fake block device if you try to store a lot of small files, and there's no way to coerce the emulation layer into letting you use the rest of the real space (short of using those sector numbers you skipped), so large clusters still seem like a bad idea. I don't know who at Microsoft decided that the default exFAT cluster size should be so large, or why, but I'll speculate.

exFAT has a much larger per-cluster overhead than NTFS: 65 times larger, in fact, because NTFS just has one bit per cluster for the free space bitmap, while exFAT has one bit in the bitmap plus 4 bytes in each of two FATs. On the other hand, NTFS has some significant other fixed overhead (notably, several megabytes for the journal), which is not directly tied to the number of clusters.

My guess is that they wanted exFAT to appear to have less overhead than NTFS. On small volumes, NTFS always consumes at least a couple of megabytes, so the 0.2% overhead of 4K clusters didn't seem so bad. But a freshly formatted 1TB volume would have about 2GB of exFAT metadata with 4K clusters, while NTFS would only need about 40MB. That would look bad (and would be bad, I suppose), so they had to use a much larger cluster size.