NYCPHP Meetup

NYPHP.org

[nycphp-talk] [OT] number of files in a directory?

leam at reuel.net leam at reuel.net
Sat Dec 31 20:04:17 EST 2005


Happy New Year to you as well!

What OS? 

Most unix filesystems have a set number of inodes and you need at least one inode per file. Files larger than the block size (4k-8k usually) take more than one inode. If you have shell access to the box try:

	df -i

It should tell you the number of inodes. The other issue you may have, even if this works, is if the box is a shared host for other clients. You'll take up a significant chunk of inodes.

That's what springs off the top of my head.

ciao!

leam


On Sat, Dec 31, 2005 at 07:53:38PM -0500, Marc Antony Vose wrote:
> Hey all:
> 
> First of all:  Happy New Year!
> 
> Secondly: I am rebuilding a site that was coded somewhat sloppily, 
> and they have product images all stored in one directory (a script 
> that I am not writing auto-uploads them to the web server from 
> elsewhere).  Presently, this directory contains about 33,000 files. 
> It will be more like 75,000 when the site launches, if things remain 
> the same.
> 
> The question is:  should I be worried about this, or was this only a 
> problem several years ago? (I remember people at one time attempting 
> to not put too many files in one place.)
> 
> If I should be worried, what could happen?  Will we ever reach a hard 
> limit of files per directory?
> 
> Is it better if each product instead has its own directory inside 
> there (i.e., 75,000 directories), each with as many files as we need 
> inside, or is that just the same problem?
> 
> Cheers,
> 
> -- 
> Marc Antony Vose
> http://www.suzerain.com/
> 
> Imagination is more important than knowledge.
> -- Albert Einstein
> _______________________________________________
> New York PHP Talk Mailing List
> AMP Technology
> Supporting Apache, MySQL and PHP
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.nyphp.org
> 
> 



More information about the talk mailing list