Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Nov 2008 04:34:32 -0800
From:      Chris Pratt <eagletree@hughes.net>
To:        FreeBSD-Questions Questions <freebsd-questions@freebsd.org>
Subject:   Re: UFS2 limits
Message-ID:  <D54A39D2-7C95-46EF-B4B7-C5D5E4FF8A9D@hughes.net>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D54A39D2-7C95-46EF-B4B7-C5D5E4FF8A9D>