Microsoft first made its 64-bit exFAT (Extended File Allocation Table) file system available in 2012 as a replacement for 32-bit FAT32. In 2019, seven years after the announcement, the Redmond behemoth made a significant advancement by announcing Linux support for the exFAT file format. Three years later, it appears that exFAT is likely to gain a significant performance boost in the next Linux 6.2, according to Sony’s most recent work. Engineer Yuezhang Mo at the Japanese tech giant discovered that exFAT performs far better when the repeated traversing of directory entries is minimised. And with lower-end CPUs, it is quite obvious.
According to Mo’s patch,
No matter how many empty directory entries there are, hint the empty directory entry after traversing all of them.
Hint the empty directory entries as follows after this commit:
- If necessary, hint to the removed directory items;
- Indicate whether there are enough deleted and unused directory entries at the end of the cluster chain (added with this commit);
- If there aren’t any empty directory entries, suggest the new cluster’s empty directory entries (Add by this commit).
By doing so, repeated directory traversal is avoided, CPU utilisation is decreased, and the performance of generating files and directories is improved (especially on low-performance CPUs).
Tests were conducted utilising 5000 files to arrive at this conclusion. The scaling of the improvement with the number of file sizes was an interesting observation. The largest gain was close to 58%. Using a Class 4 SD card and a SABRE i.MX6 Lite development board, the test was run:
It’s interesting to note that Sony has previously released exFAT updates that significantly improved performance. In April, Yuezhang Mo reported that, in some cases, there was an improvement of up to 85.4% with DirSync enabled.