From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,1ec31da3fc1981bc X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2004-03-03 07:26:28 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: paltskallen@hotmail.com (Fredrik) Newsgroups: comp.unix.tru64 Subject: Re: No of files in a directory (performance) Date: 3 Mar 2004 07:26:28 -0800 Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: 195.84.30.66 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1078327588 23190 127.0.0.1 (3 Mar 2004 15:26:28 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 3 Mar 2004 15:26:28 +0000 (UTC) Xref: archiver1.google.com comp.unix.tru64:11266 OK. I have noticed that rm -rf on a dir takes way longer on a dir with many files in it, ex if there are 10k files it takes 10 sec, but with 70k files it takes 150 sec. find|xargs rm takes the same time (per file that is). It seems that -rf does some magic that slows it down. Bob Harris wrote in message news:... > In article , > paltskallen@hotmail.com (Fredrik) wrote: > > > Hello! > > > > We have an application that creates and reads a lot of files. > > These files are splitted on 100 dirs. Currently there are ~70 000 files in > > each dir. > > Are there any limit that should be considered regarding to performance > > issues?? > > > > Using advfs and san disks. > > AdvFS in Tru64 UNIX v5.0 or later uses b-tree indexing for directory > access. While a huge directory does take slightly longer to create, > lookup, delete a file, it is _NOT_ linear. The performance is really > very good. > > However, if you ask 'ls' to display all the files it will take a long > time to fetch all the files, then sort them, and then display them, but > if you use 'ls -f' it skips the sorting, which can make things faster. > > Bob Harris