A cut-n-paste from Reddit. TL/DR : Don't use BTRFS autodefrag as a mounting option with 5.16 series kernels until the bug is fixed.
Currently, Canonical has scheduled 5.15 kernels for 22.04, but that could change later or in the next release.
Currently, Canonical has scheduled 5.15 kernels for 22.04, but that could change later or in the next release.
PSA: Linux 5.16 has major regression in btrfs causing extreme IO load
Linux 5.16 saw some changes in the btrfs defragmentation code which introduced a regression that causes extreme write IO (and associated single-core 100% CPU load by a kernel thread named btrfs-cleaner). Apparently it's defragmenting in an infinite loop.
It's affecting volumes mounted with -o ssd,autodefrag, which is the default in most some distributions (Manjaro, openSUSE installed with Calamares installer's defaults before 8 Dec 2021, possibly others). Check your /etc/fstab, if it doesn't have autodefrag on lines with btrfs, you're all right.
This has the potential to wear out an SSD in a matter of weeks: on my Samsung PM981 Polaris 512GB this lead to 188 TB of writes in 10 days or so. That's several years of endurance gone. 370 full drive overwrites.
The workaround is to disable autodefrag until this is resolved: mount -o remount,noautodefrag / and change autodefrag to noautodefrag in your /etc/fstab.
Relevant linux mailing list thread: https://lore.kernel.org/linux-btrfs/...ail.gmail.com/
Linux 5.16 saw some changes in the btrfs defragmentation code which introduced a regression that causes extreme write IO (and associated single-core 100% CPU load by a kernel thread named btrfs-cleaner). Apparently it's defragmenting in an infinite loop.
It's affecting volumes mounted with -o ssd,autodefrag, which is the default in most some distributions (Manjaro, openSUSE installed with Calamares installer's defaults before 8 Dec 2021, possibly others). Check your /etc/fstab, if it doesn't have autodefrag on lines with btrfs, you're all right.
This has the potential to wear out an SSD in a matter of weeks: on my Samsung PM981 Polaris 512GB this lead to 188 TB of writes in 10 days or so. That's several years of endurance gone. 370 full drive overwrites.
The workaround is to disable autodefrag until this is resolved: mount -o remount,noautodefrag / and change autodefrag to noautodefrag in your /etc/fstab.
Relevant linux mailing list thread: https://lore.kernel.org/linux-btrfs/...ail.gmail.com/
Comment