87
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?

top 50 comments
sorted by: hot top controversial new old
[-] lazynooblet@lazysoci.al 92 points 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.

[-] bionicjoey@lemmy.ca 31 points 1 year ago
[-] PipedLinkBot@feddit.rocks 9 points 1 year ago

Here is an alternative Piped link(s): https://piped.video/b2F-DItXtZs

Piped is a privacy-respecting open-source alternative frontend to YouTube.

I'm open-source, check me out at GitHub.

[-] Dubious_Fart@lemmy.ml 42 points 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.

[-] art@lemmy.world 9 points 1 year ago

This is exactly my outlook. Ext4 has proven itself as a robust and reliable file system.

load more comments (4 replies)
[-] odium@programming.dev 28 points 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.

[-] Nonononoki@lemmy.world 10 points 1 year ago

Too bad btrfs still doesn't support encryption natively, unlike ext4.

[-] AffineConnection@lemmy.world 7 points 1 year ago

How much is ext4 filesystem-level encryption actually used though?

load more comments (7 replies)
[-] BCsven@lemmy.ca 6 points 1 year ago* (last edited 1 year ago)

Or OpenSUSE , all setup out of the box for btrfs, snapshots, grub rollback, and cleanup timers, etc.

[-] TeddE@lemmy.world 4 points 1 year ago

Wow, first time I've seen GarudaOS recommended by someone who's not me. Awesome distro, daily driver on my gaming rig.

[-] CloverSi@lemmy.comfysnug.space 7 points 1 year ago

There are dozens of us. Dozens!

[-] saplyng@kbin.social 4 points 1 year ago

I use it for home and work! I quite like it though I miss latte dock still, dragging windows from the top bar was just so useful for me

[-] bjoern_tantau@swg-empire.de 23 points 1 year ago

If you're married stay away from ReiserFS.

[-] banazir@lemmy.ml 9 points 1 year ago

Ah, ReiserFS. I remember when it was the cool kid's choice. Then with the murdering it went out of style. They were weird times.

[-] captain_samuel_brady@lemm.ee 4 points 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 4 points 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.

[-] jhulten@infosec.pub 20 points 1 year ago

Hans Reiser murdered his wife.

[-] r00ty@kbin.life 15 points 1 year ago

Oh. I did not know that! I thought it was some vague reference to losing entire weekends fixing the corrupt data.

[-] backhdlp@lemmy.blahaj.zone 23 points 1 year ago

ext4 works perfectly fine for me and most people.

[-] kogasa@programming.dev 17 points 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.

load more comments (2 replies)
[-] Anticorp@lemmy.ml 15 points 1 year ago

Ext4 is all I use, except for boot partitions that require different filesystems.

