Apple kicks ZFS in the butt
Summary: There is still no ZFS in Snow Leopard, we still don't know why. Let's speculate.
I was looking forward to ZFS, but there was a recent article about BTRFS that caught my eye.
What I would really like to see, though, is some modern filesystem with a license that is neither offensive to a commercial vendor like Apple or Microsoft, nor offensive to the GNU crowd, or the BSD crowd. I'm not sure that's even possible, but it would be nice to know that I could format a flash drive in a universal way that isn't FAT32.
I'm running ZFS on OpenSolaris kernel (Nexenta, for GNU userland) for home storage, with my main zpool at 9.06TB spread over 8 hard drives, for almost 7TB worth of ZFS storage.
ZFS isn't quite what's billed to be, but it's (mostly) better than every other current choice. You can read the positives everywhere else, but let me point out some of the negatives.
* Space wastage: block sizes for files grow up to 128K, but they never shrink, and the last block in a file is currently always the same as the overall file block size. This means that files e.g. 129K in size will have 127K of wasted space on disk, and files that were once 128K and truncated back down to 1 byte will still have 128K block size. Depending on the kinds of files, you can see space wastage rates in the region of 25-45%. This isn't theoretical: I had to reduce max block size to 8K on one filesystem to avoid huge wastage.
* Streaming latency: as a media server, I often play movies from data stored on this server, but there's a problem somewhere in the stack (network, OS file cache, filesystem implementation). If I'm playing a movie or TV episode from a ripped DVD (i.e. VIDEO_TS directory) I can guarantee that there'll be at least one glitch in every 40 minutes of playback, where network transfer has dropped to zero for 3 or 4 seconds.
* Device removal: you can add more storage to a ZFS pool, and one can replace any given device with a drive equal or larger in size, but it's not possible to remove a device. If you start out with 8 disks, you're stuck with 8 disks unless you want to backup and restore the entire FS - but at least FS streaming is easy with e.g. zfs send <snapshot> | ssh <remote> zfs receive <filesystem>.
* Fragmentation: there is no defragmentation solution currently. Sure, people say it's "not an issue", that "ZFS is not pathalogical", but the same was said about NTFS, and NTFS fragments like crazy when small incremental writes are used. ZFS performance is known to fall off a cliff (e.g. less than 1% of prior perf) as you approach capacity (symptomatic of fragmented free space) and, more importantly, stay abysmal until you back off quite a bit and preferably drop a whole file system or two. Recommendation is to stay under 80%, which isn't very full.
* Performance: performance is a bit of a red herring; you can make ZFS as fast as you want by adding mirroring and striping. The more interesting case is when you don't have mirrors and stripes out the wazoo, and are relying on RAIDZ or RAIDZ2, and here the performance depends on access patterns. The way the parity and checksumming works, you need to burn a lot of cache to get decent small random read/write performance, because entire blocks need to get read and written even for small updates. So performance looks great for a while, then falls off.
I still think ZFS is one of the best choices for this kind of application - the software RAID, multiple-volume handling is terrific - but it's far from the last word, and not 100% baked (needs defragmentation and data recovery tool ecosystem). BTRFS looks like it could be a very worthy contender, but from what I've read, I haven't seen that it values a storage-unit/pool/filesystem stack, where storage-unit can be a disk, a file or a partition, and still seems stuck on the old device/filesystem approach.
Apple has a history of working on features and then dropping them. They had one in the works for years where your home directory would be sync'd to your iPod so you could plug into any Mac anywhere and get it all back.
It's more than likely that ZFS meant biting off more than they could chew, so they deferred it for another release.
2 things:
1. Sun's shared source license sucks and this is why ZFS isn't natively supported in Linux. 2. btrfs will soon have better features/performance/stability than ZFS, and a better architecture to boot: http://lwn.net/Articles/342892/
I don't really understand the hype around ZFS. What's so great about it?
I've tried it out on OpenSolaris a few times in an attempt to learn why it's so hyped up. The setup process is a bit cryptic and confusing. Even after the initial setup I was really confused about what commands were destructive and which ones were not. Based on that alone I would not consider using ZFS yet. The flexibility of ZFS was a bit lost on me. It seems like there's a ton of limitations and caveats to consider. I can't really comment on performance or reliability since this was a short lab test but in the last 5 years or so I've never lost a HFS+, EXT3 or NTFS file system so I'm not sure just how much more reliable ZFS can be. Is all this hype just acronym lust? I feel like a good RAID card combined with a semi-modern FS is still a better solution. It's certainly easier to setup IMO.
Maybe Oracle is less willing than Sun to license their core differentiating server feature to competitors.
I believe Time Machine is still built on top of ZFS snapshot though. So obviously some ZFS code remains.
Edit: Apparently Time Machine is not based on ZFS. So it seems ZFS is completely off the map after all.
If the point of 10.6 was to add improvements to the OS without major end-user changes, then ZFS could have been tested in the development cycle and then put on hold for the next major release.
Well, they can integrate it in their next service pack then and charge another 50$! :-)