From owner-freebsd-questions@FreeBSD.ORG Sun Nov 9 12:34:45 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 023E9106564A for ; Sun, 9 Nov 2008 12:34:45 +0000 (UTC) (envelope-from eagletree@hughes.net) Received: from smtprelay.b.hostedemail.com (smtprelay0115.b.hostedemail.com [64.98.42.115]) by mx1.freebsd.org (Postfix) with ESMTP id AF6358FC1C for ; Sun, 9 Nov 2008 12:34:43 +0000 (UTC) (envelope-from eagletree@hughes.net) Received: from filter.hostedemail.com (b-bigip1 [10.5.19.254]) by smtprelay02.b.hostedemail.com (Postfix) with SMTP id B0ED75FEF50C for ; Sun, 9 Nov 2008 12:34:42 +0000 (UTC) X-SpamScore: 1 X-Spam-Summary: 2, 0, 0, 0547d77adcc04886, 9510f55e4507d164, eagletree@hughes.net, freebsd-questions@freebsd.org, RULES_HIT:355:379:541:564:599:601:945:966:973:988:989:1260:1261:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1766:1792:2196:2199:2393:2553:2559:2562:2693:3027:3353:3636:3865:3866:3867:3868:3869:3870:3871:3872:3873:3874:3876:3877:4184:4321:4385:5007:6114:6119:7652:7903:8501:9010:9036:9040:9159, 0, RBL:none, CacheIP:none, Bayesian:0.5, 0.5, 0.5, Netcheck:none, DomainCache:0, MSF:not bulk, SPF:, MSBL:none, DNSBL:none Received: from [192.168.0.3] (dpc6744118153.direcpc.com [67.44.118.153]) (Authenticated sender: eagletree@hughes.net) by omf04.b.hostedemail.com (Postfix) with ESMTP for ; Sun, 9 Nov 2008 12:34:38 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v753) In-Reply-To: <200811091848.32453.no-spam@people.net.au> References: <50261.1226194851@people.net.au> <20081109024046.GB27423@icarus.home.lan> <200811091848.32453.no-spam@people.net.au> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Chris Pratt Date: Sun, 9 Nov 2008 04:34:32 -0800 To: FreeBSD-Questions Questions X-Mailer: Apple Mail (2.753) X-session-marker: 6561676C6574726565406875676865732E6E6574 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:34:45 -0000 On Nov 9, 2008, at 12:18 AM, Ian wrote: > On Sun, 9 Nov 2008 13:10:46 Jeremy Chadwick wrote: >> On Sun, Nov 09, 2008 at 01:40:51AM +0000, no-spam@people.net.au >> wrote: >>> Hi, >>> I have a FreeBSD server that has about 10,500 subdirectories >>> within a >>> single directory. >>> This number will keep rising and I assume UFS2 has a limit to the >>> number >>> of sub-directories in a single directory - can anyone tell me >>> what it is? >> >> As far as I know, there is no such limit on the number of files/dirs >> inside of a directory. >> >> > Thanks for that Jeremy. I didn't invent this structure, but I > daresay I can > either modify it or get the original writer to do that. I never > really gave > it a thought before now - it was the system I was given to work > with and it's > worked fine so far, except when I try to list the contents of the > directory - > that takes ages! > All the folders are 7 digit numbers and we are up to approx. > 0010500 entries > (ie subdirs) so far. > I guess it will just be a matter of experimenting to find the > optimum number > of sub-sub-directories per sub-directory :-/ On the issue of possible inode limitations, it may be of some reassurance (or alarm ;-)) to look at the output of df -i. This will tell you if you are close to any limit on inodes. Between that and your already well known counts of directories and rate of creation, you can gauge how much time you have to change your app.