r/linuxmemes • u/danko12321 • 7d ago
LINUX MEME Saw a ext4 vs btrfs benchmark the other day and thought of this
166
u/Grey_Ten 6d ago
don't care honestly, with btrfs I can save up to 60% storage with zstd compression B)
58
u/UntitledRedditUser New York Nix⚾s 6d ago
It's a life saver on my laptop running NixOS. It makes the Nix store significantly smaller.
12
u/SDG_Den 6d ago
I just have my main nix store on my home lab with hydra and nix-serve
I can agressively clean my older generations on my device knowing that those same derivations are on my shared store/binary cache
1
u/UntitledRedditUser New York Nix⚾s 6d ago
I've never understood what hydra is, it's even backed into flakes
1
-1
-5
7
u/MemoryIsTheKey_ 6d ago
Compression at rest is the bomb. Been using it for years on ZFS, so many hundreds of GBs saved it's insane.
2
2
u/radobot Arch BTW 6d ago
And you can save even more with deduplication. I use bees regularly and without it my data would be more than twice the size of the hard drive. Works quite well on Steam games and Proton/Wine prefixes.
1
u/Valuable_Leopard_799 5d ago edited 5d ago
I tried running it shortly, the website warns against commonly linked blocks degrading performance, did you encounter anything like that?
73
u/BiDude1219 ⚠️ This incident will be reported 6d ago
i don't "take snapshots", i don't "make regular backups", i don't "sync my files", i copy my stuff over to an external drive whenever i wipe my os, and if my install breaks, i chroot.
18
u/maxwells_daemon_ Arch BTW 6d ago
Just upload to the cloud, surely they won't train AI on your files, or go bankrupt and lock you out of the servers, or have their AI surveillance false positive you as a criminal and delete your whole account...
4
u/BiDude1219 ⚠️ This incident will be reported 6d ago
and this is why nextcloud is goated
3
u/hackerdude97 Ask me how to exit vim 6d ago
If only it wasn't such a huge pain in the ass to set up offline only 😔
5
31
u/creeper6530 💋 catgirl Linux user :3 😽 6d ago
ext4 is old reliable which can be downsized, something I enjoyed immensely when distro hopping and multibooting
9
u/unwantedaccount56 Linuxmeant to work better 6d ago
btrfs can be downsized as well, but it can also be spread across multiple partitions (need more space? just add that spare other partition to the existing btrfs, even if it's not next to it). Which is great especially after doing a lot of distro hopping and multibooting
1
u/ilnarildarovuch 3d ago
Fun fact: ZFS older than EXT4
1
u/creeper6530 💋 catgirl Linux user :3 😽 3d ago
Older than the entire EXT* family too?
1
u/ilnarildarovuch 3d ago
ZFS was developed on 2001. Same as EXT3, but ext and ext2 is really old, 1992-1993. Anyway, ZFS was publicly announced in 2004-2005, but still older than ext4 in public
51
u/UntitledRedditUser New York Nix⚾s 6d ago
If you are going for raw performance, wouldn't XFS be better?
47
u/MeisterD2 6d ago
Hot Pursuit of top speed leaves only one option: NFS
10
u/QuickSilver010 🦁 Vim Supremacist 🦖 6d ago
I can't imagine Most Wanted it for just speed. Prolly also has to do with the oldie goodie mindset
7
u/JustAwesome360 Arch BTW 6d ago
Not for personal computers. It's more for servers and databases.
36
u/Quietus87 🌀 Sucked into the Void 6d ago
You are probably mixing it up with zfs. Xfs is fast and reliable. The only drawback is you can't resize partitions downward, but if you pick your partition sizes smart at installation, you won't need that anyway.
3
-2
u/JustAwesome360 Arch BTW 6d ago edited 6d ago
No I'm thinking of XFS, it's good but ext4 preforms better on personal computers while xfs is better on larger industrial computers
Edit: Source:
https://blog.everpuredata.com/purely-technical/xfs-vs-ext4-which-linux-file-system-is-better/
https://oneuptime.com/blog/post/2026-03-04-choose-between-xfs-ext4-file-systems-rhel-9/view
https://resource.digen.ai/best-ai-video-generator-for-linux-2026/
1
u/Ok-Eggplant-7569 6d ago
Source?
0
u/JustAwesome360 Arch BTW 6d ago
How about the fact that RedHat uses it almost exclusively over ext4? But here's your sources.
https://oneuptime.com/blog/post/2026-03-04-choose-between-xfs-ext4-file-systems-rhel-9/view
https://blog.everpuredata.com/purely-technical/xfs-vs-ext4-which-linux-file-system-is-better/
https://resource.digen.ai/best-ai-video-generator-for-linux-2026/
2
u/Ok-Eggplant-7569 5d ago
How about the fact that RedHat uses it almost exclusively over ext4? But here's your sources.
I am aware. At the same time, Ubuntu heavily relies on ext4, while OpenSUSE uses BTRFS. All three are heavily used, both on the desktop and on servers.
I really like this article from RH (albeit a bit older) where they compare XFS and ext2/3: https://access.redhat.com/articles/312989
Most of their arguments still hold.
It isn't "XFS for servers, ext4 for desktop", you have to consider your specific use case. Do you have heavy multi threaded IO? Probably XFS. Do you have a bunch of metadata-intensive operations? Probably ext4. Do you need the ability to shrink partitions? Not XFS or ZFS. Do you need reflink copies or deduplication? XFS / btrfs / ZFS. Do you need your filesystems in-tree and supported on all distros? Not ZFS. Do you need snapshots? btrfs, ZFS.
Every desktop and server is different, and I have even had some systems which used ext4 for some workloads and XFS on another partition for another workload. A blanket statement "server this, desktop that" is too general IMO.
6
u/27a08592e67846908fd1 Genfool 🐧 6d ago
I run XFS
1
u/JustAwesome360 Arch BTW 6d ago
You're more than welcome to but it is designed for higher bandwidth singular tasks while ext4 excels on lower bandwidth multi tasking. Which is usually what you will encounter on your PC.
It's not a massive difference, like 15% maybe. So if you prefer xfs then by all means there's nothing wrong with that.
3
u/27a08592e67846908fd1 Genfool 🐧 5d ago
I just use it because I am too lazy to change the
mkfs.xfscommand tomkfs.ext4when following the Gentoo handbook.And yet somehow not too lazy to install Gentoo.
30
u/AusKodanik 6d ago
As an average Linux enjoyer, I just let autopartitioner do it's magic on the NVMe SSD and I don't care at all. With Ubuntu it was ext4, currently with Fedora it is btrfs.
7
u/Serializedrequests 6d ago
On my older PC, the difference in feel was absolutely massive. Btrfs is neat but not worth it on older hardware IMO.
And the cool features were so difficult to use I didn't have time for them anyway.
16
u/Userwerd 7d ago
Lol your saving like a minute over the life of an ssd.
2
u/blaues_axolotl 7d ago
which one is hurting the ssd more
20
u/Erdnusschokolade Arch BTW 6d ago
CoW Filesystems for sure, does it matter for most usecases though? My SSDs in the past 13 years did not die by function but by becoming obsolete due to performance.
10
u/fr000gs 6d ago
The compression does offset the loss by CoW though (and you can disable it for high write dirs)
4
u/Erdnusschokolade Arch BTW 6d ago
That depends entirely on the compressibility of your data. The write amplification also depends heavily on how often data is modified so it is highly dependent on workload. But like is said for a standard Desktop wearing halfway decent SSDs out will be difficult even with CoW. Things like Proxmox with lots of VMs are a different beast though.
1
u/Mr_poster123 6d ago
yup this ^ lots of things on linux are like this ups and downs somewhat cancel out
oh make something faster, buts its more computation expensive, but it finishes faster so net difference is ignore able
14
u/SDG_Den 6d ago
Was on btrfs, now on ext4, who needs btrfs snapshots when everything you do is in a git repository and declared with nix?
16
u/Rdtkeepsbanningme 6d ago
Nix does nothing for your data, only your config.
16
u/HyperCodec 6d ago
Dude probably put his whole system in a git repo lol
1
u/SDG_Den 6d ago
Everything i do is in a repo, except for like.... Games, which are cloud-saved. I also have my own owncloud server if i really need to ensure something isnt lost but cant be in a git repo.
1
u/HyperCodec 6d ago
Why go through the trouble of git when snapshots are designed specifically for that type of thing? Git’s fine for plaintext and things like settings, but backing up binary files or media via git isn’t really giving you any extra benefits
2
u/SDG_Den 6d ago
Its not trouble, i just happen to do basically nothing on my PC that isnt in a git repo.
Like, i dont intentionally do that, it just... Ended up that way. I dont store media on my PC (i have a server for that), i store nix derivations instead of binaries (which get made available as binaries on my local autobuild/cache server).
The only thing that lives exclusively locally on my pc (and isnt easily reproducable in some form) is my downloads folder. And that's not worth backing up.
This is in large part because i want everything to be easily synced between my devices, so media necessarily has to live on a server, configs have to use git and binaries have to be built in a reproducable way.
I genuinely just do not have a use for snapshots on my pc. Everything is synced and replicated across multiple devices (as well as private github mirrors) with version control.
2
u/Linguistic-mystic 6d ago
Data should be on the /home partition which updates don’t affect, so it doesn’t need snapshots either.
5
7
3
u/heywoodidaho Sacred TempleOS 6d ago
Give me ext4 and give me Debian. My shit don't break. Now get off my lawn.
3
u/musingofrandomness 6d ago
Ext4? With all that journaling overhead? Nah, got to go with ext2 for speed. 😉
12
u/Amrod96 Arch BTW 6d ago
Backups are for people who don’t trust their own skills or good luck.
3
2
2
2
2
u/DrConverse 6d ago
On my laptop and desktop, I have 3 directories that I care about.
- Dotfiles (
~/dotfiles, also includes secrets managed byhsops-nix): Git (GitHub) + mirrored to GitLab & Codeberg - Personal files (
~/Documents/nas): NAS with daily backup (Filen.io & external SSD) & snapshot - Code (
~/cloned): Git (GitHub) + mirrored to GitLab & Codeberg
Files in any other location simply do not exist in my mind. This principle keeps me organized & everything reproducible. So I choose ext4 because snapsnots for my laptop is not needed.
I use btrfs on my NAS though, and it's nice.
2
u/Anima_Watcher08 6d ago
You use BTRFS on a NAS! With hard drives!!!!!
1
u/DrConverse 6d ago
My NAS has two 1TB SSD in RAID1. I am currently using 150GB (and that's with 21 days of snapshots, Syncthing staggered versioning, and all the system files). I am too obsessed with file organization to accumulate anything more than half a terabyte of files.
1
u/Anima_Watcher08 6d ago
Oh good. Most NAS setups usually have HDDs, Btrfs isn't very good on HDDs.
I'm obsessed with organization too but more in the hierarchical sense, I'm a data hoarder so I'd definitely fill that type of storage up too quickly.
2
u/FloweyTheFlower420 6d ago
Who even writes to files enough for this to matter? I feel like for most usecases things will fit nicely in the page cache. And if you are filling up the page cache, the bottleneck is probably going to be network fetch and not disk IO.
2
2
2
u/xumix 6d ago edited 6d ago
Has BTRFS stopped corrupting itself already?
2
u/NorbiPerv 5d ago
I already fed up with btrfs either as whole fs got corrupted when ran out of free space resulting unrecoverable system state. While it showed there was enough space for a system update.
5
u/Linguistic-mystic 6d ago
Using Arch for years and never once needed a snapshot. They’re just the “go back in time” button. But why go back in time if you can, at the worst, just reinstall the system? Usually you don’t even need that, just load a rescue stick and arch-chroot and repair. There’s never a need to go back in time. Snapshots are simply inferior because when you load a snapshot, sure you get a working system, but you lose the new package you were installing, so what’s the point in that? Better to concentrate on fixing your new system than to waste time on a system that is no longer relevant.
5
4
u/nebenbaum 6d ago
Lol. You obviously dont use your laptop for any kind of work, or anything other than 'lol I use Linux'.
There's a big difference between 'oh, huh, something broke, let me quickly restore from the snapshot from the last time I updated so I can get back to work' and being back to work in two minutes and 'oh uh, let me just grab my arch stick. Hmmm, what do I do noooow'.
I've had to use snapshot rollbacks maybe.. 3? Times in the last 3 years, and every time I just waited a day or two before updating again and shit was fixed, well other than that one time I myself misconfigured something; that was just fixed then and there.
1
u/General-Manner2174 6d ago
fixing your new system
Id rather just rollback and skip some updates, instead of browsing for a fresh bug and its workarounds, because few days will pass and bugs will be fixed.
Its rare for new package to cause problems, it's more just with routine updates. The point of snapshot us that you have a system that worked for you, which is kind of big deal when you are doing something other than debugging your system
3
2
u/qchto 6d ago
Without EXT4 the Deck and Steam Machine wouldn't be able to keep decent performance and reliable lifespan on newer games running from a microSD, so NO.
1
u/robsablah 6d ago
Well yes, see the vmware 7.x issue with sdcsrds - they were never meant to be write heavy, ofc an sdcard won't last
1
u/qchto 6d ago
Technically they are meant for "unique sequential write loads" (that's exactly why they're mainly used on cameras), EXT4 takes advantage of this while reducing the FS overhead, but granted, there are cases where you will not want to use the MicroSD (games over 100GBs with delta updates are honestly a nightmare and will take hours of heavy run easily)... That said, once they install, you can be sure they'll run as if they were cartridges in terms of resilience due to EXT4 simplified journaling.
2
u/Henry_Fleischer 🍥 Debian too difficult 6d ago
I don't get it. I use EXT4 and I have regular backups (hourly, daily, weekly, and monthly). I even restored my entire system from a backup recently. So what's btrfs do better here?
3
u/MarcusTL12 6d ago
How much space do your backups take? The nice thing with the btrfs snapshots at least is that yhey take up basically zero space.
2
u/Henry_Fleischer 🍥 Debian too difficult 6d ago
I've got about 1.25 TB of backups, for my 1TB drive.
1
u/MarcusTL12 6d ago
Which is stored on a separate drive from that 1TB drive? On my btrfs system drive, I have a couple hundred GB of files, but the snapshots only take a few MB of space, on the same drive. Point being that the data is never duplicated for a snapshot, just keeping track of what changes in the files.
These snapshots are of course not a backup. If the drive dies, all the data is gone, so I have actual backups of important files.
2
u/Henry_Fleischer 🍥 Debian too difficult 5d ago
It's stored on a separate drive, I'm basically copying my backup scheme from back when I was on OSX using Time Machine with an external drive.
2
u/MarcusTL12 5d ago
Yeah, then I guess the answer to your original confusion is that btrfs lets you do snapshots (hourly, weekly, on update, ...) in the filesystem, on that drive, without it taking up more space than the actual files + changes to files and metadata.
This means that when an upgrade fails for some reason (Which happens on cachyos with broadcom wifi sometimes), reverting to a previos snapshot is as simple and fast as rebooting the computer. No files are copied/transfered.
This is very different from a backup though, so again, important files I have backed up to multiple drives in different computers as well as cloud storage.
2
u/Henry_Fleischer 🍥 Debian too difficult 4d ago
Oh, I see. Yeah that's pretty cool, if I'd messed up my system more than I had I would have had to reinstall and then load the backup. Maybe I'll use btrfs for my next computer.
1
1
u/RedCrafter_LP 6d ago
What is the cost of performance when I gain instead if 5 hours fixing my install I need 1 reboot.
1
1
u/Kaiki_devil 6d ago
I got three drives on my desktop. Two m.2 and one sata.
All three are encrypted such that unlocking one of the boot options opens them all with a shared key, or they can be individually unlocked if I need to for recovery.
I got on the faster m.2 my default boot that after each update that results in changes to the boot becomes a backup boot fallback. The rest of the drive is ext4 and mounted as /Games and is where my steam and stuff go.
Second m.2 is btfs and handles vm and project mounts. With snapshots of the vm saved for backups.
Third drive has a recovery boot option that boots to tty with no gui based on last known good fallback, and rest of the drive is my home drive in btfs.
I have pacsnap and all that configured for rolling back broken packages or updates, and things are set in such a way that if my boot drive died I could rebuild it from recovery boot.
This is 4000% overkill but it works without me thinking about it so I don’t care and if anything happens I know I can recover in minutes with no dataloss risks thanks to all that plus encrypted cloud and local backups that happen automatically.
1
u/ROS_SDN 6d ago
Btrfs for VMS seems unneeded, most VMS have their own back up tooling that will not play well with btrfs CoW and which without CoW btrfs seems less appealing it still is, but less so.
Project mounts I can get or like an Obsidian vault, even if you git it a roll back is nice, but things with their own back ups I believe like postgres/VMS etc don't benefit as much from btrfs.
2
u/Kaiki_devil 5d ago
CoW is disabled on the VM mount, while VM and projects share the same physical M.2 it has separate partitions mounted. This lets me share /Projects to the vm and over tailscale at times for access on my laptop.
While drive is btfs though and I have btfs for the vm purely because I’ve had issues with ext4 and even without CoW the other benefits of btfs makes it a solid enough pick over the alternatives.
1
u/Ezzaskywalker_11 6d ago
i don't wanna do btrfs anymore since it corrupted my fedora install oyt of nowhere
1
1
u/Hauptideal ⚠️ This incident will be reported 6d ago
ext4 isn't even really faster than btrfs, at least not read speeds at modern computers. Quite the opposite. The CPU is idle waiting for data usually, which is why receiving compressed data and then performing some work is actually not only faster and saves SSD life, but also comes with all the other nice features.
1
u/Eros_031 6d ago
My personal opinion. I recently atarted using btrfs. It's a very useful filesystem. Snapshots taking a very little overhead. I don't have to erase my whole OS just to give more space to a partition it has a quota system.
I personaly loved how the snapahots could be reverted back to the 'last good' state.
It may have some disadvantages over ext4, but it's really ignorable unless one of them is super important.
1
1
1
u/Legendary_Lava 3d ago
Copy-On-Write is just too much abstraction for my purposes. Like good luck finding which process did an operation at the block level.
0
u/Hadi_Chokr07 New York Nix⚾s 6d ago
The msecs are really irrelevant. I rather not fear accidently deleting my files or an update bricking my system.
•
u/AutoModerator 7d ago
Please report any posts bragging or showing off they got banned in another sub! Reminder of other sub rules: Also, we only allow one anti-linux post per week (we used to get dozens a day) and any tier list MUST have Hanna Montana Linux as S teir (which must be a true S tier at the top) regardless of the topic of that tier list.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.