# New File System XFS or ext4 ?

## RageX^NZ

OK, for about 4 years all of my file systems have been ReiserFS.  I have never had a single problem with it.  However recently I have notice a trend that people are moving away from ReiserFS.  Even Fortinet have moved their appliances to ext3!

I am about to rebuild my whole system and want to move away from Reiser.

If you were doing the same, what would you move to ?

From what I can see, XFS is more mature than ext4 but has had one case of data corruption recently, it also does not perform directory creation/deletion as easily as ext4.

I mainly have large files e.g. 350mb - 2gb

----------

## HeissFuss

Don't forget JFS.  I probably wouldn't run it as my root FS but I use it for storage.

----------

## santaclaws

 *RageX^NZ wrote:*   

> 
> 
> If you were doing the same, what would you move to ?
> 
> From what I can see, XFS is more mature than ext4 but has had one case of data corruption recently, it also does not perform directory creation/deletion as easily as ext4.
> ...

 

I would move to ext3 - but if you only maintain large files I think XFS would be a good choice! Ext4 is not stable yet so I would not take it.

Maybe a partition with XFS and the rest of your hdd with ext3?

----------

## broken_chaos

I find XFS to be quite excellent overall, as a filesystem. The only thing I've found it's not good for is huge (hundreds of thousands) of small files, such as the portage tree/cache - it's noticeably slower on these. I've found it's speed and reliability quite good for normal sized files (~20 kilobytes and greater) and excellent for large files (several megabytes and above). ReiserFS (3.6) is still the best for hundreds of thousands of tiny files, but ext2/3 aren't bad for that either.

----------

## iphands

 *santaclaws wrote:*   

> 
> 
> I would move to ext3 - but if you only maintain large files I think XFS would be a good choice! Ext4 is not stable yet so I would not take it.
> 
> 

 

```
iphands@cbow24 ~ $ mount

/dev/sda2 on / type ext3 (rw)

proc on /proc type proc (rw)

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec)

udev on /dev type tmpfs (rw,nosuid)

devpts on /dev/pts type devpts (rw,nosuid,noexec)

/dev/sda1 on /boot type ext2 (rw)

/dev/sdb1 on /usr/portage type ext4dev (rw,nosuid,nodev,extents)
```

Notice the last line... I've run my portage tree like this for months now. Its pretty stable for me! Does anyone actually have experience with it failing?

I really really trust ext4. Next time I move my root it'll be ext4 for sure. +1 ext4

----------

## zieloo

 *HeissFuss wrote:*   

> Don't forget JFS.  I probably wouldn't run it as my root FS but I use it for storage.

 

JFS is actually not the best choice.

I'd go for xfs for sure. The best performance among the other fs's yet still reliable and stable. Great tools.

Forget about ext4 right know. Even if it's in the kernel it's not suitable for production machines.

----------

## octoploid

I moved my system from xfs to ext4 last week. It is amazing

how much speed you gain. Especially when you work with 

many small files (maildir, kernel, portage) ext4 is orders of 

magnitude faster. Ext4 is about as fast as xfs when handling

big files.

It also runs rock stable over here, and you can always go back

to ext3 if you don't use extens.

The only drawback is the lack of an equivalent of xfsdump &

xfsrestore as a backup solution. I use rsync now but it very slow

compared to xfsdump.

(I found these benchmarks useful)

----------

## na641

 *octoploid wrote:*   

> I moved my system from xfs to ext4 last week. It is amazing
> 
> how much speed you gain. Especially when you work with 
> 
> many small files (maildir, kernel, portage) ext4 is orders of 
> ...

 

I was curious about ext4. do you know if the dir_index and journal_data options/optimizations from ext3 are still valid with ext4?

----------

## octoploid

 *na641 wrote:*   

>  *octoploid wrote:*   I moved my system from xfs to ext4 last week. It is amazing
> 
> how much speed you gain. Especially when you work with 
> 
> many small files (maildir, kernel, portage) ext4 is orders of 
> ...

 

Yes they are. 

Dir_index is used by default by e2fsprogs when you create a new filesystem.

I ran "tune2fs -O has_journal -o journal_data_writeback /dev/sda" as this gives me the best performance.

(See the benchmark link I posted above)

----------

## Enlight

My last test reported xfs to be really faster than ext4 messing with portage tree. But was usin a dedicated partition with a 1ko block size and many other tweaks.

----------

## broken_chaos

 *Enlight wrote:*   

> My last test reported xfs to be really faster than ext4 messing with portage tree. But was usin a dedicated partition with a 1ko block size and many other tweaks.

 

Care to share the options that you used for creating the filesystem? They'd be handy for me, since I'm a big fan of XFS, but ran into problems trying to use it for the portage tree. Thanks.

----------

## davidgurvich

I've only had one problem with XFS.  If your system requires a hard reboot there will be file corruption.  The partition  needs to be unmounted to xfs_repair.

----------

## tnt

 *octoploid wrote:*   

> (I found these benchmarks useful)

 

the link is not valid. any other comparation resource?

----------

## Akkara

 *Quote:*   

> any other comparation resource?

 

I had done a quick study of various filesystems several months ago which perhaps you might find helpful.

It was in the context of what's best for portage, and I didn't look at ext4, but the method and code are all included in that post so you can re-create with whatever parameters you need (and then post back the results!  :Smile:  )

----------

## Lupin_the_3rd

I've been using ext3 for / and xfs for /home for several years now.  Very stable setup and xfs gives great performance manipulating large files.

----------

## getchoo

Personally, I'd stick with reiserfs a few years longer. Who cares if people are moving, it's a solid FS.

----------

## mudrii

for testing try BTRFS from ORACLE looking promising

http://oss.oracle.com/projects/btrfs/

----------

## zeek

Looks like a tie ext4/xfs with xfs winning more than losing: http://www.bullopensource.org/ext4/20070627/iozone.html

This test is a blowout: http://www.bullopensource.org/ext4/20070404/FileDeletion.html

----------

## zeek

 *getchoo wrote:*   

> Personally, I'd stick with reiserfs a few years longer. Who cares if people are moving, it's a solid FS.

 

Actually there is a reason they're moving away from it.  It doesn't scale and it has serious problems with SMP hardware as it uses the BKL (Big Kernel Lock) to protect certain sections of code.  Long standing corruption bugs seem to be a lot easier to trigger on multi-cpu hardware too.

And it doesn't really classify as a solid FS either as its missing (quality) diagnostic and recovery tools.  Its also missing maintenance tools like a defragger.

----------

