Show Your Support: This site is primarily supported by advertisements. Ads are what have allowed this site to be maintained on a daily basis for the past 18+ years. We do our best to ensure only clean, relevant ads are shown, when any nasty ads are detected, we work to remove them ASAP. If you would like to view the site without ads while still supporting our work, please consider our ad-free Phoronix Premium.
Linux 5.10 Btrfs Hitting A Performance Regression But Improving With Linux 5.11
Making rounds this week was word of a "500~2000% performance regression" knocking Btrfs on Linux 5.10. For a simple test case like extracting a large .tar.zst file could go from taking just around 15 seconds to nearly five minutes or in other cases like from 5 seconds to over 30 seconds. The regression was bisected to a fundamental Btrfs change in Linux 5.10 and reproduced on bare metal while running Btrfs within a virtual machine didn't trigger the major slowdown.
Josef Bacik was able to get to the bottom of it on Christmas Eve. He noted, "Alright to close the loop with this, this slipped through the cracks because I was doing a lot of performance related work, and specifically had been testing with these patches on top of everything. These patches bring the performance up to around 40% higher than baseline. In the meantime we'll probably push this partial revert into 5.10 stable so performance isn't sucking in the meantime. Thanks."
So Linux 5.10 may still be regressing but after the holidays will likely see a partial revert on the behavior so the LTS kernel isn't in such bad shape. The patches he was referencing are in regards to improving preemptive ENOSPC [error no space left on disk] flushing.
Rene Rebe who reported the regression commented in the end, "I indeed tested the linux-btrfs for-5.11 and found the performance some 50% better. I would hope that can be brought back to 5.9 levels sometime soon ;-)"