Linux 6.2 exFAT update to improve performance when creating files and directories

Linux 6.2 exFAT

The exFAT file system is about to get faster in Linux 6.2, at least when creating files and directories, with the performance boost especially noticeable on low-end processors.

Microsoft released the exFAT specification and announced Linux support in August 2019, which was followed by a new exFAT implementation in Linux 5.7 (June 2020) from Samsung.  But people are still working on improving exFAT Linux support, and Yuezhang Mo, an engineer at Sony, committed a patchset for Linux 6.2 that reduces repeated traversal of directory entries to boost the performance of exFAT:

After traversing all directory entries, hint the empty directory entry no matter whether or not there are enough empty directory entries.

After this commit, hint the empty directory entries like this:

1. Hint the deleted directory entries if enough;
2. Hint the deleted and unused directory entries which at the end of the cluster chain no matter whether enough or not (Add by this commit);
3. If no any empty directory entries, hint the empty directory entries in the new cluster(Add by this commit).

This avoids repeated traversal of directory entries, reduces CPU usage, and improves the performance of creating files and directories(especially on low-performance CPUs).

Yuezhang tested the patch on an NXP i.MX6 platform (i.MX6q SABRE Lite development board) using a Class 4 MicroSD card and found improvements from 14.4% to 57.4% depending on many new files were created using the following code:


Results:

Number of filesBeforeAfter Improvement
1~100025.360s22.168s14.40%
1001~2000 38.242s 28.72s33.15%
2001~3000 49.134s 35.037s 40.23%
3001~4000 62.042s 41.624s 49.05%
4001~5000 73.629s 46.772s 57.42%

So basically the more files are created the better the relative performance, and this can be noticeable by the user has the new patch saves about 27 seconds when creating 5,000 files on this specific platform.

Via Phoronix and Neowin. Thanks to TLS for the tip.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX Rockchip RK3588 mini-ITX motherboard
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
3 Comments
oldest
newest
tkaiser
tkaiser
1 year ago

> So basically the more files are created the better the relative performance Huh? The more files created the bigger the absolute time saved which is a no-brainer. The relative ‘performance’ would need to take the amount of files created into account (dividing through this) and then it looks like this:   1-1000: 14.40% 1001-2000: 16,58% 2001-3000: 13.41% 3001-4000: 12.27% 4001-5000: 11.49% 12345   1-1000: 14.40%1001-2000: 16,58%2001-3000: 13.41%3001-4000: 12.27%4001-5000: 11.49% Whether this is a ‘trend’ showing lower relative performance at higher count of files or just results variation is irrelevant since a class 4 SD card is so crappy wrt random I/O… Read more »

Chris B
Chris B
1 year ago

Reliability is the main issue for me. But I have had more success as I learned more. Flash filesystems are SBC’s weak point,IMHO

Boardcon Rockchip RK3588S SBC with 8K, WiFI 6, 4G LTE, NVME SSD, HDMI 2.1...