2

I am developing an applications which reads huge list of directories and check file types using file command and using ext4 file system.

When i look into Ext4 , i see it have two interesting features

  • dir_index
  • filetype

i just enabled both features using

tune2fs -O dir_index /dev/hdXY 
e2fsck -fD /dev/hdXY

my questions are :

  1. Is dir_index works transparently after it is enabled , (ie. ls -lR large_direcory/ performance improved without need for any extra program/config) or have to make it work via programming/scripting?
  2. Indexes are generated transparently ? or need to regenrated using e2fsck -fD /dev/hdXY?
  3. How does Ext3/4 filetype feature works?
  4. I have read XFS have better performance and Reliability over ext3 , how does it compare to ext4 , should i switch?

Thanks!

Phyo Arkar Lwin
  • 325
  • 1
  • 4
  • 10

2 Answers2

1

IIRC dir_index will auto apply itself to any new files after it is created but it will not work retroactively without a fsck. I don't know about this filetype feature. I have never heard that XFS is more reliable over ext3 in fact due to the fact that it doesn't (didn't?) do ... write blocking? (I forget the term) ... it was less reliable due to the longer syncs. Ext4 had the same problem but it got fixed...

xenoterracide
  • 1,476
  • 2
  • 12
  • 26
1

Answer to your fourth question, or at least something worth thinking:

One thing where XFS shines compared to ext3 (maybe also ext4) is concurrency. XFS scales nicely in multi-processor environment, but with ext3 kjournald does not utilize multiple cores very well.

So if several processes are fighting for disk access simultaneously, then XFS is a very good choice. I think ext4 also gained allocation groups so it might make it better with SMP, too, but that's one thing to keep in mind while benchmarking.

Janne Pikkarainen
  • 31,454
  • 4
  • 56
  • 78
  • Thanks , when i tested on my Corei5 machine using EXT4 , which have 64 concurrent threads ,reading the directory list which have 200k+ files , it got to almost freeze (machine Load Increased up to 17!!) So that may be able improved by XFS. I will check it out.Oh i forgot to note that i am running it on a VM (VMWare Work Station). Can this also come into account? VM's IO are a lot slower rightt? – Phyo Arkar Lwin Nov 11 '10 at 18:26