Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer
    
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? –  V3ss0n Nov 11 '10 at 18:26

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...

share|improve this answer
    
so it has to be fscked regularly? –  V3ss0n Aug 5 '10 at 5:40
    
No. How would that make sense –  xenoterracide Aug 6 '10 at 17:31
    
What I said is it will apply itself to any new files after it's created. But it won't apply itself to the old files without a fsck. –  xenoterracide Aug 6 '10 at 17:32
    
Sorry english is not my native langauge :D , Thanks , you answer it all! –  V3ss0n Aug 7 '10 at 4:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.