Ext4 Advances As Interim Step To Btrfs
Heise.de's Kernel Log has a look at the ext4 filesystem as Linus Torvalds has integrated a large collection of patches for it into the kernel main branch. "This signals that with the next kernel version 2.6.28, the successor to ext3 will finally leave behind its 'hot' development phase." The article notes that ext4 developer Theodore Ts'o (tytso) is in favor of ultimately moving Linux to a modern, "next-generation" file system. His preferred choice is btrfs, and Heise notes an email Ts'o sent to the Linux Kernel Mailing List a week back positioning ext4 as a bridge to btrfs.
Couldn't they come up with a better name than "BuTteR FaSe?" I know I can't be the only one who read it like that. Call it anything but that.
Unless ZFS has patent issues, why not just work on having ZFS as Linux's standard FS, after ext3?
ZFS offers a lot of capabilities, from no need to worry about a LVM layer, to snapshotting, to excellent error detection, even encryption and compression hooks.
I would like transparent, administrator controlled, versioning. Modified a word document and saved it in place? root can go back and get the old version ( and, alternatively, the user can. root could disable this functionality ).
The pieces are in place, it's doable, just someone needs to program it.
Mod me down with all of your hatred and your journey towards the dark side will be complete!
Something like ZFS immediately comes to mind... but is there some generally accepted definition of what makes a file system "next generation"? TFA doesn't say, and I hate to diminish anyone's efforts here, but the new features in ext4 (according to wikipedia) aren't much to write home about: higher precision time stamps, larger volumes, larger directories, faster fscking. These may be worthy accomplishments but they are incremental improvements, not anything new. Or did I miss something?
ZFS duplicates a lot of functionality that belongs outside of a filesystem.
Very true.
It wouldn't be possible to duplicate RAID-Z with LVM.
Also true.
And the features which could be duplicated, couldn't be done nearly as well without a little more knowledge of the filesystem.
The real problem here is that we're finding out that generic block devices aren't enough to do everything we want to do outside the filesystem itself. Or, if they are, it's incredibly clumsy. Trivial example: If I want a copy-on-write snapshot, I have to set aside (ahead of time) some fixed amount of space that it can expand into. If I guess high, I waste space. If I guess low, I have to either expand it (somehow, if that's even possible) or lose my snapshot.
A filesystem which natively implemented COW could also trivially implement snapshots which take up exactly as much space as there are differences between the increments. But because of the way the Linux VFS is structured, this kind of functionality would have to be in a single filesystem, and would be duplicated across all filesystems. Best case, it'd be like ext3's JBD, as a kind of shared library.
A humble proposal: We need another layer, between the block layer and the filesystem layer -- call it an extent layer -- which is simply concerned with allocating some amount of space, and (perhaps) assigning it a unique ID. Filesystems could sit above this layer and implement whatever crazy optimizations or semantics they want -- linear vs btree vs whatever for directories, POSIX vs SQL, whatever.
The extent layer itself would only be concerned with allocating extents of some requested size, and actually storing the data. But this would be enough information to effectively handle mirroring, striping, snapshotting, copy-on-write, etc.
It wouldn't be universal -- I've said nothing about the on-disk format, and, indeed, some filesystems exist on Linux solely for that purpose -- vfat, ntfs, udf, etc. Those filesystems could be done pretty much exactly the way they're done now. After all, the existence of a block layer in no way implies that every filesystem must be tied to a block device (see proc, sys, fuse, etc.)
But I think it would work very well for filesystems which did choose to implement it. I think it would provide the best of ZFS and LVM.
I haven't actually been seriously following filesystem development for years, so maybe this is already done. Or maybe it's a bad idea. If not, hopefully some kernel developers are reading this.
Don't thank God, thank a doctor!
I'd like to know why Ted Tso and others are working on ext4? Even when ext4 is feature complete it will be the #3 filesystem in linux in terms of features and scalability behind xfs and jfs. I'd like to know what Ted Tso and others grudge against xfs and jfs is because they basically wont even acknowledge those filesystems.
btrfs does have some nice looking features, its basically a gpl rewrite of zfs.
The weakness with linux is in the LVM or EVMS layer. They both suck in that they are not enterprise ready (ie multi TB filesystems, 100+ MB/s sustained read/write) in that they cause unexplained IO hicups, lockups and kernel panics. LVM/EVMS certainly work fine for Joe Blow's HTPC, or a paltry 100GB database but they fall down when under serious load.
This is the problem with open source. Certain areas, like filesystem development attract all the developers, and other areas like LVM/EVMS are seen as busting rocks and nobody wants to work on them. The results is we get a plethora of second rate filesystems (ie ext4) and a buggy LVM/EVMS layer that nobody wants to work on.
Max Volume Size: 8 TiB.
That's not enough. Given that 1TB storage devices are on the market now, that could become outdated quite quickly. You'd be foolish to adopt that sort of filesystem, unless you were absolutely positive that you'd never upgrade (unlikely).
Honestly, ZFS seems like it's the holy grail of filesystems. There are a few small issues that might need to be worked out, though it seems as close to "ideal" as you'd ever be able to get.
-- If you try to fail and succeed, which have you done? - Uli's moose
Not to be confused with binary tree.
-metric
Well, it looks interesting feature-wise but they seem to be explicitly targeting SuSE - which is a no-go for most people.
From a glance at the docs (hey, at least they have docs, that's a plus) it also seems like it's tied to specific versions of EVMS and other parts of the kernel, thus if you don't run a "blessed, certified" SuSE kernel with all the nasty patches then you're on your own.
Just google for "debian|gentoo|redhat|... novell nss filesystem". Apparently nobody even tried to run NSS on another distro, or at least didn't write about it.
I, for one, would only touch this on a blackbox, vendor-supported appliance but never consider it for a production server of my own (none of which run SuSE).
If they worked towards integrating it into the mainline kernel, now that would be nice.
yes, IIRC Windows NT uses rings 0 and 4. However, the problem would not be made better by having more rings, the performance cost is the transition between rings, nothing special about the rings themselves. eg progressing from ring 10 to ring 9 is as expensive as going from ring 0 to 1, or from ring 0 to ring 100.
While btrfs looks quite cool, I'm even more interested to see whether http://tux3.org/ will go anywhere. Let's hope both will materialise and mature soon.
The weakness with linux is in the LVM or EVMS layer. They both suck in that they are not enterprise ready (ie multi TB filesystems, 100+ MB/s sustained read/write) in that they cause unexplained IO hicups, lockups and kernel panics. LVM/EVMS certainly work fine for Joe Blow's HTPC, or a paltry 100GB database but they fall down when under serious load.
LVM has been rock-solid for me with a ~7TB and 2 2TB ext3 filesystems (24 500GB disks) over the course of a year and a half. No problems migrating extents all over the place when I needed to swap disks in and out. Almost identical to HPUX in functionality, but without the sizing constraints.
But, when I tried xfs for kicks I found out that a 7TB filesystem means you need 7GB of RAM to fsck it - impossible on a 32-bit system, I also had a week where I it all went in the shitter because I ran free-space to zero and started getting OS panics and data corruption.
I'm definitely considering jfs for the next generation, my main complaint with ext3 has been ridiculously slow deletes and fsck's. Problems I have read don't exist with jfs.
When information is power, privacy is freedom.
Jail is supposed to be punitive & reflective, not fun or interesting. There are plenty of worthwhile jobs in prison... laundry, cook, librarian, janitor, license plate stamper, etc.
This isn't the sig you're looking for... Move along.
> Just search for benchmarks, something like reiserfs beats ext2 by huge margins
You mean like these ones where ext2 beats reiserfs in most cases and is at least as fast in the others?
> I hope you're joking. ext2 is nice and simple, but it's neither fast not reliable.
> It uses a linear search to find directory entries, which means it's very slow on
> large directories, like Maildir mailboxes.
Believe it or not, the world does not revolve around huge mail servers. Some of us actually run Linux on a desktop, and so don't really care about how well an fs handles a million maildir mailboxes. Latency is the most important criteria, and reiserfs is just too complicated to deliver it, as well as being a largely fringe fs. Especially now with Hans gone, it would become even more fringe.
> It doesn't do tail packing which means it wastes space and is slower with small files.
Yup, I'd like to have efficient small file handling. But really, it is better to avoid having many small files in the first place. Use compressed archives to store such things; it's quite a bit more efficient, and does not require exotic file systems which most normal people (i.e. your customers) will not use.
> It's not reliable because without a journal it needs a fsck after a bad shutdown
I used to do that, and then I got a UPS instead and switched back to pure ext2. The performance hit from journalling is simply too high to tolerate. A decent UPS (pretty much anything made by APC) will prevent the crashes in the first place, solving the problem completely and without any unnecessary overhead. With UPS prices being as low as they are, there is no excuse for not having one, so I think that journalling will become obsolete in some near future.
``Believe it or not, the world does not revolve around huge mail servers. Some of us actually run Linux on a desktop, and so don't really care about how well an fs handles a million maildir mailboxes.''
What if I have large Maildir mailboxes on my desktop system? Or anything else that puts many files in a single directory? Just because _you_ don't need that case to be fast doesn't mean it isn't a good idea to have it be fast, anyway.
``Latency is the most important criteria, and reiserfs is just too complicated to deliver it''
Excuse me? Do you have any numbers to back up that claim? Because I'm having a hard time taking it on face value.
``as well as being a largely fringe fs''
A filesystem that has been included in the mainline Linux kernel for several years, is offered as a prominent choice during installation of various distros, used to be the default fs on some distros, and is widely used by people who make conscious and informed choices about which filesystem to use. But yes, if you want to call it a "fringe fs", go right ahead.
``Especially now with Hans gone, it would become even more fringe.''
This, unfortunately, is all too true. ReiserFS still is a great filesystem in terms of reliability and performance, from tiny files to huge ones, under a wide range of scenarios. Reiser4 was going to be even better: faster and more flexible and extensible, with fast arbitrary attributes and a lot of other goodness. But it never made it into the mainline kernel, and, with Hans Reiser in jail, the future doesn't seem bright for Reiser4. On the other hand, there are various new contenders: ZFS, btrfs, and ext4, just to name a few. None of them seem to be quite there yet, but hey, neither was Reiser4.
``Yup, I'd like to have efficient small file handling. But really, it is better to avoid having many small files in the first place. Use compressed archives to store such things; it's quite a bit more efficient''
Kindly point me at this compressed archive format that lets me fetch files (small and large) by name and other attributes more efficiently than Reiser4 or even ReiserFS. Then please point out how I can use this as I would a filesystem: so that the good old Unix software can access the files. And remember: I need random access to the file contents, and I need to be able to add, remove, write, etc. files. And if any operation is interrupted suddenly and unexpectedly, the integrity of my tree needs to be preserved. Bonus points for full data integrity preservation.
``The performance hit from journalling is simply too high to tolerate.''
Performance hit from journalling? And you're using ext2 to avoid it? Your usage patterns must be very different from mine. True, ext2 running in async mode (i.e. no consistency guarantee at all) is slower than ext3 with journalling which guarantees consistency. On the other hand, with ReiserFS, I can have journalling, guaranteed consistency of at least the filesystem structure, and better performance. Plus, for some strange reason, ext3 seems to lose a lot of files on my systems (although they can be recovered by running fsck) during normal operation. Among the 3, ReiserFS is the clear winner for me. I am not disputing that you may be seeing other data, but let's at least conclude that ext2 is _not_ faster than all journalled filesystems for everyone, and that the performance hit of journalling, if any, is not "too high to tolerate" for everyone.
``With UPS prices being as low as they are, there is no excuse for not having one, so I think that journalling will become obsolete in some near future.''
I think smart people realize that having a UPS is no guarantee that your system will never fail in the middle of a write. So a method to bring the system back to a consistent state is needed in any case. Let's also realize that journalling isn't only for recovery. It is one way to implement transactions, and transactions are useful for more than recovery alone; for example, they can be used to ensure consistency of da
Please correct me if I got my facts wrong.
Not exactly. To effectively change the actual permissions that the permissions rings allow, stacks, segment registers, i/o permission bitmaps, and page tables (among other things) have to be changed. Generally this means reading values from memory into caches, which is slow. Probably the slowest of them all is the page cache. Invalidating the entire page cache is godawful slow, and is necessary if each separate user-space has a truly private address space and not simply a chunk out of the entire virtual address space. Even for operating systems that partition the virtual address space into regions for each user process, the local descriptor (or equivalent) table for segment access needs to be reloaded. This has to happen for every cross-privilege-level call. It is *much* faster to simply call another kernel mode function (push some stuff on the stack, change the instruction register, and you're done) without messing with caches.
In fact, it would be even faster to not separate the kernel and user space processes at all, and instead use formal verification or a virtual machine (which really just means a smaller instruction set that's easier to verify) to prove that no user process could ever mess with the kernel or other processes. Virtual machines for languages are essentially at this stage today; they implement what would constitute a kernel as the run-time level portions of the virtual machine, running the virtualized software in the same address space. There have been some attacks based on virtual machine weaknesses or memory corruption that break the protection model by changing data structures so that they violate the security model. This can happen in OS's that use hardware protection as well, there are just fewer places in memory that random changes can cause problems (just the page tables and other security paraphernalia), making it less likely.
deserved to fsck.btrfs /
Maybe the GPP intended a read-only mount, as a diversified file system is the intent of stability and performance. /usr to a peculiarly advantaged filesystem. Tell me, who has the base system directories constantly in read-write mode, as though they just can't decide what software they want on their computer? Some people have already decided and installed their user applications and libraries; we aren't shuffling everything around like mad XP, OSX, and muVista. Tell me who is faster in read-only? Now consider why one needs journal outside their /home (better to symlink that to the actual, /usr/local/home or /usr/home)? What keeps people from remounting their system root fs to read-write but only to move system binaries and libraries (maintenance), and then just remount read-only when done?
Notice how ext2 is fastest, but none rememered to mount their / in "ro" (read-only) and mount their