Announcement

Collapse
No announcement yet.

BTRFS I/O problem with autodefrag when using 5.16 kernel

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    BTRFS I/O problem with autodefrag when using 5.16 kernel

    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.

    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/

    Please Read Me

    #2
    The reddit link via your link had an interesting comment:
    Over the past 16 hours of uptime btrfs-cleaner has managed to write over 2.3TB over my single profile 256GB btrfs partition on an NVME drive.
    I got an HP-17cn1xxx for Xmas and I replaced its 1Tb spinner with the 500Gb Samsung 860 EVO that was in my Acer. Here is the readout of that drive.
    In 393 days and 14 hours of use only 3.22Tb of Lifetime writes. To accumulate 2.3Tb in 16 hours is mind boggling.
    Click image for larger version

Name:	HD_sentinel.png
Views:	244
Size:	82.8 KB
ID:	660332



    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      I must use my drive lot more than you do, my nvme drive reports 338 days and 47TB, lol

      Please Read Me

      Comment

      Working...
      X