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 :
- 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? - Indexes are generated transparently ? or need to regenrated using
e2fsck -fD /dev/hdXY
? - How does Ext3/4 filetype feature works?
- I have read XFS have better performance and Reliability over ext3 , how does it compare to ext4 , should i switch?
Thanks!
Best Answer
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.