Date: Thu, 13 Apr 2000 18:22:39 -0400 From: Walter Brameld <brameld@twave.net> To: keramida@ceid.upatras.gr, Giorgos Keramidas <keramida@ceid.upatras.gr>, Wayne McAlpine <wayne.mcalpine@home.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Question Message-ID: <00041318422101.02132@Bozo_3.BozoLand.domain> In-Reply-To: <20000413164035.A25700@hades.hell.gr> References: <001f01bfa4ca$8bfee4b0$bb15fea9@1wn.com> <20000413164035.A25700@hades.hell.gr>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00041318422101.02132>