I’m shopping for a new NVMe SSD drive for my laptop and with the second deciding factor being Linux compatibility, I’d looked up the names of specific drives in the source code of Linux and discovered that their controllers have quirks that have to be worked around.

Now, I figured out more or less how quirks affecting one of the controllers impact its functionality under Linux, but there’s another controller that I have a trouble understanding how disabling the aforementioned command limits the functionality of, if at all; therefore I’d like to ask you all, under what circumstances is the command used by a host and can disabling it lower the performance or power efficiency of an impacted controller/drive?

To be clear, the quirk workaround I’m talking a about is NVME_QUIRK_DISABLE_WRITE_ZEROES.

  • Yote.zip
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 year ago

    That’s nonsense and couldn’t be affected by BTRFS short of something catastrophic happening (probably in the kernel).

    The main downside for NVME that I’d be aware of is that BTRFS is a lot slower to write lots of tiny files than something like XFS (which is generally the fastest filesystem available). I’d guess this is due to BTRFS’s metadata overhead, which includes writing two copies of metadata for redundancy. I have a very fast gen 4 NVME and I can get ~2GBPS tiny file write speed with XFS and ~300MBPS tiny file write speed with BTRFS. IMO this is negligible though, because tiny files are inherently tiny - 300MB of tiny files is a lot of files for 1 second of effort. Also, usually read speed is more important than write speed for day-to-day tasks. Large file writes and large/small file reads are roughly the same though, with any small advantages going towards XFS.

    BTRFS will never be faster than something like XFS because it has way more features - with how fast NVMEs are I personally think it’s worth trading some of that ludicrous speed for features like data checksumming, compression, and snapshots. On the flip side, BTRFS is a very good idea to run on slow HDDs because its transparent compression will actually increase the drive’s speed, as the act of compressing/decompressing is way faster than the act of reading physical data from rust.

    • penquin@lemm.ee
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      I agree on the “nonsense” part, as I’ve had none of those issues for over a year using this drive. Shit has been amazing. Also, I appreciated the lecture. I didn’t know any of what you said, so thank you. I did try xfs myself, but for my use case, I didn’t see any difference at all. Like nothing. I’m just a casual user who gets into the terminal some times, but that’s about it. So, btrfs works wonders for me with those sweet snapshots. Don’t know if xfs has snapshots, too, but I’m familiar with btrfs and timeshift, so I stuck with it.

      • Yote.zip
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        XFS doesn’t support snapshots, but it does support reflinking like BTRFS. Reflinks allow data to be shared fully or partially between two files, which means that technically with a lot of elbow grease you could probably write a snapshotting system for XFS built on reflinks. There’s actually a “filesystem” named Stratis that takes vanilla XFS and layers a ton of modern features from e.g. BTRFS/ZFS onto it. Unfortunately it’s not as fast as XFS because of these features so it’s not a silver bullet yet.

        tl;dr, BTRFS’s features are useful for most users, and I wouldn’t worry about filesystem speed unless you’ve got a very specific usecase like a database.

        • penquin@lemm.ee
          link
          fedilink
          arrow-up
          2
          ·
          1 year ago

          Nice. Thank you. I’ve learned a ton from just a couple of comments. Much appreciated