- XFS was more fragile, but the issue seems to be fixed.
- XFS was surely a slow-FS on metadata operations, but it has been fixed recently as well.
- EXT4 is still getting quite critical fixes as it follows from commits at kernel.org's git.
- "EXT4 does not support concurrent writes, XFS does"
- (But) EXT4 is more "mainline"
So, the final answer depends on your precise requirements (as usual).
Answer from poige on Stack Exchange- XFS was more fragile, but the issue seems to be fixed.
- XFS was surely a slow-FS on metadata operations, but it has been fixed recently as well.
- EXT4 is still getting quite critical fixes as it follows from commits at kernel.org's git.
- "EXT4 does not support concurrent writes, XFS does"
- (But) EXT4 is more "mainline"
So, the final answer depends on your precise requirements (as usual).
Answer from poige on Stack Exchange- XFS was more fragile, but the issue seems to be fixed.
- XFS was surely a slow-FS on metadata operations, but it has been fixed recently as well.
- EXT4 is still getting quite critical fixes as it follows from commits at kernel.org's git.
- "EXT4 does not support concurrent writes, XFS does"
- (But) EXT4 is more "mainline"
So, the final answer depends on your precise requirements (as usual).
The choice of filesystem makes a difference in certain cases. You should check if your particular use cases are affected by filesystem choice.
For the three very generic bullet points you list, it makes no difference whether you use ext4 or xfs.
If you had a requirement where you wanted to use files larger than 16 TB, you will have to use XFS. (ext 4 will soon have >16TB but not yet)
Why is XFS not more popular? Are there are any concerns with XFS still?
XFS, EXT4 or BTRFS. What to chose for speed and stability?
Those Using The XFS File-System Will Want To Avoid Linux 6.3 For Now
How advanced are Linux file systems like EXT4, XFS, and BTRFS compared to Windows' NTFS and Apple's APFS?
Should I use XFS or ext4 for a database server?
Can I convert my ext4 partition to Btrfs without losing data?
Does using Btrfs snapshots significantly impact performance?
This is for home desktop usage, not servers/data centers where XFS is far more common.
performance - in every test I could find, XFS is near the top, beating btrfs/ext4. Its esp good for parallel workloads and almost everything on a modern desktop is like that. The only perf concern I read about is it used to have higher cpu usage for updating metadata but I believe thats been fixed and no longer relevant?
(I think for most users, performance in benchmarks may not be noticeable and other features matter more, but its still an important consideration)
SSD/OS installs - XFS is almost as fast as f2fs for these. I see no reason why anyone would use f2fs on anything other than a sd card or on any NAND device with wear leveling.
CoW/snapshots - this is no doubt a very powerful feature of zfs/btrfs. But I see very little mention of reflinks/snapshots on XFS which can achieve a lot of this. They are not atomic but enough to satisfy a lot of use cases. I don't see support for this in the usual tools like snapper/timeshift either. XFS also has support for deduping. All of this comes without the usual cost of CoW
other features - dynamic inodes (on ext4 an inode for every 16kb/256kb is wasteful, even if most people never notice it), automatic fsck, journalling (sure, copied from ext3, but thats not a bad thing)
stability/reliability - I don't think there should be any doubt about this. Its a proven enterprise class fs with a hallowed pedigree and reputation, is now backed by RHEL and has probably seen more active development than most other file systems.
The biggest factor seems to be that the default ext4 is good enough, and frankly most people will not care or know about, and should not care, about the underlying fs. There are also distros like Fedora/OpenSuse that used to use XFS as the default and have switched to btrfs. I don't know of anything that uses XFS as default except unRaid now - unRaid is used to manage TBs by home users and that probably says something.
The only concerns I've found are -
a) it doesn't support shrinking a volume. how common is this anyway? I've never seen any home user need to do this, 99% of the time you only need this when you are installing another OS on the same ssd/hdd and need to shrink your current /, which is an advanced use case.
b)supposedly XFS doesn't handle hw failures. Even on this I found no consensus - some people say its risky and can corrupt with no recovery, others say even with a forced shutdown its safe. I'm not sure if its any less robust than ext4/btrfs? Is this actually a concern these days?
Yes, XFS is basically on data=writeback modus operandi. EXT4 is the same, and so NTFS and BTRFS and any modern filesystem.
However, the common "wrong cases" (eg: crash/power loss when truncating a file) are all worked around in the code, so in practice EXT4 and XFS are very stable.
On the other side, many distributions used EXT3 without barriers, which in the wrong situation (eg: powerloss during a journal wrap-around) can totally destroy your filesystem.
In short: XFS is perfectly stable in production scenario, especially on RHEL (and derived) OS where is has many patches and backports from recent kernel releases. For example, while Debian 6.0 XFS performances were quite poor, RHEL 6 was much faster thanks to the delayed logging algorithm implemented in newer kernels and back-ported to RHEL one.
XFS uses the same workaround for "broken" applications that ext4 does. As already mentioned, ext4's "ordered" mode is basically the old ext3 "writeback" mode, with a little extra privacy thrown in. Both have have checksummed logs. Both have checksummed metadata. Both are "enterprise". Red Hat supports ext4 up to 50TB, and XFS up to 500TB. XFS might handle parallelization better on RAID. But I've always found ext4 to beat XFS for performance. For example, on a server I support which has a 6 15k drive RAID 10 array. I've never observed XFS's widely claimed performance advantage over ext4 for parallelism in any of my testing. Both filesystems are rock solid. ext4 is more flexible in that you can shrink it. XFS filesystems can only be grown. A damaged ext4 filesystem might be more effectively recovered by fsck.ext4 than a damaged XFS fs by xfs_repair because of all the static vs dynamic allocation ext4 does. ext4.fsck knows exactly where everything should be. XFS can't know for sure on its dynamically allocated structures.
https://www.phoronix.com/news/Linux-6.3-XFS-Metadata-Corrupt
Written by Michael Larabel in Linux Storage on 26 May 2023 at 10:23 AM EDT. 27 Comments
Multiple users have been reporting metadata corruption issues on the XFS file-system when upgrading to the Linux 6.3 stable kernel.
It seems a back-ported patch to recent Linux 6.3 point releases is causing possible metadata corruption issues with XFS.
Since last week has been this Red Hat BugZilla report over XFS metadata corruption when upgrading to Linux 6.3.3. Others have chimed in as well that others are seeing their servers consistently crash when running Linux 6.3 on their XFS-based servers. A Debian user has also reported similar XFS with Linux 6.3 issues too.
The Linux 6.4 kernel is reportedly working fine for some affected users, which is making it look like some patch(es) may have been poorly back-ported to the newer Linux 6.3 point releases. Right now the Red Hat developers involved in maintaining the kernel builds for Fedora are waiting on more reports/testing for working to track down the problem. For Fedora users on XFS (like is the default for Fedora Server), fortunately, Fedora is holding back its kernel to Linux 6.2 for the moment unless opting into updates-testing.
So for now those running an XFS file-system would be advised to stay off Linux 6.3 until the situation is sorted out and resolved.
I know that Linux often edges out Windows in performance benchmarks, but when it comes to file system stability and features, the file systems that Linux uses (EXT4, XFS etc.) seem to be very antiquated. Is this due to them being already feature complete, or are they actually lagging behind their commercial counterparts?