EXT4 "Fast Commits" Coming For Big Performance Boost In Ordered Mode

Written by Michael Larabel in Linux Storage on 9 October 2020 at 02:51 PM EDT. 37 Comments
LINUX STORAGE
After being in development for more than one year, it looks like with Linux 5.10 there will be EXT4 fast commit support.

Hitting the EXT4 dev branch today was the work by Google's Harshad Shirwadkar on implementing fast commits for the file-system. As that dev branch is ultimately from where he sends in the new EXT4 file-system feature code, it looks like this big ticket feature will land with the upcoming Linux 5.10 cycle.

EXT4 fast commits are based on this 2017 research paper for helping to reduce commit latency when operating in the file-system's ordered mode. This fast commit functionality is only for when EXT4 is operating in its ordered mode (data=ordered) and has the file-system just store the minimal delta for recreating the affected metadata in a fast commit space shared with JBD2. If EXT4 can't perform a fast commit, it falls back to a full commit or when needing to flush the fast commit space to start over.

Harshad Shirwadkar explains in further detail with the patch series, "Because JBD2 operates at block granularity, for every file system metadata update it commits all the changed blocks are written to the journal at commit time. This is inefficient because updates to some blocks that JBD2 commits are derivable from some other blocks. For example, if a new extent is added to an inode, then corresponding updates to the inode table, the block bitmap, the group descriptor and the superblock can be derived based on just the extent information and the corresponding inode information. So, if we take this relationship between blocks into account and replay the journalled blocks smartly, we could increase performance of file system commits significantly."

The code queued in EXT4 "dev" has the necessary JBD2 changes as well as the EXT4 file-system support.

When running in EXT4 ordered mode with the fast commit patches, there is a reported ~103% write performance improvement. Thus seeing this new code make it into the EXT4 "dev" branch ahead of mainline integration is quite exciting if you rely on EXT4 ordered journal functionality.
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