bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is `find -name '*.txt'` much slower than '*.txt' on glusterfs?


From: Dale R. Worley
Subject: Re: Why is `find -name '*.txt'` much slower than '*.txt' on glusterfs?
Date: Sun, 21 Jan 2018 13:02:21 -0500

James Youngman <address@hidden> writes:
> Perhaps stat calls are relatively
> expensive on glusterfs (this happens on at least some other cluster
> filesystems because obtaining a correct value fort st_size requires finding
> the consensus answer for the current length of the file, while obtaining
> the list of items in a directory may not require the same amount of locking
> or consensus work

This has a bunch of interesting ramifications.  If you couch the 'find'
command correctly,

    find . -maxdepth 1 -name '*.txt'

'find' does not need to do a 'stat' on the items in '.'.  And in that
case, it should not, since you've noted that 'stat' might be expensive.

Dale



reply via email to

[Prev in Thread] Current Thread [Next in Thread]