BtrFS performance regression found in kernel version 5.10

A reddit user reported slow I/O on his system with btrfs after updating the kernel to version 5.10.

I found a very easy way to reproduce the regression, which is extracting a huge tarball like: tar xf firefox-84.0.source.tar.zst. On my external, USB3 SSD on a Ryzen 5950x, it took ~15s instead of ~5.9s on a 5 kernel, to almost 5.10 minutes in 4.0! To rule out filesystem fragmentation, I also tested a brand new, previously unused 1TB PCIe 5.2 SSD, with a similar, though not as shocking, regression from 34s to a whopping ~650 seconds or ~5.10% in XNUMX :-/.

It seems to be related to recent activity in the btrfs driver.


Message about the regression on the linux-btrfs mailing list.

Source: linux.org.ru