From owner-freebsd-questions Thu Apr 13 15:42:51 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mail.twave.net (twave.net [206.100.228.5]) by hub.freebsd.org (Postfix) with SMTP id B323237B649 for ; Thu, 13 Apr 2000 15:42:47 -0700 (PDT) (envelope-from brameld@twave.net) Received: from [208.47.188.175] by mail.twave.net (NTMail 3.03.0018/1.abwg) with ESMTP id fa876881 for ; Thu, 13 Apr 2000 18:42:39 -0400 From: Walter Brameld To: keramida@ceid.upatras.gr, Giorgos Keramidas , Wayne McAlpine Subject: Re: Question Date: Thu, 13 Apr 2000 18:22:39 -0400 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain Cc: freebsd-questions@FreeBSD.ORG References: <001f01bfa4ca$8bfee4b0$bb15fea9@1wn.com> <20000413164035.A25700@hades.hell.gr> In-Reply-To: <20000413164035.A25700@hades.hell.gr> MIME-Version: 1.0 Message-Id: <00041318422101.02132@Bozo_3.BozoLand.domain> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 13 Apr 2000, in a never-ending search for enlightenment, Giorgos Keramidas wrote: > On Wed, Apr 12, 2000 at 04:00:42PM -0600, Wayne McAlpine wrote: > > Hello, > > > > Would you happen to know what the maximunm amount of files and/or sub > > directories that one can have in any single directory on a freebsd > > ufs file system ? I'd really appreciate your response if you know the > > answer. > > I suspect that for the number of files, there is no theoretical limit, > other than the limit of the available i-nodes on your filesystem. After > a truly huge number of files have been created in a single directory, > performance is likely to degrade though. Perhaps it all depends on what > will happen first: your filesystem run out of i-nodes, or performance > gonne that way... > > However, for the nesting of subdirectories, there seems to be a limit. > I tried this: > > $ cd /tmp > $ while true; do mkdir 0; cd 0; sleep 0; done > > and waited to see whether it would stop or fill the rest of my /tmp > partition with empty directories [yeah, i know, i like living on the > dangerous side of the moon]. > > It stopped several levels down, and the last directory that my shell > (currently bash) would not give me the error: > > cd: could not get current directory: getcwd: cannot access > parent directories: No such file or directory > > was at a depth that I could see: > > % pwd | wc > 1 1 1023 > > One level deeper, bash would not chdir, pwd would fail, etc. > The limit seems to be that of a maximum pathname containing 1023 > characters. I suspect POSIX has something to do with this :/ > > -- > Giorgos Keramidas, < keramida @ ceid . upatras . gr > Please don't forget my newbie status, but after seeing this question and a previous one on number of available inodes I thought I'd pass this along from 'man newfs'. The characters of interest are: 1) blocksize - Block size of the file system. The value must be a power of 2, the default is 8192 bytes and the smallest allowable size is 4096 bytes. 2) fragsize - The fragment size of the file system. Also a power of 2 in the range of blocksize/8 and blocksize. Default is 1024 bytes. 3) bytes-per-inode. The default is to create an inode for every (4 * fragsize) bytes of data space. Using the command 'df -i' will show you how many inodes you have used, and how many are still available. -- Walter Brameld Microsoft: Where do you want to go today? Linux: Where do you want to go tomorrow? BSD: Are you guys coming, or what? Walter: And what does THIS button do?? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message