Bcachefs Lands Big Scalability Improvement, Disables Debug Option By Default

Written by Michael Larabel in Linux Storage on 7 November 2023 at 07:13 PM EST. 35 Comments
LINUX STORAGE
Following last week's merging of the Bcachefs file-system into Linux 6.7, a secondary set of updates were merged today for adding a few new features as well as some fixes for this newly-merged Linux file-system.

This is "the second big bcachefs pull request" for syncing the mainline Bcachefs code up with the master branch of the Bcachefs development tree. On the feature side this adds rebalance_work btree functionality as a big scalability improvement as the re-balance thread no longer has to scan to find extents that need processing.

A second feature added with today's pull is a "sb_errors" superblock section. To the superblock it adds counters for each fsck error type since file-system creation time. Plus it also adds the date of the most recent fsck error. This information should provide for better bug reports around fsck errors. Telemetry for this reporting may be added for Bcachefs in the future.

On the fixes side it resolves an issue with multiple snapshot deletion, an early allocator locking fix, endianess fixes, and notably has now disabled "CONFIG_BCACHEFS_DEBUG_TRANSACTIONS" by default.

The CONFIG_BCACHEFS_DEBUG_TRANSACTIONS option was previously enabled by default for helping to debug transactions. The Kconfig help text on the option reads:
"This makes the list of running btree transactions available in debugfs. This is a highly useful debugging feature but does add a small amount of overhead."

Well, it turned out it can be a bit more than a "small amount" of overhead. Today's pull request disables it by default on the basis of:
" CONFIG_BCACHEFS_DEBUG_TRANSACTIONS no longer defaults to y, a big performance improvement on multithreaded workloads"

With my Bcachefs benchmarks last week it appears part of the slower Bcachefs performance is at least in part due to debug transactions being enabled by default. Thus it will make for more interesting testing next round for seeing how these latest fixes and improvements are helping Bcachefs compete with the likes of F2FS, Btrfs, EXT4, and XFS.

Bcachefs mkfs


See this Git merge for the full set of Bcachefs changes that were merged today for Linux 6.7.
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