The SGI XFS Filesystem
blog.koehntopp.info
blog.koehntopp.info
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
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.
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.
Edit: Added some comments.
There's been a lot of divergence, and there's not really anything pushing towards convergence. FreeBSD modified UFS to meet their needs and desires and other BSDs went in other directions. There wasn't a lot of clammoring for a disk based data format for data interchange, so there's not a big reason to keep the divergent UFSes compatible. Exchange data via networks or tape archives or tars written to block devices or tarfiles on a widely recognized filesystem (msdos fat will do).
This pattern of a shared source and divergent development isn't super common. It's pretty rare commercially, and few opensource projects have forks that diverge and stay active for decades.
In the Linux world there's mainly just userland differences. I like it the BSD way. Of course Linux sees much more commercial input which I consider a bad thing and one reason I use FreeBSD so much. But for commercial interests it's a good thing to have as much in common as possible to have more potential customers.
- https://vermaden.wordpress.com/2022/03/25/zfs-compatibility/
At the time you last ran it (also said by sibling comment), FreeBSD still had not yet ran upstream OpenZFS, and still ran their own older code. To have had FBSD compatibility at the time, you would have had to only enable the features FBSD supported.
Generating the file system on FBSD, and not running "zfs upgrade" on Ubuntu would be one way of doing this, to avoid having to manually set features at all.
Today this is not an issue, everyone runs the same code.
Hmm. I read the article, but now you've got me wondering: am I missing out on something by defaulting to ext4 rather than XFS?
RHEL is the only distro I know that defaults to XFS.
I find this size unusually arbitrary, but I suspect Red Hat found unwanted behavior in some ext related code. This was after the known issue in e2fsprogs that was fixed around a decade ago preventing fscking of >16TB; RHEL of a decade ago was either "xfs by default" or "xfs if >2TB" or similar, and the installer clearly changed since then.
Casual Googling also says my experience with "RHEL says XFS > 16TB" is out of date, and its now "XFS > 100TB". And like, look, if you're doing 100TB, use ZFS, stop fucking around and do it right.
I remember when ext4 was new there was debate about supporting atomic rename() without fsync(); see https://lwn.net/Articles/322823/
However: This _never_ happened with XFS on Linux systems. Exact same software. I don't know why. But XFS has been incredibly stable for not only my personal boxes but also for everything we have provided to customers at work. We need non-varying sustained write rates for huge amounts of data, and XFS is smooth, much better than when tested against e.g. ext4 (the tests we did were done years ago, we haven't retested as XFS just works.
However it was definitively fixed in a kernel update about 5-10 years ago. I haven’t seen it since.
I tried also the option of running fsck after every crash but this also did not help (some crashes seems to mess up the filesystem badly). At the end i stayed with JFS ( which i was also testing at that time together with Reiserfs) because it was the best balance between speed and CPU power at that time.
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.
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.
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.
(2nd copy)
If you mean f2fs, it really won't. Be careful with it.
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.
- 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.
Check this: https://linuxhint.com/xfs-vs-ext4-brief-comparison/
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".
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.
https://www.realworldtech.com/forum/?threadid=189711&curpost...
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-tran...
https://blogs.oracle.com/linux/post/xfs-online-filesystem-ch...
https://blogs.oracle.com/linux/post/xfs-2019-development-ret...
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.
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
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.
BTTFS is Oracle.
And neither have anything to do with a database, IMHO.
I never did get one to explain why. I suspect it was received wisdom depending on VFS models which cached disk io and an effect on the DB engine. Almost certainly overtaken by both disk controller logic, file systems cache, striping and RAID and increasing memory sizes.
There are good pages on the Web discussing optimising ZFS for postgres tuned to write disk block aligned data through the zfs L2ARC
In practice this might be true if the defaults settings of each layer happen to align sympathetically and/or you know what you’re doing and how to tune them all, but from first principles it stands to reason that the extra abstraction layer of a file system isn’t providing the database storage engine with anything useful?
Same argument for unikernels, distroless containers, LiquidVM (https://docs.oracle.com/cd/E13223_01/wls-ve/docs92-v11/confi...) etc…
But that said: the DBA in question constructed a catenated drive, not a stripe, and were slightly dismayed when we found out it was working at the speed of one disk interface and using only the front pack, not all of them in some kind of parallel or interleaved manner. Not a very smart DBA it turned out.
In a busy database there are lots of processes reading a datafile and multiple processes writing (like DBWR checkpointing dirty blocks from buffer cache, but also some others), so this caused unnecessary file level contention in the OS kernel. Note that Oracle has I/O concurrency control built in, you can't have two processes accidentally writing the same block to the storage at the same time or a reader reading a "torn block" due to an ongoing write (the serialization happens at buffer lock/pin level in Oracle code).
So you wanted to have concurrent I/O and you either had to use raw devices or Veritas VxFS back then. Later on concurrent I/O became available for some other filesystems too, like Solaris UFS having the "cio" mount option, etc.
My go-to filesystem.
I do have an old Challenge S in the basement that I should dig out though …
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?
Ps just considering reliability here. In terms of performance I don't know.
> 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.
NTFS is a slightly modified ODS-11. It was not a redesign from scratch.