From owner-freebsd-questions Fri Jan 17 8:55:42 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BFCEF37B401 for ; Fri, 17 Jan 2003 08:55:40 -0800 (PST) Received: from dire.bris.ac.uk (dire.bris.ac.uk [137.222.10.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB0EF43F18 for ; Fri, 17 Jan 2003 08:55:39 -0800 (PST) (envelope-from Jan.Grant@bristol.ac.uk) Received: from mail.ilrt.bris.ac.uk by dire.bris.ac.uk with SMTP-PRIV with ESMTP; Fri, 17 Jan 2003 16:55:25 +0000 Received: from cmjg (helo=localhost) by mail.ilrt.bris.ac.uk with local-esmtp (Exim 3.16 #1) id 18ZZlu-0000Qb-00; Fri, 17 Jan 2003 16:55:10 +0000 Date: Fri, 17 Jan 2003 16:55:10 +0000 (GMT) From: Jan Grant X-X-Sender: cmjg@mail.ilrt.bris.ac.uk To: John Ekins Cc: questions@freebsd.org Subject: Re: Directory hashing question In-Reply-To: <20030116151326.5a6a9074.jre@globalnet.co.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, 16 Jan 2003, John Ekins wrote: > Hello, > > I have a question about "best" practices for directory hashing. I have > about 80,000 zone files which are named after the domain which I > generate using a Perl script. I'm looking for the best hashing to > reduce the start up time for bind. > > I've tried different hashings. Using example.foo as an example (:-)), > if I take the first and second letters of the domain and hash it like > this /var/named/e/x/example.foo I still end up with (in a few cases) > more than 3000 zones in one directory. If I hash using the > first+second and third+fourth like this /var/named/ex/am/example.com I > end up with a lot fewer zones in the individual directories, but > bind's start up time is much longer. > > I can live with the first hasing if I need to, but I'm seeking some > advice and suggestions on what others think (or know) would be better. Assuming you want your directories to be as full as possible to get optimal startup time, and that the "definitive" data defining your zone files lives somewhere else (ie, that you're creating this directory structure _purely_ for bind to consume, not for management purposes), why not just determine (benchmark) the "right" number of zone files to put in a directory, and slap the first n files into directory z001, the next n into directory z002, and so on? -- jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/ Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/ You see what happens when you have fun with a stranger in the Alps? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message