exFAT vs FAT32 on micro SD cards

Found 20th Feb 2015
I have some 64gb micro sd cards, I have been using FAT32 on them and I was just testing the memory card getting about 10MB write, but when I used exFAT I was getting about 14MB write? Which is quite a good percentage increase at these speeds. Or is it the allocation unit size that is causing the speed difference? I choose default allocation on exFAT (128KB I believe) but can't change it with FAT32 since I was using HP DriveKey (its using 32k I believe) to format it and it didn't give an option. Even using exFAT at 32k size its still around 14MB writes
Community Updates
AskCardMicro SDSD Card
Well I just tried CrystalDiskMark and both in FAT32 and exFAT the speeds were pretty much the same on both filesystems, FAT32 was actually a bit faster with 512k writes, but otherwise the same. I was just going by the write speed h2testw was going at originally.
Files stored in FAT32 are spread across clusters with an end of file marker being specified in the final cluster. The FAT table contains pointers to these clusters. In order to read and write files, a pointer is indexed to a cluster number and the pointer is repeatedly used to index successive clusters that form the file until the point in which an end of file marker is encountered.

It stands to reason, the more times the pointer is moving around following clusters in the FAT table, the longer will be the time to read or write the file in its entirety. For example, a file that spreads over 1000 clusters would take longer to read and write than a file that is spread over 500 clusters. Or is it? Actually, cluster size, as you have discovered, can play a role in the speed of file read and writes.

Given that the more clusters take up by a file, the slower is the read and write. With this in mind, if we increase cluster size, we reduce the number of clusters used to build up a file. Hence for a file of 128kB, this would require 4 x 32kB clusters to hold that file. Increase the cluster size to 128kB and we can now see that only 1 cluster is required and almost by magic, the very same file is being read from and written to quicker simply by altering the cluster size from 32kB to 128kB.

Before readers start increasing their FAT cluster sizes, there is a disadvantage in using larger cluster sizes. Given that the beginning of a file must be boundary aligned with clusters - that is to say, a file may not start in the middle of a cluster, there is more wastage of drive space when using larger clusters. As an example, a file that is 129kB in size requires 5 x 32kB clusters or 2 x 128kB clusters. With the former, 31kB is wasted since the last cluster will hold the final 1kB of that file with the remaining 31kB being unused, since new files cannot begin part way through a cluster, as mentioned earlier. With the latter, and using the same methodology, we can now ratiocinate that 127kB has been rendered wasted.

The upshot is that if you anticipate storing many small files on your memory card, it is usually advantageous to use a smaller cluster size but if you plan to store larger files, use a larger cluster size.
OK thanks, it makes sense. I had to use FAT32 with my phone anyway as it wasn't recognising exFAT but used exFAT on USB flash drive.
Post a comment

    Top Discussions

    Top Merchants