EXT4 Has A Big Optimization For Linux 5.10 For File Overwrites

Written by Michael Larabel in Linux Storage on 3 October 2020 at 05:00 PM EDT. 1 Comment
LINUX STORAGE
The EXT4 file-system with the upcoming Linux 5.10 kernel has an optimization yielding big benefits for file overwrites in some circumstances.

With the EXT4 iomap code used in direct access (DAX) and direct I/O (DIO) modes there is an optimization for checking whether blocks are already allocated. In these cases of the blocks already having been allocated (hence an overwrite), the mapping information can be returned immediately and for multi-threaded overwrite requests there is an especially big performance benefit -- again, assuming you are using DAX/DIO such as on persistent memory with the likes of Intel Optane DCPMM or even simulating persistent memory within virtual machines.

The commit by IBM's Ritesh Harjani explains of the file overwrite performance impact, "This could give a significant perf boost for multi-threaded writes specially random overwrites. On PPC64 VM with simulated pmem(DAX) device, ~10x perf improvement could be seen in random writes (overwrite). Also because this optimizes away the spinlock contention during jbd2 slab cache allocation (jbd2_journal_handle). On x86 VM, ~2x perf improvement was observed."

The Linux 5.10 cycle is kicking off soon with the two-week merge window while the stable release will be out around the end of 2020.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week