> -----Original Message-----
> From: Daniel Brown [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 10, 2008 9:42 AM
> To: paragasu
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] scalable web gallery

---8<--- snip

>     And for the record, in the "olden days," there was a limit of
> about 2048 files per directory, back when no one thought there would
> ever be a need for nearly that many files.  Then, with improved
> filesystems, the limit was rumored to be another magic number: 65535.
> That depended on the operating system, filesystem, and the kernel.  I
> think (but don't quote me on this) that BeOS had the 65535 limit.
> 
>     Now, on an ext3 filesystem (we're not counting ReiserFS because
> (1) I was never a fan, and (2) he might kill me if I say something
> bad!  8^O) you're okay with hundreds of thousands of files per
> directory.  ls'ing will be a bit of a pain in the ass, and if you're
> in Bash, you probably don't want to double-TAB the directory, but all
> in all, you'll be okay.
> 
>     Still, I'd create 16 subdirectories under the images directory:
> 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f.  Then name the file as an MD5 hash of
> the image uploaded, and place it in the directory matching the first
> character of the new file name.

Aren't directory structures in Windows (>2.x) and even DOS (>4.x) built
with B-Trees? I wouldn't figure there would be any kind of
limit--excepting memory, of course--to how many files or subdirectories
can be linked to a single node.

Been a while since I've played with those underlying data structures we
all take for granted, though, so maybe I'm way off base.


Todd Boyd
Web Programmer




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to