bugfindutils - Bugs: bug #17372, fts-based find very slow on NFS

 
 

bug #17372: fts-based find very slow on NFS

Submitter:  James Youngman <jay>
Submitted:  Tue 08 Aug 2006 05:50:16 PM UTC
 
Category:  find Severity:  2 - Minor
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  jay
Originator Name:  Open/Closed:  Closed
Release:  4.3.1 Fixed Release:  4.3.2
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Tue 08 Aug 2006 10:09:23 PM UTC, comment #3: 

I believe that the attached patch fixes the problem without introducing any regressions.

James Youngman <jay>
Project Administrator
Tue 08 Aug 2006 06:12:03 PM UTC, comment #2: 

Oops, I mean -maxdepth not -depth

James Youngman <jay>
Project Administrator
Tue 08 Aug 2006 06:09:07 PM UTC, comment #1: 

It could just be that -depth is wrongly implemented in ftsfind.c:-

$ for find in /usr/bin/find find oldfind-dev find-dev ; do echo; echo $find :  $( $find --version | sed -e 1q); strace -e lstat64  $find    /tmp/X -maxdepth 1  -perm 0 -false -print ; done ; echo ; echo Layout:; find /tmp/X

/usr/bin/find : GNU find version 4.1.20
lstat64(".", {st_mode=S_IFDIR|0711, st_size=32768, ...}) = 0
lstat64("/tmp/X", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
lstat64(".", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
lstat64(".", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
lstat64(".", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
lstat64("Y", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0

find : GNU find version 4.2.29-CVS
lstat64(".", {st_mode=S_IFDIR|0711, st_size=32768, ...}) = 0
lstat64("X", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
lstat64("Y", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0

oldfind-dev : GNU find version 4.3.2-CVS
lstat64(".", {st_mode=S_IFDIR|0711, st_size=32768, ...}) = 0
lstat64("X", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
lstat64("Y", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0

find-dev : GNU find version 4.3.2-CVS
lstat64("/tmp/X", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
lstat64("Y", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
lstat64("Z", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
lstat64("ZZ", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
lstat64("ZZZ", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
lstat64("q", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0

Layout:
/tmp/X
/tmp/X/Y
/tmp/X/Y/Z
/tmp/X/Y/Z/P
/tmp/X/Y/ZZ
/tmp/X/Y/ZZZ
/tmp/X/Y/q

James Youngman <jay>
Project Administrator
Tue 08 Aug 2006 05:50:16 PM UTC, original submission:  

In find version 4.3.1, the fts-based version of find works very slowly on NFS.  In this example, it's well over 20 times slower:-

$ time oldfind-dev    /dir -maxdepth 2 -name wireless
[...]
real    0m3.348s
user    0m0.004s
sys     0m0.060s
$ time find-dev /home/build -maxdepth 2 -name wireless 2>/dev/null
[...]
real    1m47.342s
user    0m0.064s
sys     0m0.624s

Using -O3 doesn't help.  It looks like the fts implementation stats dramatically more files.

James Youngman <jay>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #10494:  ftsfind-maxdepth-efficiency.patch added by jay (917B - text/x-diff - Patch 1)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jay (Updated the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2006-11-30 jay Open/ClosedOpen Closed
        Fixed ReleaseNone 4.3.2
    2006-08-08 jay StatusConfirmed Fixed
        Attached File- Added ftsfind-maxdepth-efficiency.patch, #10494

    Back to the top


    Powered by Savane 3.9