What filesystem is currently best for a single nvme drive with regard to performance read/write as well as stability/no file loss? ext4 seems very old, btrfs is used by RHEL, ZFS seems to be quite good… what do people tend to use nowadays? What is an arch users go-to filesystem?

  • Dubious_Fart@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    ext4 being old, and still being the main file system most distros use by default, should be enough alone to tell you being old isnt bad.

    it means its battle tested, robust, stable, and safe. Otherwise it wouldnt be old and still be in widespread use.

  • lazynooblet@lazysoci.al
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    Ext4 being “old” shouldn’t put you off. It is demonstratively robust with a clear history of structure integrity. It has immense popularity and a good set of recovery tools and documentation. These are exactly what you are looking for in a filesystem.

    I’m not saying EXT4 is the best for your requirements, just that age of a file system is like fine wine.

  • shirro@aussie.zone
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    1 year ago

    Be conservative and use the simplest thing that supports your needs and don’t be suckered by feature lists. I have never needed more than ext4. It generally has the best all round performance and maturity is never a bad thing when it comes to filesystems. It isn’t most suitable for some embedded and enterprise environments and if you are working with those you generally know the various tradeoffs.

  • tony@lemmy.hoyle.me.uk
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    1 year ago

    It really depends on your priorities. Single drive is good for a home system with nothing really important on it… once you get to wanting to keep it and where recovery from backups is too much downtime, you want at least a drive mirror… nothing wrong with exr4+mdraid for that, although you don’t get the checksumming that zfs gives it will be pretty fast & if a drive fails you can run degraded on one drive until you get the new drive in.

    I’ve been running zfs for 10 years and not lost a single byte of data even after doing stupid shit like tripping over the sata cables and disconnecting half the drives. It’s survived multiple drive failures (as long as the failures are on different bits of the disk, it recover get a clean copy onto a third drive, but it’s a brown trousers moment when stuff like that happens).

    Downsides, it aint fast, and it does tend to like lots of memory. You want it on your fileserver, not your gaming system.

    IMO there’s no point in a single drive zfs… it’ll warn you faster that the drive is f*cked but what do you do then?

    • Bread@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      I agree. Love ZFS for the NAS, but for a single drive desktop system, it is almost pointless and in my experience slower for desktop usage. ZFS is great for what it was designed for.

  • Kogasa@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Been using BTRFS for all disks and purposes for a few years, I would recommend it with the requirement that you research it first. There are things you should know, like how/when to disable CoW, how to manage snapshots, how to measure filesystem use, and what the risks/purposes of the various btrfs operations are. If you know enough to avoid doing something bad with it, it’s very unlikely to break on you.

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

      It has been suggested by some that there is no relationship between Reiser murdering wives and ReiserFS murdering file systems, but most steer clear of both out of an abundance of caution.

    • r00ty@kbin.life
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      Even now? I remember when it was new I tried it, must have been 20 or so years ago. Super fast for the time, but had a nack for randomly corrupting data. After the third reformat, I went back to ext2.

  • odium@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    btrfs is great for system stability because of snapshots. You can set it up to automatically make snapshots at a timed interval or every time you run pacman.

    If something breaks, you can just revert to a previous snapshot. You can even do this from grub. It’s a bit hard to set up, so if you want, you could use an arch based distro which automatically sets it up like GarudaOS.

  • exi@feddit.de
    link
    fedilink
    arrow-up
    0
    arrow-down
    1
    ·
    1 year ago

    If you are planning to have any kind of database with regular random writes, stay away from btrfs. It’s roughly 4-5x slower than zfs and will slowly fragment itself to death.

    I’m migrating a server from btrfs to zfs right now for this very reason. I have multiple large MySQL and SQLite tables on it and they have accumulated >100k file fragments each and have become abysmally slow. There are lots of benchmarks out there that show that zfs does not have this issue and even when both filesystems are clean, database performance is significantly higher on zfs.

    If you don’t want a COW filesystem, then XFS on LVM raid for databases or ext4 on LVM for everything else is probably fine.

    • Laser@feddit.de
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      Did you disable CoW for your database with btrfs? E.g. for PostgreSQL, the Arch Wiki states:

      If the database resides on a Btrfs file system, you should consider disabling Copy-on-Write for the directory before creating any database.

      • exi@feddit.de
        link
        fedilink
        arrow-up
        0
        arrow-down
        1
        ·
        1 year ago

        From arch wiki:

        Disabling CoW in Btrfs also disables checksums. Btrfs will not be able to detect corrupted nodatacow files. When combined with RAID 1, power outages or other sources of corruption can cause the data to become out of sync.

        No thanks

        • DaPorkchop_@lemmy.ml
          link
          fedilink
          arrow-up
          2
          ·
          1 year ago

          that’s no different than any “normal” filesystem with a traditional block-level RAID solution

          • exi@feddit.de
            link
            fedilink
            arrow-up
            0
            arrow-down
            1
            ·
            1 year ago

            Not really. You can still use dm-verity for a normal raid and get checksumming and normal performance, which is better and faster than using btrfs.

            But in any case, I’d recommend just going with zfs because it has all the features and is plenty fast.