Best Journaling Linux File Systems

SleepWalkerX

Platinum Member
Jun 29, 2004
2,649
0
0
Was thinking about whether I should stick with ReiserFS or try out a new fs. Then when I remember having my reiserfs partition fail on me and cause me to reformat, it pretty much came down to either XFS or JFS as my next partition.

I know each fs has a special area they excel in when judging speed, but just think overall performance.
 

ProviaFan

Lifer
Mar 17, 2001
14,993
1
0
I like XFS, but I started using it back when I didn't feel that ReiserFS was very trustworthy, and there were evidently also some concerns about JFS (mostly that it was new on Linux and untested). I've never tried anything else because XFS has been working just fine.
 

halfadder

Golden Member
Dec 5, 2004
1,190
0
0
I have been using XFS since 1995, originally on a Silicon Graphics Indigo2 workstation running the IRIX OS.

Now I use XFS on all of my Linux machines.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Ext3.

XFS is designed for when your hardware doesn't suck. If your using PC-grade hardware (IDE, SATA, SCSI in a Dell or HP box using Pentium, Opteron, Xeon, cpus, etc etc) then it sucks and XFS puts your data at risk compared to Ext3.

Ext3, in comparision, is designed specificly for commodity-class hardware and does extra things that while may cause it to perform slower on some benchmarks (which doesn't nessiciarlly reflect real world performance), does help to ensure reliability. A filesystem, by definition, is going to be data integrety first, speed second.

From here:
http://linuxmafia.com/faq/Filesystems/reiserfs.html

Date: Sun, 19 Dec 2004 23:10:09 -0500
From: "Theodore Ts'o" <tytso@mit.edu>
To: [a mailing list]
User-Agent: Mutt/1.5.6+20040907i
Subject: Re: [evals] ext3 vs reiser with quotas

On Wed, Dec 15, 2004 at 01:31:13PM -0800, Sean Perry wrote:
> Net Llama! wrote:
> >I really have to ask what you were running when you had that FS
> >corruption. I've never seen anything like that, and i've been using XFS
> >for about 3 years now on over 15 different boxes.
> >
>
> Simple as pie. Set up a machine running XFS. Start some disk activity
> (maybe a test mail server). When the FS is getting solid activity, yank
> the power out. When I saw this happen I had to mkfs and start over.

What probably hit you here is caused by the very simple fact that PC-class hardware is crap.

You see, when you yank the power cord out of the wall, not all parts of the computer stop functioning at the same time. As the voltage starts dropping on the +5 and +12 volt rails, certain parts of the system may last longer than other parts. For example, the DMA controller, hard drive controller, and hard drive unit may continue functioning for several hundred of milliseconds, long after the DIMMs, which are very voltage sensitive, have gone crazy, and are returning total random garbage. If this happens while the filesystem is writing critical sections of the filesystem metadata, well, you get to visit the fun Web pages at http://You.Lose.Hard/ .

I was actually told about this by an XFS engineer, who discovered this about the hardware. Their solution was to add a power-fail interrupt and bigger capacitors in the power supplies in SGI hardware; and, in Irix, when the power-fail interrupt triggers, the first thing the OS does is to run around frantically aborting I/O transfers to the disk. Unfortunately, PC-class hardware doesn't have power-fail interrupts. Remember, PC-class hardware is cr*p.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Reiserfs is the fastest in a lot of cases, but I just can't trust it. Every time I've decided to give it a try it's backfired on me eventually. Whereas XFS and ext3 have been reliable from day one.

XFS is designed for when your hardware doesn't suck. If your using PC-grade hardware (IDE, SATA, SCSI in a Dell or HP box using Pentium, Opteron, Xeon, cpus, etc etc) then it sucks and XFS puts your data at risk compared to Ext3.

Ext3 is just as much at risk as XFS, the only thing I can think of that XFS does that Ext3 doesn't is it nulls out parts of the filesystem before writing new data so if you power off in the middle of a write that file might have chunks of nulls in it instead of data.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
well if you read more down the page I got the quote from it says stuff like this:
What probably hit you here is caused by the very simple fact that PC-class hardware is crap.

You see, when you yank the power cord out of the wall, not all parts of the computer stop functioning at the same time. As the voltage starts dropping on the +5 and +12 volt rails, certain parts of the system may last longer than other parts. For example, the DMA controller, hard drive controller, and hard drive unit may continue functioning for several hundred of milliseconds, long after the DIMMs, which are very voltage sensitive, have gone crazy, and are returning total random garbage. If this happens while the filesystem is writing critical sections of the filesystem metadata, well, you get to visit the fun Web pages at http://You.Lose.Hard/ .

I was actually told about this by an XFS engineer, who discovered this about the hardware. Their solution was to add a power-fail interrupt and bigger capacitors in the power supplies in SGI hardware; and, in Irix, when the power-fail interrupt triggers, the first thing the OS does is to run around frantically aborting I/O transfers to the disk. Unfortunately, PC-class hardware doesn't have power-fail interrupts. Remember, PC-class hardware is cr*p.

Why doesn't ext3 get hit by this? Well, because ext3 does physical-block journaling. This means that we write the entire physical block to the journal, and only when the updates to the journal are committed do we write the data to the final location on disk. So, if you yank out the power cord, and inode tables get trashed, they will get restored when the journal gets replayed.

XFS and ReiserFS do what is called logical journaling. This means that if you modify the mod time of an inode, instead of writing the entire inode table block to the journal, they just write a note in the journal stating that "inode X now has a mod time of Y". This takes much less space, so you can pack many more journal updates into a single disk block. For filesystem benchmarks that try to saturate the filesystem's write bandwidth, and/or that also have very high levels of metadata updates, XFS and ReiserFS will tend to do much better than does ext3. Fortunately, many real-world workloads don't have this characteristic, which is why ext3 tends to perform just fine in practice in many applications, despite what would appear to be much worse benchmarks numbers, at least for some benchmarks.

The problem with logical journaling is that if you do have an unexpected power drop, and the storage system scribbles garbage on the inode table, there's no way to recover. In some cases, the only thing that is left to be done is mkfs and restore from backups. (Backups? You do keep backups, right?)

The practical upshot of this is that if you use XFS or ReiserFS, and you are on crappy PC-class hardware, you ***MUST*** have a UPS, and use a serial/USB cable, so that system can do a graceful shutdown when the UPS's batteries are exhausted.

So that's what I going from. So if he is wrong, then so am I. However, I've read from mailing lists were Redhat engineers say about the same thing, but obviously they have a bias since Redhat is were Ext3 comes from, mostly.

Also Ext3 has a good fsck were xfs and reiserfs does not. If you have corruption or whatnot then the only way to realy notice this in reasier/xfs is if you stumble across it. With ext3 you can run fsck and discover a lot of problems, or at least be able to recover from a lot of problems, that way. And further Ext3 supports multiple modes of journalling, which is very nice were data integrety is a much higher priority then speed. With XFS and whatnot you can only journal metadata.. Their goal is to protect the integrety of the file system's directory system.. not so much the data in the individual files. With Ext3 you have the option to use multiple journalling modes, including data journalling. (but I am sure you already know that)

for other's information:
Ext3 journalling modes..

from http://batleth.sapienti-sat.org/projects/FAQs/ext3-faq.html
"mount -o data=journal"
Journals all data and metadata, so data is written twice. This
is the mode which all prior versions of ext3 used.

"mount -o data=ordered"
Only journals metadata changes, but data updates are flushed to
disk before any transactions commit. Data writes are not atomic
but this mode still guarantees that after a crash, files will
never contain stale data blocks from old files.

"mount -o data=writeback"
Only journals metadata changes, and data updates are entirely
left to the normal "sync" process. After a crash, files will
may contain stale data blocks from old files: this mode is
exactly equivalent to running ext2 with a very fast fsck on reboot.

The default is 'ordered'.
 

xtknight

Elite Member
Oct 15, 2004
12,974
0
71
I've never had a problem with ext2,ext3,or ReiserFS even after crashes with all of them. ReiserFS seemed maybe a little faster than ext3.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
So that's what I going from. So if he is wrong, then so am I. However, I've read from mailing lists were Redhat engineers say about the same thing, but obviously they have a bias since Redhat is were Ext3 comes from, mostly.

It's not that they're wrong, I just think they're blowing things way out of proportion. I've been using XFS since they released 1.0 for Linux and have never had serious corruption. The problem with nulls that I mentioned earlier comes up occasionally, but that's about it.

Also Ext3 has a good fsck were xfs and reiserfs does not. If you have corruption or whatnot then the only way to realy notice this in reasier/xfs is if you stumble across it. With ext3 you can run fsck and discover a lot of problems, or at least be able to recover from a lot of problems, that way.

XFS doesn't have a fsck because it shouldn't be need and it speeds up any automated fsck scripts, but there is xfs_repair which is just as good as e2fsck.

And further Ext3 supports multiple modes of journalling, which is very nice were data integrety is a much higher priority then speed. With XFS and whatnot you can only journal metadata.. Their goal is to protect the integrety of the file system's directory system.. not so much the data in the individual files. With Ext3 you have the option to use multiple journalling modes, including data journalling. (but I am sure you already know that)

Yes, but the data journaling has been the source of multiple problems in the past and I don't think anyone recommends that you actually use it.

 

silverpig

Lifer
Jul 29, 2001
27,709
11
81
I used to use reiserFS and had a terrible corruption, so I started with XFS. That ran great for a long time, but I had a few minor problems after a power outage. I'm now using JFS mostly and really like it, but the fsck is pretty bad.
 

sourceninja

Diamond Member
Mar 8, 2005
8,805
65
91
I'm a ext3 fan with DIR_INDEX enabled. I find it just as fast as reiser3 for my uses, and there are much more tools out there for ext3. Ext3 is insanly tweakable. You can really do a lot with it.
 

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
Eh. Use whichever. XFS, JFS, and ext3 are all quite compelling. For most work, the FS tends not to be a meaningful bottleneck.

XFS & consumer hardware: If you don't have a UPS, and a good PSU*, you know what you're getting into. Really. Not that that's not true, but if I'm concerned enough, I'll get a UPS. Removing power from a computer, without warning, is not likely to happen. Even normal folks are getting dumb and smart UPSes, as well.

* recently, I decided to let my PC continue building stuff during a storm. The voltage dropped often, and the power even went out a couple times for close to a full second. It didn't miss a beat. I'll definitely be getting other Seasonic PSUs in the future.
 

SleepWalkerX

Platinum Member
Jun 29, 2004
2,649
0
0
Thanks for all the input. :)

