9 ms·
The SGI XFS Filesystem
- miohtama 3y agoDoes XFS offer benefits or tradeoffs of ZFS/ext4/others today? I have been using it with Linux since early 2000. But I am not sure how the file-system development has been lately e.g. with the SSD revolution.
- DiabloD3 3y agoI think you meant ZFS, not zsh. I use both XFS and ZFS. XFS in any situation where it is a single drive (ie, my laptop), ZFS in any situation where I'm doing actual fault tolerant high performance storage stuff. I don't see where ext family really matters in modern storage. If I decide to not use XFS anymore, there are flash-dedicated filesystems that will beat ext in performance and reliability on SSDs that better fit the future.
- miohtama 3y agoFixed, thank you!
- XorNot 3y agoZFS is actually ideal for single drives because even if you can't do recovery, knowing a file has corrupted is extremely valuable.
- anecdotal1 3y agoset copies=2 or 3 and it can recover corrupted data on that filesystem at the expense of storage
- 5e92cb50239222b 3y agoSSDs are very likely to put all those copies into a single physical block underneath. Since ZFS makes backups easy, better stick to copies=1 and do backups often.
- p01ge 3y agoWrong. ZFS' copies are made across several different devices.
- vladvasiliu 3y agoWhat do you mean? The discussion in this particular sub-thread is about running ZFS on a single drive (think laptop). Does it have some kind of mechanism to send the write for a copy "later enough" that it will likely end on a different physical block?
- poige 3y agoI meant "primarily this copies mechanism is targeted towards multiple devices setup". With a single SSD it's indeed prone to the caveat which was pointed out; even if not due to being mapped to same storage "area" but also because SSDs often fail completely. Also makes sense to note that __when__ narrowed to a single-disk setup ZFS' can be interchanged with Btrfs; almost same set of features but lesser overhead and complexity.
- poige 3y agoWrong. ZFS' copies are made across several different devices. (2nd copy)
- krylon 3y agoIf you are using ZFS on a single drive, they reside on the same drive by necessity. Which was the case the parent posters were talking about.
- anecdotal1 3y agoI shouldn't think that's true. Why wouldn't the firmware be splitting writes across different physical chips for performance and wear leveling reasons?
- 5e92cb50239222b 3y ago> there are flash-dedicated filesystems that will beat ext in performance and reliability If you mean f2fs, it really won't. Be careful with it. https://www.usenix.org/system/files/atc19-jaffer.pdf https://www.usenix.org/system/files/atc19-jaffer.pdf The paper is old at this point, but I found a fresh PhD thesis from the same author from 2023, and it seems to re-confirm these findings.
- DiabloD3 3y agoThat sucks. I know a lot of Android users that prefer f2fs over ext* due to reliability and performance concerns, and seem to at least have some concrete reason to believe so.
- vermaden 3y agoSingle drive ZFS is also a great use case for ZFS because: - full data integrity check (not only metadata like with XFS) - transparent compression (LZ/ZSTD/...) - ZFS Boot Environments - makes your system bulletproof against changes - easy move ZFS Boot Environments between systems with zfs send|zfs recv commands None of that is possible with XFS.
- theodric 3y agoI'm too lazy to summarize this beyond saying both ext4 and XFS have their advantages and disadvantages, and both are still under active development. ZFS is a funny and problematic one that does lots of cool tricks but isn't properly free and gobbles resources. Check this: https://linuxhint.com/xfs-vs-ext4-brief-comparison/ https://linuxhint.com/xfs-vs-ext4-brief-comparison/
- arp242 3y agoZFS (or rather, OpenZFS) is absolutely Free Software and Open Source under any definition. Richard Stallman will tell you the same thing. It just has an unfortunate license that's not GPL-compatible and this causes problems with GPL kernels (e.g. Linux), which is a very different thing than "not being properly free".
- Paul-Craft 3y agoContext: https://en.wikipedia.org/wiki/Common_Development_and_Distribution_License#GPL-INCOMPATIBILITY https://en.wikipedia.org/wiki/Common_Development_and_Distrib... However, the wiki article also notes that Ubuntu includes it by default as a binary module. That seems like a sensible thing to do from a legal perspective, since it's generally accepted that binary modules are not "linked to" the kernel in such a way as to trigger GPL provisions relating to such linkage.
- theodric 3y ago"Don't use ZFS. It's that simple. It was always more of a buzzword than anything else, I feel, and the licensing issues just make it a non-starter for me." -Linus Torvalds https://www.realworldtech.com/forum/?threadid=189711&curpostid=189841&ref=itsfoss.com https://www.realworldtech.com/forum/?threadid=189711&curpost...
- stormking 3y agoEven Linus gets it wrong from time to time. And here he is absolutely wrong.
- 3y ago
- chasil 3y agoIf you look at database benchmarks on TPC.org, you will find that many of them are on XFS (as a consequence of using RHEL/CentOS), which was designed with database performance in mind. It used to be necessary for Oracle to use raw partitions to get the very best database performance. I haven't heard of anyone doing that for many years. "The default implementation in most kernels is simply a file-global lock placed at the in-memory inode, making sure there can be only one writer per inode. Implementers of databases hate that because it limits the write concurrency on any single file to One. This is, for example, why Oracle recommends that you make tablespaces from multiple files, each no larger than one GB. "XFS, in O_DIRECT mode, removes this lock and allows atomic, concurrent writes, making database people very happy." Developers at Oracle have posted a number of blog posts on their code changes for Linux XFS. https://blogs.oracle.com/linux/post/introduction-to-xfs-transaction-mechanism https://blogs.oracle.com/linux/post/introduction-to-xfs-tran... https://blogs.oracle.com/linux/post/xfs-online-filesystem-checking https://blogs.oracle.com/linux/post/xfs-online-filesystem-ch... https://blogs.oracle.com/linux/post/xfs-2019-development-retrospective https://blogs.oracle.com/linux/post/xfs-2019-development-ret... https://blogs.oracle.com/linux/post/xfs-whats-new-and-whats-next https://blogs.oracle.com/linux/post/xfs-whats-new-and-whats-... There can be a strong bias against Oracle at HN (and I understand why) but credit must be given where it's due.
- miohtama 3y agoZFS is also from Oracle, right? Seems like a dominating force in the FS industry if one can call it a such.
- whiskeytuesday 3y agoI mean, in that it came out of Sun, kind of I guess.
- chasil 3y agoBtrfs is the filesystem for which they are most responsible. They explicitly do not support its use for their database. "[Btrfs] was initially designed at Oracle Corporation in 2007 for use in Linux, and since November 2013, the file system's on-disk format has been declared stable in the Linux kernel." https://en.m.wikipedia.org/wiki/Btrfs https://en.m.wikipedia.org/wiki/Btrfs They own the rights to ZFS by way of their purchase of Sun Microsystems. Oracle is a power player in the realm of Linux filesystems, no doubt.
- DiabloD3 3y agoI'm a fan of XFS. I've used it for over a decade for all systems that don't need ZFS. In fact, due to the lifespan of the headless box under my desk (ie, predates bootable ZFS root partitions under Linux), its root partition is still XFS, while the actual real storage is ZFS managed
- liendolucas 3y agoI think the main issue with ZFS is that you need to learn a lot of concepts to actually understand how to do things correctly and don't fuck up. To this day I've written some personal notes as warning reminders to be careful about certain operations. I can't remember the exact terminology (I believe these are called "attributes" or "features" in ZFS), but what happened to me not long ago was that if I created a ZFS filesystem (along with a pool) from Ubuntu it was creating some of these features that ZFS on FreeBSD didn't properly recognize and didn't allowed me to successfully mount it. The other way round creating it from FreeBSD and then mounting it on Ubuntu worked as expected. The thing with these "features" is that they can be "promoted" or "upgraded" and in this case if you do so will again render the ZFS unavailable to be mounted in FreeBSD. I spent a whole day on this until for some reason I decided to print this list and effectively compare and do some online search about it.
- mustache_kimono 3y ago> if I created a ZFS filesystem (along with a pool) from Ubuntu it was creating some of these features that ZFS on FreeBSD didn't properly recognize and didn't allowed me to successfully mount it. I mean... shrugs ...you could format it as XFS and not be able to mount on FreeBSD either? Seems like feature flags is a good way to solve this problem.
- liendolucas 3y agoI was actually going to ask that... Is XFS a good "portable" filesystem across GNU/Linux and different BSD flavors? Native support or through FUSE? The use case are USB drives. I don't mind losing visibility on Windows or MacOS, just to work flawlessly between these without major efforts. Edit: Added some comments.
- bombcar 3y agoXFS was the first time I felt i had a “real” file system on Linux, ext2 being long in the fsck and reiserfs doing strange things with tail packing.
- blipvert 3y ago25+ years using XFS (IRIX user). Never a single problem (hardware failures aside). My go-to filesystem.
- metadat 3y agoDo you run IRIX on all your personal machines at home?
- blipvert 3y agoMy bad, I was unclear - I used to admin IRIX years ago, hence using XFS before it got ported to Linux, but then carried on using it once available. I do have an old Challenge S in the basement that I should dig out though …
- wkat4242 3y ago[flagged]
- wazoox 3y agoXFS is incredibly robust. I manage many petabytes of XFS machines. Some have XFS volumes in the 2 PiB range. And it's also extremely fast. And I remember when I created my first folder with several billion files and it just worked :)
- MichaelZuo 3y agoHow does it compare to ReFS or other more recent systems?, if you've ever looked into it.
- klooney 3y agoIt's really hard to compare filesystems between windows and Linux- all of the layers above the filesystem are so different and confounding.
- Tor3 3y agoMy exact experience as well. We use XFS for every system at work which needs lots of data input/output and large amounts of files. Never had a filesystem failure.
- jeffbee 3y agoOne thing I have long been suspicious of, but never swept out the parameter space to know for sure, is how one should set sunit, swidth, agcount or agsize to exploit the parallelism of an SSD and modern CPU. Used to be that sunit, swidth, and agsize were critical for RAIDs because getting them wrong would mean weird stripe misalignment, and if you did not set agsize all of your metadata load would be on a subset of the array. These days an SSD has way more natural parallelism than any RAID ever had, and we have more CPU cores than ever. Are we supposed to be setting sunit, swidth, and agsize? Or does the flash translation mean it doesn't matter? And how best to mkfs.xfs when your SSD offers LBA sizes other than 512?
- pengaru 3y agoNot that I'm advocating everyone spam him with their XFS questions, but Dave Chinner has always been helpful and responsive whenever I had informed questions for him. If you raised such a question on lkml or fsdevel directed at him, it wouldn't surprise me one bit if you (and everyone subscribed) saw a helpful response in a timely manner.
- jeffbee 3y agoYou might be right, and I have no reason to doubt the expertise and helpfulness of this individual. However, in my experience, it’s often true that the developers of software are not experts in the systems-level performance and efficiency questions. So I’d love to read about some hard data relevant to the question, some kind of metadata-heavy benchmark or something.
- 5e92cb50239222b 3y agoYou might want to look up XFS benchmarks from a few years ago and compare them to today's if you think Dave is not an expert on (file)system performance.
- Paul-Craft 3y agoWhile we're on filesystems, what would be the better choice for a home NAS array with, say, 10-20 individual drives and, say, ~2-300 TB raw storage: ZFS or btrfs? Let's assume that all drives in the array are connected via a common SAS or SATA 3 backplane and that the array is on a local network with at least 1Gbps speed. Is there any other fs that would even merit consideration at this point? How does the inclusion of SSDs as cache drives for the array modify this? Does any of this change if we specify 10Gbps LAN?
- wkat4242 3y agoZFS for sure. RAID on btrfs is still not quite stable and commercial deployments such as Synology use a different software raid layer instead of the built in support. Ps just considering reliability here. In terms of performance I don't know.
- tiberious726 3y agoRaid 1 and 0 are perfectly stable on btrfs and have been for a decade. I don't think anyine ever fixed raid 5 or 6 on it tho...
- 5e92cb50239222b 3y agoPerformance is better on ZFS too, especially for bittorrent and VM images. Just remember to set recordsize appropriately (typically 1M for large file storage).
- codetrotter 3y ago> This is part 3 of a series. The first part is “1974 ”. The second part is “1984 ”. > In 1994, the paper Scalability in the XFS File System saw publication. Computers got faster since 1984, and so did storages. Crossing my fingers that either 2004 or 2014 will be about ZFS. In 2013, OpenZFS was founded to coordinate the development of open source ZFS.
- donatj 3y agoWe use XFS for an internal queue because it handles large numbers of files (millions - billions) better than basically anything else we've tried.
- johnea 3y agoBloatware since 1994...
- johnea 3y agoLVM ftw...
- yjftsjthsd-h 3y agoWhat are you trying to say? LVM sits underneath a filesystem; it's not an alternative or replacement for XFS (in fact, they make a pretty good combination).
- bediger4000 3y ago> Also, the Unix community as a whole was challenged by Cutler and Custer, who showed with NTFS for Windows NT 4.0 what was possible if you redesign from scratch. NTFS is a slightly modified ODS-11. It was not a redesign from scratch.