[-] shirro@aussie.zone 12 points 1 year ago* (last edited 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.

[-] jg1i@lemmy.world 12 points 1 year ago

Most people should use ext4. Only use something else if you want to tinker and don't need long term data storage.

[-] GitProphet@lemmy.sdf.org 11 points 1 year ago

I run ext4 inside lvm (inside luks)

[-] nothacking@discuss.tchncs.de 10 points 1 year ago* (last edited 1 year ago)

Ext4 is old, but fast and very robust. You won't loose data or corrupt the filesystem if your system looses power. It can even survive partial wipes, if you accidentally overwrite the first few megs of you drive with a messed up dd, nearly all your data will be recoverable, including filenames and directory structure.

It doesn't have very fancy features, but it is the best tested and most robust option available. (also the fastest due to its simplicity)

Btrfs has things like copy on write files that can protect you from an accidental rm, but this won't save you from drive failures, so you still need backups for important data.

[-] AffineConnection@lemmy.world 6 points 1 year ago* (last edited 1 year ago)

You won’t loose data or corrupt the filesystem if your system looses power.

Some secondary storage devices ignore standards and outright lie about sectors being successfully written when they are actually scheduled to be written out of order. This causes obvious problems when power failure prevents the true writes from completing. Nothing can be guaranteed for such drives.

[-] Helix@feddit.de 9 points 1 year ago

Btrfs or xfs. Sometimes ext4.

[-] 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 8 points 1 year ago

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

load more comments (2 replies)
load more comments (1 replies)
[-] maeries@feddit.de 9 points 1 year ago

ITT 5 answers by 4 people

load more comments (1 replies)
[-] ace@lemmy.ananace.dev 8 points 1 year ago

We're moving towards more btrfs - or at least LVM+ where there's no btrfs support - on as much of our server fleet as we can, since the lack of snapshotting on the other filesystems is making consistent backups way too expensive resource- and time-wise.
With LVM it's at least possible to take a block-level snapshot - which is really inefficient compared to a file-level snapshot, but it at least provides a stable point for backups to run from, without having to pause all writes during the backup or risk running out a sliding window if allowing writes to continue.

For a home user (especially one who's not as well versed in Linux or don't have tinkering time), I'd personally suggest either ext4 - since it's been the default for a while and therefore often what's assumed in guides, or btrfs where distros include it as a default option - since they should be configured with snapshots out of the box in that case, which make it much harder for the system to break due to things like unexpected shutdowns while running updates.

I'd personally stay away from ZFS for any important data storage on home computers, since it's officially not supported, and basically guaranteed never to be either due to licensing. It can remain a reasonable option if you have the know-how - or at least the tinkering time to gain said know-how, but it's probably going to be suboptimal for desktop usage regardless.

load more comments (2 replies)
[-] avidamoeba@lemmy.ca 8 points 1 year ago* (last edited 1 year ago)

Ext4 is probably going to be the fastest. When it comes to reliability, old is good. If you don't need any of the features Btrfs and ZFS, you'll reap higher performance using Ext4. Otherwise ZFS is more feature-complete compared to Btrfs, however it's generally not available as root fs option in OS installers. Ubuntu used to have it as an experimental option but I think that's gone now. If you know what you're doing you can use it as a root fs. Personally I'm using Ext4 on LVMRAID on a 2-way NVMe mirror. I might be switching to ZFS on root when I get to rebuild this machine. All my storage is using ZFS.

[-] riotrick@lemmy.world 7 points 1 year ago

ext4 is perfectly fine for my needs. It's stable and just works.

[-] Ultra980@lemmy.world 7 points 1 year ago

ext4 is good enough.

[-] floofloof@lemmy.ca 7 points 1 year ago* (last edited 1 year ago)

I'm using btrfs for my desktop and laptop (and its snapshots have saved me a couple of times), and ZFS for my NAS and router. Both seem pretty robust.

[-] czech@no.faux.moe 6 points 1 year ago

I use ext4 for my desktop and zfs for my media server. Ext4 is faster, ZFS is more accurate and less corruptable.

[-] ZephyrXero@lemmy.world 6 points 1 year ago

I usually just use EXT4, but perhaps you should check out F2FS. It's designed for solid state storage mediums, as while most were created with traditional spinning hard discs in mind

[-] fraenki@feddit.de 6 points 1 year ago

At the end of the day though after all of our storage tests conducted on Clear Linux, EXT4 came out to being just 2% faster than F2FS for this particular Intel Xeon Gold 5218 server paired with a Micron 9300 4TB NVMe solid-state drive source

I'll suggest XFS.

[-] tony@lemmy.hoyle.me.uk 5 points 1 year ago* (last edited 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?

load more comments (1 replies)
[-] drwankingstein@lemmy.dbzer0.com 4 points 1 year ago* (last edited 1 year ago)

I still swear by F2FS, been super reliable and very good perf

load more comments (2 replies)
[-] jsveiga@sh.itjust.works 3 points 1 year ago* (last edited 1 year ago)

O use ext4 at home and in servers that are not SLES HANA DB ones.

On SLES HANA servers I use ext4 for everything but the database partitions, for which SAP and SUSE support and recommend XFS.

In a few occasions people left the non-db partitions as the default on SUSE install, btrfs, with default settings. That turned out to cause unnecessary disk and processor usage.

I would be ashamed of justifying btrfs on a server for the possibility of undoing "broken things". Maybe in a distro hopping, system tinkering, unstable release home computer, but not in a server. You don't play around in a server to "break things" that often. Linux (differently from Windows) servers don't break themselves at the software level. For hardware breakages, there's RAID, backups, and HA reduntant systems, because if it's a hardware issue btrfs isn't going to save you - even if you get back that corrupted file, you won't keep running in that hardware, nor trust that "this" was the only and last file it corrupted.

EDIT: somewhat offtopic: I never use LVM. Call me paranoid and old fashioned, but I really prefer knowing where my data is, whole.

load more comments (4 replies)
[-] ryannathans@lemmy.world 3 points 1 year ago

Ext4 for general pupose linux. Zfs for bsd network drives

[-] SinJab0n@mujico.org 3 points 1 year ago

It depends, for a normal user? Ext4, maybe btrfs because in terms of stability is the best {but u lose some functions like the ability to make a swap file, wich today isn't really that useful, but u lose the ability to make one). Want something really fast fort large files? ZFS, but if u experience an energy loss it could be really catastrophic.

Ext in general is so good that even to this day android it's still using EXT2, 2!

load more comments (3 replies)
load more comments
view more: next ›
this post was submitted on 20 Jul 2023
87 points (91.4% liked)

Linux

48654 readers
1222 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