From owner-freebsd-questions Thu Jan 2 9:13:38 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 BCE8437B401 for ; Thu, 2 Jan 2003 09:13:36 -0800 (PST) Received: from sentry.24cl.com (174.113.sn.ct.dsl.thebiz.net [216.238.113.174]) by mx1.FreeBSD.org (Postfix) with ESMTP id D38BA43ED4 for ; Thu, 2 Jan 2003 09:13:35 -0800 (PST) (envelope-from myraq@mgm51.com) Received: from ntmm (unknown [63.119.50.193]) by sentry.24cl.com (Postfix) with ESMTP id ACBAE29496 for ; Thu, 2 Jan 2003 12:13:29 -0500 (EST) Message-ID: <200301021213290839.0A719772@home.24cl.com> In-Reply-To: <20030102084356.R18514-100000@atlas.home> References: <20030102084356.R18514-100000@atlas.home> X-Mailer: Calypso Version 3.30.00.00 (1) Date: Thu, 02 Jan 2003 12:13:29 -0500 Reply-To: myraq@mgm51.com From: "MikeM" To: freebsd-questions@FreeBSD.ORG Subject: Re: Lots of files in a directory Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 1/2/03 at 8:58 AM Mikko Ty=F6l=E4j=E4rvi wrote: |On Thu, 2 Jan 2003, MikeM wrote: | |> On 1/2/03 at 3:13 PM Roman Neuhauser wrote: |> |> |# MyRaQ@mgm51.com / 2003-01-02 09:01:27 -0500: |> |> I'm considering setting up my server as a mirror site for the |> |> freedb.org lookup database. Unfortunately, I've seem to have |> |> run into a stumbling block. The server app requires over |> |> 250,000 files in a single directory. Each file is about 2k |> |> in size. | |It can be argued that the application is poorly designed... There's no arguing. It *is* poorly designed. I would have used a hash to spread the files across multiple directories. Unfortunately, I didn't design it. | |> I already have UFS_DIRHASH specified in my kernel config file. :-( | |Maybe you can tweak some sysctls: | | atlas% sysctl -a | grep dirhash | vfs.ufs.dirhash_minsize: 2560 | vfs.ufs.dirhash_maxmem: 2097152 | vfs.ufs.dirhash_mem: 795239 | vfs.ufs.dirhash_docheck: 0 | |Try playing with with "vfs.ufs.dirhash_maxmem". I suppose it has to |be at least as large as the size of the Directory From Hell. Thanks, I'll give them a try. |... |It would probably be better to patch the dang server to use a |multi-level directory structure instead. That thought has crossed my mind. Many thanks for the assist. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message