Why Redhat Choose ext3 For 7.2
mz001b writes "There is an interesting article from RH posted on LinuxToday discussing why they chose ext3 over the other available journaling filesystems (ReiserFS, xfs, jfs,...) for RH 7.2"
← Back to Stories (view on slashdot.org)
From: Michael K. Johnson
Date: Tue, 21 Aug 2001 17:53:08 -0400
I wrote up a short piece that I hope to flesh out a bit more later on why Red Hat chose to include ext3 in this release, why you want to use it, and what we did to make it robust.
Its not an anti-any-other-filesystem tirade at all. Dont take any part of it as meant to put down any other filesystem, even ones we have not chosen to ship yet. No hidden agenda involving alien abductions... :-)
Anyway, I hope its useful. Feedback to the list [ roswell-list@redhat.com -ed. ], please.
michaelkjohnson
"He that composes himself is wiser than he that composes a book." Linux Application Development -- Ben Franklin
http://people.redhat.com/johnsonm/lad/
Why do you want to migrate from ext2 to ext3? Four main reasons: availability, data integrity, speed, and easy transition.
Availability:
After an unclean system shutdown (unexpected power failure, system crash), each ext2 file system cannot be mounted until its consistency has been checked by the e2fsck program. The amount of time that the e2fsck program takes is determined primarily by the size of the file system, and for todays relatively large (many tens of gigabytes) file systems, this takes a long time. Also, the more files you have on the file system, the longer the consistency check takes. File systems several hundreds of gigabytes in size may take an hour or more to check. This severely limits availability.
By contrast, ext3 does not require a file system check even after an unclean system shutdown, except for certain rare hardware failure cases (e.g. hard drive failures), because the data is written to disk in such a way that the file system is always consistent. The time to recover an ext3 file system after an unclean system shutdown does not depend on the size of the file system or the number of files; rather, it depends on the size of the "journal" used to maintain consistency. The default journal size takes about a second to recover (depends on the speed of the hardware).
Data integrity:
Using the ext3 file system can provide stronger guarantees about data integrity in case of an unclean system shutdown. You have a choice of how carefully to protect your data. Essentially, you can choose either to keep the file system consistent but allow for damage to data on the file system in the case of unclean system shutdown (for a modest speed up under some but not all circumstances) or to ensure that the data is consistent with the state of the file system (which means that you will never see garbage data in recently-written files after a crash.) The more safe choice to keep the data consistent with the state of the file system is the default.
Speed:
Despite writing some data more than once, ext3 is often faster (higher throughput) than ext2 because ext3s journaling optimizes hard drive head motion. You can choose from three journaling modes to optimize speed, optionally choosing to trade off some data integrity. One mode, data=writeback, limits the data integrity guarantees, allowing old data to show up in files after a crash, for a potential increase in speed under some circumstances. This mode, which is the default journaling mode for most journaling file systems, essentially provides the more limited data integrity guarantees of the ext2 file system and merely avoids the long file system check at boot time. The second mode, data=ordered (the default mode), guarantees that the data is consistent with the file system: recently-written files will never show up with garbage contents after a crash. The last mode, data=journal, requires a larger journal for reasonable speed in most cases and therefore takes longer to recover in case of unclean shutdown, but is sometimes faster for certain database operations. The default mode is recommended for all general-purpose computing needs.
Easy transition:
It is easy to change from ext2 to ext3 and gain the benefits of a robust journaling file system, without reformatting. Thats right, no need to do a long, tedious, and error-prone backup, reformat, restore operation in order to experience the advantages of ext3. There are two ways to do the transition:
A list of reasons Red Hat chose ext3 for our first supported journaling file system follows. Note that these reasons are not necessarily each unique to ext3 (some other journaling file systems share several of the points here) but the whole set of reasons taken together is unique to ext3.
Again, we dont claim that every one of these points are unique to ext3. Most of them are shared by at least one other filesystem. We merely claim that the set of all of them together is true only for ext3.
Here are some of the things Red Hat has done to ensure that ext3 is safe for users to use for their data:
So I read the article, and all of those reasons could easily apply to any of the above filesystems. Never mind that all of them are more mature and more stable than ext3. The only technical argument for ext3 is the upgrade path: ext3 is ext2 with a journal. But the real reason might be that RH can speed adoption (and by the bazaar model, improvement) of ext3, developed at RedHat, this way.