I did a little more research on several benchmarks and considering reliability too, I think I'm settling for XFS. JFS seems great for my pathetic laptop though. :)
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
I use ext3 on everything I do and have never had a problem. Years ago I had a bad reiser experience - alot of other people did as well. When looking into it, I decided I didn't like the attitude of the reiser people and wasn't going to trust my data to their product anymore.

Now our sysadmin runs reiserfs on all the stuff at work, and we've had several significant filesystem issues - ranging from outright corruption, to basically stalled in its tracks performance. Now these filesystems get used alot harder/differently then the stuff on my own boxes does, but I still don't trust it. Our admin always manages to find something else to blame though, so we're still running it :(
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Originally posted by: Cerb
Eh. Use whichever. XFS, JFS, and ext3 are all quite compelling. For most work, the FS tends not to be a meaningful bottleneck.

XFS & consumer hardware: If you don't have a UPS, and a good PSU*, you know what you're getting into. Really. Not that that's not true, but if I'm concerned enough, I'll get a UPS. Removing power from a computer, without warning, is not likely to happen. Even normal folks are getting dumb and smart UPSes, as well.

* recently, I decided to let my PC continue building stuff during a storm. The voltage dropped often, and the power even went out a couple times for close to a full second. It didn't miss a beat. I'll definitely be getting other Seasonic PSUs in the future.

