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:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

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

ROCK 5 ITX RK3588 mini-ITX motherboard

3 Replies to “Linux 6.2 exFAT update to improve performance when creating files and directories”

  1. > 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:

    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 performance that repeating the test with something reasonable (be it even the cheapest A1 rated SD card possible) will show no differences anyway.

    1. I used “relative” with regard to percentage gains as the more you create files the longer it takes.

      1. 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

Leave a Reply

Your email address will not be published. Required fields are marked *

Boardcon Rockchip and Allwinner SoM and SBC products
Boardcon Rockchip and Allwinner SoM and SBC products