I suspected that btrfs partitions are kind of sluggish compared to ext4 when performing many small operations, so I benchmarked three separate partitions on the same hard drive, one ext4, one btrfs, and I threw in NTFS for good measure. This was done on a hard drive which was formatted between tests so only one partition was on it at a time, and each partition used the entire space on the drive. I copied over many small files, and ran the command shred -fzuv * on it, which overwrites each file multiple times with junk data and then wipes the file name by repeated renaming it.

This showed that the btrfs partition is much slower than ext4 or NTFS, which is particularly noticeable on the renaming steps. I could also hear the drive clicking furiously the whole time for all tests, so I think it’s safe to say that none of them had the drive sitting around for much of the test.

Is this normal? As in is btrfs supposed to be a lot slower on random operations than simpler files ystems?

  • Ephera
    link
    fedilink
    83 years ago

    I don’t understand terribly much about all of this, but BTRFS is a CoW (Copy-On-Write) filesystem, so as I understand it, write operations will always be rather slow. So, with your benchmark being basically just writes, it’s probably not representative.

    Having said that, I think, reads can also take somewhat of a performance hit on HDDs (because the data gets spread around when the CoW happens).

    Ultimately I’m assuming NTFS is slow, because Microsoft, but BTRFS might very well be slower, because it has an actual reason to be slow. Its selling point are the features, not the performance.

    • @[email protected]
      link
      fedilink
      23 years ago

      Yes, and in my case with compression enabled the performance is nearly identical to ext4, with all the benefits that BTRFS has.

  • poVoq
    link
    fedilink
    73 years ago

    In regards to speed, I have really only read bad things about btrfs, but because of that I never tried it.

    Personally I fell in love with the new special drive introduced in OpenZFS 2.0. Basically it allows putting all the metadata and small files on a SSD, while automatically handing off larger files to a HDD array. Makes most operations super fast and you don’t need to invest in huge SSDs either.

      • poVoq
        link
        fedilink
        33 years ago

        Ubuntu (but on 20.04 you need to add an external ppa to get the latest OpenZFS2.x) and FreeBSD based stuff like TrueNAS Core.