Gustavo Vieira Goncalves Coelho Rios <[EMAIL PROTECTED]> writes:
> The functions that will hash the id, accepts an id as input and returns
> a string for the user dir, like:
> 
> Id            String returned
> 0             0/0/0/0/0/0/0/0
> [..]

That gives you 2^32 leaf directories plus approximately 2^28
intermediate directories, which is a helluva lot of inodes (4581298448
to be exact), and your files will be spread all over your disk(s),
throwing performance down the drain.

If you only have half a million users, pick a prime number K close to
the square root of the expected number of users (724 in your case -
closest primes are 719 and 727), create that many bucket directories,
and place each user in bucket ID mod K.

DES
-- 
Dag-Erling Smorgrav - [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to