[Top][All Lists]

[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: Mike Frysinger
Subject: Re: Why is `find -name '*.txt'` much slower than '*.txt' on glusterfs?
Date: Sat, 20 Jan 2018 01:23:16 -0500

On 19 Jan 2018 22:26, Peng Yu wrote:
> There are ~7000 .txt files in a directory on glusterfs. Here are the
> run time of the following two commands. Does anybody know why the find
> command is much slower than *.txt. Is there a way to change the api
> that `find` uses to search files so that it can be more friendly to
> glusterfs?

you can look at the syscalls used by running it through strace and
looking to see what it's doing.
$ strace -Ttf sh -c 'echo *.txt'
$ strace -Tt find -name '*.txt'

that said, this is the coreutils group which doesn't maintain either
`find` or `sh` or `bash`, so you'll want to try one of the other
groups.  or talk to the glusterfs group to see what aspect their fs
is not as good at.

Attachment: signature.asc
Description: Digital signature

reply via email to

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