From owner-freebsd-questions@FreeBSD.ORG Sun Nov 9 12:16:34 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8532106567B; Sun, 9 Nov 2008 12:16:34 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 2B05C8FC0C; Sun, 9 Nov 2008 12:16:33 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.3/8.14.3) with ESMTP id mA9CGP2Y079059; Sun, 9 Nov 2008 12:16:25 GMT (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.7.2 smtp.infracaninophile.co.uk mA9CGP2Y079059 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infracaninophile.co.uk; s=200708; t=1226232987; bh=PMgU2+ZV9+8ZXt 5GR/FLM4L7A6iWDtQuexxON4ke8cY=; h=Message-ID:Date:From:MIME-Version: To:CC:Subject:References:In-Reply-To:Content-Type:Cc:Content-Type: Date:From:In-Reply-To:Message-ID:Mime-Version:References:To; z=Mes sage-ID:=20<4916D492.5040406@infracaninophile.co.uk>|Date:=20Sun,=2 009=20Nov=202008=2012:16:18=20+0000|From:=20Matthew=20Seaman=20|Organization:=20Infracaninophile|User -Agent:=20Thunderbird=202.0.0.17=20(X11/20080929)|MIME-Version:=201 .0|To:=20Jeremy=20Chadwick=20|CC:=20no-spam@peo ple.net.au,=20freebsd-questions@freebsd.org|Subject:=20Re:=20UFS2=2 0limits|References:=20<50261.1226194851@people.net.au>=20<200811090 24046.GB27423@icarus.home.lan>|In-Reply-To:=20<20081109024046.GB274 23@icarus.home.lan>|X-Enigmail-Version:=200.95.6|Content-Type:=20mu ltipart/signed=3B=20micalg=3Dpgp-sha256=3B=0D=0A=20protocol=3D"appl ication/pgp-signature"=3B=0D=0A=20boundary=3D"------------enig77EAB F585AEBA7092B9FEB56"; b=unyTh6201/LIA/s8EPUKAkGpcuA35fxxpEtQYgxPVH6 hANrne+nOrcq2OwdVMkGTpPirET1iPdNr9ixvl7oqgs5Z/jmn9gjKWwWl1gO0gBW3QD WW6qnOT7/YmNvQZzGgajmoEEUAibiAG8IHl1KJNdDZlz4+Um5P0BMwCI/35lE= Message-ID: <4916D492.5040406@infracaninophile.co.uk> Date: Sun, 09 Nov 2008 12:16:18 +0000 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 2.0.0.17 (X11/20080929) MIME-Version: 1.0 To: Jeremy Chadwick References: <50261.1226194851@people.net.au> <20081109024046.GB27423@icarus.home.lan> In-Reply-To: <20081109024046.GB27423@icarus.home.lan> X-Enigmail-Version: 0.95.6 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig77EABF585AEBA7092B9FEB56" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (smtp.infracaninophile.co.uk [IPv6:::1]); Sun, 09 Nov 2008 12:16:27 +0000 (GMT) X-Virus-Scanned: ClamAV version 0.94.1, clamav-milter version 0.94.1 on happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VERIFIED,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-questions@freebsd.org, no-spam@people.net.au Subject: Re: UFS2 limits X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 12:16:34 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig77EABF585AEBA7092B9FEB56 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Jeremy Chadwick wrote: > I don't want to change the topic of discussion, but I *highly* recommen= d > you ***stop*** whatever it is you're doing that is creating such a > directory structure. Software which has to iterate through that > directory using opendir() and readdir() will get slower and slower as > time goes on. With the implementation of UFS_DIRHASH the practical limit on the size of directories is now a great deal larger. In particular the slow down caused by linear search through the contents has been=20 eliminated. See ffs(7). 10,000 files or sub-directories, whist not a particularly elegant setup, is actually not unworkable nowadays. As for the maximum number of subdirectories it is possible to create on UFS2 -- it is limited by the inode structure to a 16 bit quantity. % jot 100000 1 | xargs mkdir -v [...] 32725 32726 32727 32728 32729 32730 3273mkdir: 32766: Too many links mkdir: 32767: Too many links mkdir: 32768: Too many links mkdir: 32769: Too many links mkdir: 32770: Too many links mkdir: 32771: Too many links [...] Which is 32768 - 2 for the '.' and '..' links. Trying to create too many subdirectories just results in mkdir failing: the filesystem itself is not damaged. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig77EABF585AEBA7092B9FEB56 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAkkW1JkACgkQ8Mjk52CukIxzigCfZVknXz/lEidy3mkpFQEetq0y doYAmwT+N/odOtvLH/vAczGyDBddVPER =Qurc -----END PGP SIGNATURE----- --------------enig77EABF585AEBA7092B9FEB56--