Linux 5.10 Btrfs Hitting A Performance Regression But Improving With Linux 5.11

Written by Michael Larabel in Linux Storage on 25 December 2020 at 09:00 AM EST. 8 Comments
LINUX STORAGE
Linux 5.10 as a Long-Term Support (LTS) kernel has been off to a rocky start after an immediate point release due to a RAID issue, some reporting AMDGPU problems, and also a staggering Btrfs performance regression hitting some users.

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 ;-)"
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