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. -mike
signature.asc
Description: Digital signature