Return to Level1Techs.com

Is BTRFS still relevant?

#1

I recently just installed Manjaro on my PC. I set it up with BTRFS because I knew it has SSD and TRIM. Does ext4 have that stuff also? Should I reinstall since I don’t have much setup on it yet?

It’s on a Intel 520 128GB SSD.
I7 3770k
16GB ddr3 1866mhz
GTX 1070

0 Likes

#2

Yes ext4 has trim too. Both work fine on SSDs.

BTRFS is fine, no need to reinstall.

1 Like

#3

Works fine as long as you don’t need any of the advertised standout features.

3 Likes

#4

Standout features?
Like what? Snapshots though timeshift?

I was mostly wonder if there is any kinda bottleneck I’d get cause I read something about readback on write?

0 Likes

#5

snapshots degrade performance, and each new snapshot degrades it more.

advanced raid support write holes and loses data

compression causes issues because it doesn’t transparently report actual spaces or file sizes

Not inherent issues in CoW but the design of btrfs specifically.

If you want raw throughput, use mdadm, ext4 + noop

if you want more flexible partitions and volumes, use lvm.

if you want snapshotting or any other feature use ZFS.

5 Likes

#6

As per @tkoham - no it’s irrelevant.

There’s no reason to run BTRFS in my view. If you want the features it offers that supposedly make it better than say ext4 to actually work, you want to run ZFS instead.

ZFS is also cross-platform as well.

BTRFS is a broken, linux-only trap.

0 Likes

#7

well in his case he wants to preserve a pre-existing system

in that case it’s fine as long as he’s not trying to set up anything advanced.

2 Likes

#8

True, but “just recently installed” = “You made a mistake, fix it now rather than double-down on it!”

:smiley:

0 Likes

#9

if he does want a softraid, there’s nothing stopping him from using mdadm or zfs with a btrfs root tho.

from a practical sense i dont see an issue.

1 Like

#10

Just saw this pop in my Google feed, so yeah looks like I’ll be reinstalling with ext4.

0 Likes

#11

0 Likes

#12

btrfs is always going to be slow in write heavy workloads due to being a COW filesystem. If you need the extra speed in that specific workload why not just disable the COW features using chattrib. A even better setup would be running / on btrfs and /home on another filesystem that way you can have the best of both worlds. I think SUSE does this by default and I really like how that’s setup.

0 Likes

#13

Wait, no…

Maybe butter f s is a bit slow to right to (on spinning media) but the only real problem is the write hole.
Don’t throw the COW out with the bath water, it’s one of the key features of the system.

By all means disable it for a system that will be read only, if you do regular checks, and can replace the broken/corrupt bits as they become apparent…

0 Likes

#14

i think btrfs would be my dream filesystem if:

  • The write journal as a separate block device would have bin implemented(it was atempted in 2017)
  • disabling cow improved sql performance more then the insignificant amount it does now.

Perhaps the first one would have helped with the second one :crying_cat_face:

0 Likes

#15

Yup I run EXT4 on the SSD as home and Root on a seperate hard drive thats mechanical… Minimize the writes as I update the linux system

ZFS is the true master race filesystem

0 Likes

#16

Nah, thats due to it being BTRFS not being COW.

Netapp filers for example are copy-on-write (WAFL). ZFS is COW.

COW doesn’t mean it copies a block to write, it just means the new write goes to another part of the disk. COW is by no means inherently slow - and if you’re doing things like parity RAID, COW will actually speed things up as it avoids the read-modify-write cycle to update in place (and also avoids the write hole problem).

Oracle basically bought SUN for ZFS, so the whole “disable COW on databases” for BTRFS is just an example of BTRFS being broken, not COW.

Some people will argue with you, but they’re wrong - out of the currently available options this is indeed the case. ZFS has some trivial (in today’s landscape) overheads on top of regular RAID, but it actually returns the same data you put into it - reliably. Which is kinda the point …

2 Likes

#17

Yep, if you look at charts of btrfs with cow disabled, the iops and sql performance is still very poor :crying_cat_face:

But ZoL does not seem mature yet, And there are multiple open tickets on samsung trim issues.

0 Likes

#18

This is a shame but not entirely surprising to be honest. This is why my long term storage box is FreeNAS… and on Linux i run the gauntlet with Ext4. Anything important though is on the FreeNAS box.

1 Like

#19

Yes and BTRFS could be everything i want from a FS but nothing is up to par, I was looking at the github becose im getting getting two nvme drives in a week+.

I might just do ext4 or looking into xfs but i was hoping for snapshots of running sql dockers.

0 Likes

#20

Wat? It’s incredibly surprising given that ZFS on Linux is now the standard from which all other ZFS is derived.

Edit:
I tell a lie. Not all other ZFS. I mean, Oracle’s ZFS is still Oracle ZFS.

0 Likes