2008年12月1日星期一

Linux文件系统现状 zz

Although the file system is one of the most important pieces of an operating system, we generally put little thought into them these days. Put bits in, pull bits out. It usually works well enough for desktop systems – until the power fails - but even that is usually pretty painless these days.

On Linux, there are many contenders in the file system arena. ext2 had been the standard for many years, though around 2001 and onward a few other choices become mainstream. Without delving into too much history: journaling support was added to ext2 in the form of ext3, ReiserFS is released, SGI ported XFS, and IBM ported JFS in no specific order. For a few reasons, mostly political, ext3 becomes the de facto file system for Linux.

Classic File Systems

In what I will refer to as “classic” file systems, the idea is basically the same. They essentially bolt journaling to the traditional file system UNIX layout. Here are the highlights from each of these:

In hindsight it seems somewhat tragic that JFS or even XFS didn’t gain the traction that ext3 did to pull us through the “classic” era, but ext3 has proven very reliable and has received consistent care and feeding to keep it performing decently.


Nextgen File Systems

In 2005, Sun Microsystems released the bombshell ZFS file system. This ushered in the era of what I will call “nextgen” file systems. As hard disks have gotten larger, strategies for backup, integrity checking, and support for large files have become much more important. These file systems also aim to ease management by blurring the traditional VFS line or offering tight integration with LVM and RAID. Silent corruption by bad hardware is also cause for alarm, and checksumming has been baked into some of these “nextgen” file systems to counter this.

In many ways, Linux was caught completely off guard and most developers weren’t thinking very hard about the future of file systems prior to the ZFS release. Reiser4 explored some interesting ideas and aimed to be a killer file system (okay I’m really tasteless…) but Hans Reiser enjoyed a particularly bitter relationship with other kernel devs. Luckily, some even more advanced file systems have come into existence recently.

Conclusions

With ext4 coming out in kernel 2.6.28, we should have a nice holdover until Btrfs or Tux3 begin to stabilize. The Btrfs developers have been working on a development sprint and it is likely that the code will be merged into Linus’s kernel within the next cycle or two [http://www.heise-online.co.uk/news/Kernel-Log-Ext4-completes-development-phase-as-interim-step-to-btrfs--/111742].

It seems pretty clear that Solid State Disks (SSD) will be here for good. Theoretically these should blow magnetic storage away in terms of speed. We are already starting to see competitive write performance, and random access and IOPS are very impressive with the latest Intel SSDs. It is good to know that Btrfs plans to incorporate SSD optimization from the start, but these new devices may warrant yet another file system to achieve maximum speed. I personally think that wear leveling and FAT emulation are holding these devices back and would be better implemented by the file system.

P.S.:
I’d been meaning to write this article for a while, but things have been changing rapidly with the introduction of ZFS, Btrfs, and Tux3. I plan on doing benchmarks soon with kernel 2.6.28 against all the classic file systems, ext4, and Btrfs so subscribe to my RSS feed if you are interested. Any comments, corrections, or questions would also be appreciated!

P.P.S.:
Wordpress seems to mangle the format of this post so the bullet justifications are off.


标签:


评论: 发表评论

订阅 博文评论 [Atom]





<< 主页

This page is powered by Blogger. Isn't yours?

订阅 博文 [Atom]