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

2018-01-23 Thread Bernhard Voelker
On 01/24/2018 01:44 AM, Peng Yu wrote: The attached files are the strace results for `echo` and `find`. Can anybody check if there is a way to improve the performance of `find` so that it can work as efficient as `echo` in this test case? Thanks. $ cat main.sh #!/usr/bin/env bash # vim: set noex

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

2018-01-23 Thread Morgan Weetman
Hi Peng, INAE .. but I think this is a case of using the wrong tool for the job. - Find is designed to locate files based on specific attributes, and as such is performing a stat on every file in the target directory so that the file information is available to it. - Echo is simply outputting a l