Seasonic stuff is suppose to be pretty good.

Personally I have a nice big UPS. Life is just much easier that way.. For a while there we were getting brown-outs a couple times everyday. Plays hell with PCs.

One thing that is nice for Ext3 is that it has the most widespread support.. There are Windows drivers for it now (due to it's backward compatability with ext2). Using rescue disks such as usb, floppy or cdrom stuff will be more likely to work with Ext3 partitions then XFS. Things like that.

Although I don't have a problem with anybody using XFS though! I also think that UPS is pretty much a wonderfull thing also, probably more important then choosing between 2 high quality FS's...

Personally I've experianced data loss with both XFS and Ext3 partitions. Both due to hardware f-ups.

The first time with XFS was due to a brown-out. Wiped out my /etc directory.

The second time was with Ext3 when my cat was climing around and fell down on the back of the computer.. in a rather violent manner, yanking cords out and such. Computer was still running, but had pretty much locked up.

My cat was fine, (didn't even faze her, she tried to climb right back up) but my /home partition was now located in the lost and found. Going through 8+ gigs of materal that are arranged by inode number is not a fun thing.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Using rescue disks such as usb, floppy or cdrom stuff will be more likely to work with Ext3 partitions then XFS. Things like that.

XFS for Linux 1.0 was released in 2001 so the only time XFS support should be a problem is if you're using an extremely old rescue CD or if they deliberately excluded it. And if they deliberately excluded it you should get a new rescue CD because any rescue CD worth using should support as many filesystems, partiton layouts, device drivers, etc as is humanly possible.

 

xcript

Diamond Member
Apr 3, 2003
8,258
1
81
I prefer XFS. I've been using it since late '02 and never had any serious problems with it (and until recently I was living on a small island and was constantly subjected to power (brown)outs).

ReiserFS may be faster (not sure as I haven't tried it yet), but I know a few people who have had data corruption problems with it so I'm not really tempted to give it a go.
 

AmigaMan

Diamond Member
Oct 12, 1999
3,644
1
0
This link was on Digg recently and compares ext3, reiser, xfs, jfs on Debian. XFS was the one that came out on top.

On another note, how hard is it to switch from say ext3 to xfs? I've got an Ubuntu workstation running ext3 but would like to try out xfs sometime...
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
To try out XFS you'd have to backup everything, reformat to XFS and restore the stuff back... So it's not going to be easy.

XFS is suppose to be best at realy large files. So if your into multimedia stuff or video editing or whatnot then I think XFS would easily be the best choice...
 

nweaver

Diamond Member
Jan 21, 2001
6,813
1
0
I run ext3 on almost everything. Part of that is old habit, another part is that our imaging software at work (altiris DS 6.5) will only read ext3, any other is a block by block image file.

We do run XFS on our image repository, but the average file size is around 1.5-2GB, and it's on server class hardware, including good SCSI disks/controllers, dual power supplies, and a UPS.
 
Nov 29, 2005
160
0
0
i had soooooooooo much and better luck with stability and speed on EXT3. I've also have been doing image backup using EXT3 with 0% failure.
But I read something really really really good about the upcoming REISER version 4 !
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
But I read something really really really good about the upcoming REISER version 4 !

The same stuff was posted about reiser3 around it's release, I wouldn't get my hopes up yet.