Re: 30 time speed difference between using NFS and without using NFS

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

 



On Mon, Aug 30, 2010 at 12:09 PM, J. Bruce Fields <bfields@xxxxxxxxxxxx> wrote:
> On Fri, Aug 27, 2010 at 06:08:25PM -0500, Peng Yu wrote:
>> Hi,
>>
>> I use the following command to search for some directory.
>>
>> find -L some_dir -type d -name some_name
>>
>> If I'm on the machine that has some_dir locally, the run time is
>> real  0m0.199s
>> user  0m0.048s
>> sys   0m0.140s
>>
>> If I'm on another machine that sees the same directory by NFS (NFS3).
>> the run time is
>> real  0m6.509s
>> user  0m0.090s
>> sys   0m1.380s
>>
>> There are 30 time speed difference. Is this normal? Is there any NFS
>> parameter that I should tune to make the latter faster?
>
> How many directories are there in some_dir?  What's the round trip time
> (e.g. as reported by ping) to the server?  If you repeate the find
> immediately, is it faster?
>
> This can indeed by much slower if it requires revalidating the cached
> attributes of each file.

Please see below for the answers of you questions.

$ find . -type d|wc
   1491    1491   53372

Search the directory as a local directory

$ time find . -name 'data.frame' -type d
./library/base/data.frame
./library/base/data.frame/data.frame

real	0m0.044s
user	0m0.012s
sys	0m0.028s

Search the directory as a NFS directory. The same command runs three 3
times in series.

$ time find . -name 'data.frame' -type d
./library/base/data.frame
./library/base/data.frame/data.frame

real	0m2.205s
user	0m0.040s
sys	0m0.430s
$ time find . -name 'data.frame' -type d
./library/base/data.frame
./library/base/data.frame/data.frame

real	0m1.203s
user	0m0.060s
sys	0m0.120s
$ time find . -name 'data.frame' -type d
./library/base/data.frame
./library/base/data.frame/data.frame

real	0m1.227s
user	0m0.040s
sys	0m0.200s

Ping the NFS server gives me ttl=64 time=0.156 ms.

Please let me know if there is more information needed.

-- 
Regards,
Peng
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux