EXT4 With Linux 6.5 Will See Much Faster Parallel Direct I/O Overwrite Performance

Written by Michael Larabel in Linux Storage on 28 June 2023 at 05:53 AM EDT. 9 Comments
LINUX STORAGE
Ted Ts'o has submitted all the EXT4 feature changes for the Linux 6.5 merge window. EXT4 this round is seeing various clean-ups, bug fixes, and other enhancements but there is one performance optimization worth calling attention to.

EXT4 with Linux 6.5 is set to see much improved performance around parallel direct I/O (DIO) overwrites. Brian Foster of Red Hat who worked on this optimization to allow concurrent unaligned DIO overwrites is seeing much better performance as a result. With FIO this patch takes his test case from 8724 KiB/s up to 1565 MiB/s.


Foster explained in the patch:
"We've had reports of significant performance regression of sub-block (unaligned) direct writes due to the added exclusivity restrictions in ext4. The purpose of the exclusivity requirement for unaligned direct writes is to avoid data corruption caused by unserialized partial block zeroing in the iomap dio layer across overlapping writes.

XFS has similar requirements for the same underlying reasons, yet doesn't suffer the extreme performance regression that ext4 does. The reason for this is that XFS utilizes IOMAP_DIO_OVERWRITE_ONLY mode, which allows for optimistic submission of concurrent unaligned I/O and kicks back writes that require partial block zeroing such that they can be submitted in a safe, exclusive context. Since ext4 already performs most of these checks pre-submission, it can support something similar without necessarily relying on the iomap flag and associated retry mechanism.

Update the dio write submission path to allow concurrent submission of unaligned direct writes that are purely overwrite and so will not require block zeroing."

A nice win thanks to Red Hat. The full list of EXT4 updates for Linux 6.5 can be found via this pull request.
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