NYCPHP Meetup

NYPHP.org

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

Marc Antony Vose suzerain at suzerain.com
Sat Dec 31 20:54:12 EST 2005


Hi there:

Thanks for the response.

The OS will be Red Hat Enterprise 3 or 4; That will be determined 
when we get the server in February.

But, this will be a dedicated hosting box at 
servermatrix...whatever's in the client's price range at the time we 
buy (probably their low-end Pentium 4 server).  Anyway, it'll be our 
machine.

So, inodes are the only particular worry?  The directory structure is 
irrelevant?

I can see how things are working on my OS X development machine in 
the meantime, which has a hell of a lot more going on than will be 
going on on this server.

Cheers,

Marc



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