On May 3, 2010, at 11:38 , Steve Simmons wrote:
On May 1, 2010, at 1:35 AM, Brandon S. Allbery KF8NH wrote:
On Apr 30, 2010, at 14:32 , Richard Brittain wrote:
This solves my immediate need, and I'll probably use your mount point database too, but begs the question of why perl's File::Find module works fine, while 'find' breaks. Underneath they are presumably making very similar system calls.

. . . . File::Find has gone through a lot of development aimed at reducing its impact on the system, whereas in my experience the GNU folks tend to prefer the throw-more-resources-at-it method.

The findutils developers seem to be an exception to this. In my correspondence with them they were pretty firm about not adding overhead. Their goal was that any features added that were specific to afs, cifs, etc should not add overhead to systems that did not have that filesystem type. I can't speak to how well they succeeded, but that was their goal.


The specific problem is simply how it walks the directory tree. File::Find has historically needed to be especially parsimonious of file/directory descriptors for maximum portability (who else here remembers when NFILE was 20?), which alters the way it traverses the filesystem in ways that may well reduce kernel-level contention and resources. I think the other find variants all assume lots of per- process file descriptors and hold lots of directories open as they go (I may be wrong, though).

--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH


Attachment: PGP.sig
Description: This is a digitally signed message part

Reply via email to