89
What Filesystem? (lemmy.world)
submitted 1 year ago by cianmor@lemmy.world to c/linux@lemmy.ml

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?

you are viewing a single comment's thread
view the rest of the comments
[-] exi@feddit.de 9 points 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 5 points 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 6 points 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 9 points 1 year ago

that's no different than any "normal" filesystem with a traditional block-level RAID solution

[-] exi@feddit.de 2 points 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.

[-] DaPorkchop_@lemmy.ml 1 points 1 year ago

ZFS lacks some features that btrfs has, such as creating CoW clones of individual files (rather than having to snapshot a whole subvolume).

personally i've been using btrfs on pretty much everything for about two years, ranging from multiple >100TB filesystems spanning 8 spinning rust drives to individual flash drives and had very few issues (compared to my experiences with ext4 on mdadm). snapshots/reflink copies have made many of my workflows much easier, adding/removing/replacing devices pretty much Just Work™, and the fact that everything is checksummed gives me a piece of mind i didn't know i needed. sure, ZFS has pretty much the same featureset, but it's not in the mainline kernel and seems to lack some of btrfs' flexibility (from the research i've done in the past, like adding/removing disks to an existing pool is still experimental).

what i'm really excited for is bcachefs, which takes what i consider the best features of both btrfs and ZFS and then steps them up a notch (e.g. ability to configure RAID settings and prefer specific drives on a per-file/per-directory level). as soon as it's stable enough to be mainlined i'll definitely be migrating most of my btrfs filesystems to that.

[-] Zucca@sopuli.xyz 2 points 1 year ago

If you don’t want a COW filesystem, then XFS on LVM

XFS supports reflinks, so it's kind of snapshot and CoW capable. Someone was working on some tool to make snapshots on XFS by utilizing reflinks.

this post was submitted on 20 Jul 2023
89 points (91.6% liked)

Linux

48080 readers
771 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS