EXT4 Has A Big Optimization For Linux 5.10 For File Overwrites
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.
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.
1 Comment