What does Btrfs mean for you and me?
|
Author | Content |
---|---|
Steven_Rosenber May 17, 2010 7:31 PM EDT |
I see the Phoronix article, but what's actually behind any effort (real or imagined) for making Btrfs either the default in a given distro - or making it available at all? Can somebody explain the benefits, if any, of this move. Even Wikipedia http://en.wikipedia.org/wiki/Btrfs is overly technical. What should Joe User (i.e. me) make of this? |
gus3 May 17, 2010 8:22 PM EDT |
Okay, I'll bite. You know how ext{3,4} and JFS and XFS and ReiserFS have journals? They have journal space, and they have file system space. The specific use of the journal varies among filesystems, but it always maintains integrity of at least the file metadata: name, permissions, ownership, allocations. UFS on BSD has soft-updates, and now logging as well. Solaris UFS has had logging for a while since v8 I think. A journal by any other name... Now, you know how Wikipedia and CVS let you examine document states at an earlier time. They hold what are called "deltas". Think of them as patch sets. To find an old document's state, roll back the deltas to that date, and voilá. But why do I bring this up? Dr. John Ousterhout (of Tcl fame) found a way to store the entire filesystem in the journal. Rather than having a master block map, or extent listing, and backup bitmaps all over the place, a log-structured filesystem starts out essentially totally empty. As files, and their metadata, are added, changed, and deleted, the filesystem essentially creates "patches" showing how the overall filesystem contents have changed. Very little updating is done in-place. This has several side-effects: 1. Roll-back is easy. A simple mark-and-sweep algorithm will invalidate filesystem state after a certain timestamp, making all files appear the way it did at that time. 2. Dealing with a filled device can be a PITA. Even removing a file, makes the log grow. 3. Because the log starts at the beginning, and writes to the end, it can be very useful for embedded systems with solid-state drives (SSD) that don't have wear-leveling. That saves wear on SSD, by spreading writes all over. 4. Freeing up space is like rolling back, except it takes the starting marker and moves it forward. Everything done before the new start time is invalidated, freeing up space for further updates. Btrfs supports all the Unix and Linux file semantics, within a log-structured filesystem. Point #2 was a sticky one in early Btrfs development, but it's been resolved. Theodore T'so has stated that Btrfs is "the way forward" (according to WP), but I will respectfully disagree with him on this. For what it does Btrfs is good, but the SATA-based performance numbers I got from it are abysmal. I know it's developed and actively supported by Oracle, but it has a way to go before it can challenge ext3 or a well-tuned XFS system for responsiveness. And finally, to the specific question you asked: I think Ubuntu (Mark Shuttleworth, actually) is foolish for putting a young, un-threaded filesystem on the root, when there are other tried-and-true options available. Btrfs fills a niche, but that niche is not the desktop or the netbook. Whew. How's that? |
Steven_Rosenber May 17, 2010 8:26 PM EDT |
Thanks! |
azerthoth May 18, 2010 3:58 PM EDT |
wow gus, thanks for the thumbnail sketch. it's appreciated. |
hkwint May 18, 2010 7:07 PM EDT |
It's EVMS and ZFS, but better, designed for & license compatible with Linux and maintained. And its maintainer isn't in jail. How's that? Steven: If you don't understand the EVMS / maintained reference, read this: http://lxer.com/module/newswire/view/105865/index.html |
Steven_Rosenber May 18, 2010 7:45 PM EDT |
I'm still back on the bus and worried that ext4 is sapping performance vs. ext3, and the other thing I'm worried about is the kernel, filesystems and optimization for SSDs. hkwint - thanks for the link to your EVMS/LVM article. I of course agree that a GUI to modify LVM (or a really good tutorial on how to do it in the console) is warranted. My "old" Debian Lenny machine used encrypted LVM, and I never had a problem with it (and didn't do any modifications, so maybe that's part of it). Now in Ubuntu I'm not using LVM but do have encrypted /home, and it's ext4. I imagine that an in-place upgrade to a Ubuntu release with btrfs wouldn't change the filesystem type of existing filesystems ... or could/would/should it? Gotta tell you - the one thing I missed in OpenBSD was journaling. My laptop is too damn old, and it crashed due to hardware issues too often - all that manual fscking was a pain. I did just have to manually fsck the root filesystem on one of my remaining Debian Lenny installs - it's a CF card as hard drive and did recover with fsck - a nice thing to have happen. |
gus3 May 18, 2010 8:02 PM EDT |
FreeBSD-current got journaling added to the soft-updates system (SU+J) a few months ago. So many transaction types were already taken care of by SU, that the journal handles the remainder in 16M. It may be just a matter of time until the other BSD's pick it up. |
Posting in this forum is limited to members of the group: [ForumMods, SITEADMINS, MEMBERS.]
Becoming a member of LXer is easy and free. Join Us!