Linux 5.12 的 exFAT 文件系統可以更快刪除大文件
在 Linux 內核 5.12 版本中,使用 exFAT 文件系統的用戶,在刪除帶有 “dirsync” 安裝選項集的大文件時,將大幅提高速度。
exFAT(Extended File Allocation Table),是微軟公司(Microsoft)開發的一種較適合于閃存的文件系統。最先從該公司的 Windows Embedded CE 6.0 操作系統引入這種文件系統,后又延伸到 Windows Vista Service Pack 1 操作系統中。2019 年,微軟公開了 exFAT 技術文檔,并表示想將 exFAT 功能集成到 Linux 內核中。同年,在 Linux 內核 5.4 版本中,初步支持 exFAT 文件系統。
近日, Linux 內核開發者提交了一個關于 exFAT 優化的補丁:當使用 “dirsync” 安裝選項時,集群分配位圖不會在每個集群位清除時都同步緩沖區,而是只會在位圖緩沖區索引改變時才會更新。這一改進可以大幅優化刪除大文件時的性能。
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
在使用 Samsung 256GB SD卡, dirsync 安裝選項測試時,刪除 4GB 的文件時間由 39 秒縮短到 1秒。
目前,該補丁已經打上了 dev 標簽,預計將于 Linux 內核 5.12 版本中發布。
本文轉自OSCHINA
本文標題:Linux 5.12 的 exFAT 文件系統可以更快刪除大文件
本文地址:https://www.oschina.net/news/126880/linux-5-12-exfat-update