File system Help

I recently asked a question about Re-installing EndeavourOS with BTRFS over in this thread - Reinstall EndavourOs with BTRFS

But In doing so I learned a bit more and started doing more research and came across this article:

Now obviously Speed is not the only factor in choosing a file system, but I’m not sure I’m educated/informed enough to really make sense of all the information I was able to find on File systems like XFS and F2FS

My system is a brand-new build, running everything of a single Terabyte NVME
obviously using a file system geared towards flash media would increase performance, but what are the downsides of XFS and F2FS?
if someone could at least point me in the right direction, give me some articles to read or information to look at I can try to make sense of it.

I figure if I’m going to re-format and re-install I might as well learn first, and got thinking that maybe BTRFS wasn’t the best choice for my specific setup.

1 Like

From digging into this a year ago there are a few things I learned:

Ext4 is these days the fastes file system for SSDs despite being old and rock solid.

Btrfs is still controversial with a number of people still arguing that it ate all their data while others trust it completely.

F2FS is supposedly optimized for SSDs but doesn’t seemto be makinga huge difference compared to Ext4 with a lot of benchmarks actually having Ext4 coming out on top

1 Like

What file system you choose is not that big of a deal for most people in most circumstances. If you want something rock solid then ext4 is the way to go, otherwise if the benefits of btrfs are something you find alluring, give that a go. It’s not like one will be blazing fast and the other slow as molasses :slight_smile:

1 Like

Looking at the linked article from Phoronix though there does seem to be a decent speed difference. Am I misunderstanding the article?

There’s a practical difference and a measurable difference. I’ve used both ext4 and btrfs and for day to day tasks I personally couldn’t tell the difference and I doubt anyone else could either.

Also performance / lifespan of disks are dependent on best settings for given type of disk as well,like disk scheduler, for example nvme drives will have best performance with it turned off…

Later that month i’ll write article based on research back at Manjaro forum, however i’m not 100% sure still on all the info in there so any input will be welcome.

In a nutshell here was that research, i just need to reformat it:

and this:

Hope it’ll give you few ideas to test :frog:

1 Like

Thank you for this it’s a great start, I am trying to learn as I go and this has a lot of information

1 Like

btw for the most part Linux defaults are good…

I’m just very paranoid about that (and any potential future changes), hence like to explicitly set stuff about disks to ensure they live longer and perform best :upside_down_face:

It’s actually a good thing you shared this I was running the Linux ZEN kernel and found out it was forcing the BFQ scheduler, even after trying to change it in GRUB.
Like said, learning as I go.

Yeah, best way to use udev rules :partying_face:
P.S. Man…I really need to rewrite that research :joy:

1 Like

Keep at least 15-20% of drive free
(quoting from one of the links)

Don’t manufacturers set aside a percentage of the disk for over-provisioning by default?

Depends on manufcaturer (and i think it’s only applied for Windows anyway, on Linux you should be on your own)

1 Like

So are there any real draw backs to using XFS or F2FS as a main file system?


Don’t know anything about F2FS, but XFS has on major for me personally - fragmentation:

There’s also that:

:cow: but i think it’s still not production ready?
Yep, i think so:

All filesystems will become fragmented. XFS has the feature that it has a defragmenter. :wink:

I actually had data corruption in an ext4 backup , lost all my passwords :grimacing:
Now on an encrypted Btrfs thinking to change the backup to Btrfs too . I think copy on write will deal with data corruption ( just my thought )

Yeah, but problem is with XFS it works not even close as good if you compare to something like ext4…
That’s drawback.

Doesn’t Btrfs have that too ?

Automatic defragmentation

COW (copy-on-write) filesystems have many advantages, but they also have some disadvantages, for example fragmentation. Btrfs lays out the data sequentially when files are written to the disk for first time, but a COW design implies that any subsequent modification to the file must not be written on top of the old data, but be placed in a free block, which will cause fragmentation (RPM databases are a common case of this problem). Additionally, it suffers the fragmentation problems common to all filesystems.

Btrfs already offers alternatives to fight this problem: First, it supports online defragmentation using the command btrfs filesystem defragment . Second, it has a mount option, -o nodatacow , that disables COW for data. Now btrfs adds a third option, the -o autodefrag mount option. This mechanism detects small random writes into files and queues them up for an automatic defrag process, so the filesystem will defragment itself while it’s used. It isn’t suited to virtualization or big database workloads yet, but works well for smaller files such as rpm, SQLite or bdb databases.

I think BTRFS auto-defrag works better than XFS, although i haven’t really tested BTRFS

1 Like