EXT4 Gets More Direct I/O Optimizations - Can Help Some Database Workloads Around ~140%+

Written by Michael Larabel in Linux Storage on 9 January 2020 at 07:19 AM EST. 14 Comments
LINUX STORAGE
A few days ago I wrote about a big improvement to write performance for EXT4's Direct I/O code path but that is not the only DIO optimization coming for Linux 5.6. Thanks to IBM, another big EXT4 DIO boost can be found for database workloads.

Other EXT4 development work currently in its queue ahead of the Linux 5.6 cycle is helping the inode lock scalability for Direct I/O mixed read/write workloads. The issue was pointed out by an Alibaba engineer last summer in a significant performance regression with EXT4's DIO performance under mixed read/write scenarios. The Alibaba engineer bisected the issue to a mainline kernel commit from 2016 when the performance became worse. The problem was quite noticeable with an Intel P3600 NVMe solid-state drive.

The problem was ultimately fixed by an IBM engineer in fixing the inode_lock sequence to address these scalability woes. The end result? According to IBM's Ritesh Harjani, "So this patchset help achieve good scalability in the mentioned workload. Also this gives up to ~140% perf improvement in 24 threads mixed [random read write] workload with 4K burst size. The performance difference can be even higher with high speed storage devices, since [bandwidth] speeds without the patch seems to flatten due to lock contention problem in case of multiple threads."


This improvement is just for EXT4's Direct I/O code path and again is for mixed reads/writes like database workloads with larger multi-core systems to benefit the most. Look for this improvement (and ultimately a regression fix for the Alibaba problem points to a commit from September 2016) should be found in the upcoming Linux 5.6.
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