Linux 5.12’s exFAT file system can delete large files faster

In Linux kernel version 5.12, users who use the exFAT file system will greatly increase the speed when deleting large files with the “dirsync” installation option set.

exFAT (Extensible File Allocation Table) is a file system developed by Microsoft that is more suitable for flash memory. This file system was first introduced from the company’s Windows Embedded CE 6.0 operating system and then extended to the Windows Vista Service Pack 1 operating system. In 2019, Microsoft published the exFAT technical document and expressed its desire to integrate the exFAT function into the Linux kernel. In the same year, the Linux kernel version 5.4 initially supported the exFAT file system.

Recently, Linux kernel developers submitted a patch about exFAT optimization: “There are stressful update of cluster allocation bitmap when using dirsync mount option which is doing sync buffer on every cluster bit clearing. This could result in performance degradation when deleting big size file. Fix to update only when the bitmap buffer index is changed would make less disk access, improving performance especially for truncate operation.

When using a Samsung 256GB SD card and dirsync installation option test, the time to delete 4GB files was shortened from 39 seconds to 1 second.

At present, the patch has been marked with the dev label and is expected to be released in version 5.12 of the Linux kernel.