From owner-freebsd-hackers Wed Dec 13 13:44:53 2000 From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 13 13:44:46 2000 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from hand.dotat.at (sfo-gw.covalent.net [207.44.198.62]) by hub.freebsd.org (Postfix) with ESMTP id 091A337B6CA for ; Wed, 13 Dec 2000 13:44:43 -0800 (PST) Received: from fanf by hand.dotat.at with local (Exim 3.15 #3) id 146Jgy-0006aF-00; Wed, 13 Dec 2000 21:44:04 +0000 Date: Wed, 13 Dec 2000 21:44:04 +0000 From: Tony Finch To: Dag-Erling Smorgrav Cc: Gustavo Vieira Goncalves Coelho Rios , hackers@FreeBSD.ORG Subject: Re: very big mail spool directory Message-ID: <20001213214404.P71002@hand.dotat.at> References: <3A368F8C.1918684F@ifour.com.br> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: Organization: Covalent Technologies, Inc Sender: fanf@dotat.at Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Dag-Erling Smorgrav wrote: > >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. Why a prime number? All you need is an even spread, and given that user IDs are usually allocated sequentially any modulus will do. Tony. -- f.a.n.finch fanf@covalent.net dot@dotat.at "Plan 9 deals with the resurrection of the dead." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message