Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an ext2 filesystem with a maximum number of inodes per directory (somewhere around 32k), and also a maximum number of inodes in the entire filesystem (somewhere around 350m). Because I'm using this filesystem as a datastore for a service that has in excess of 32k objects, I'm distributing those objects between multiple subdirectories (like a dictionary separates A-K and L-Z).

My question is this:

Is there any significance to the tree depth when I'm building these inodes? Is there a significant difference or limitation that's going to affect my service if I choose "/usr/www/service/data/a_k/aardvark" over "/data/a_k/aardvark"?

share|improve this question
Oh, my! There are still ext2 in the wild?!!! Can I touch it? I think it would be better for you to switch to ext3 or ext4 because of dir_index capability. – Mircea Vutcovici Jan 11 '11 at 5:54
up vote 0 down vote accepted

There shouldn't be any measurable difference unless you have a really memory starved system. The OS will cache the /usr/www/service/data/ directory inode and do searches from there, not go over whole hierarchy each time a file is accessed.

share|improve this answer

Your Answer


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.