From: "J. Bruce Fields" <bfields@fieldses.org>
To: Peng Yu <pengyu.ut@gmail.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: 30 time speed difference between using NFS and without using NFS
Date: Tue, 31 Aug 2010 12:23:04 -0400 [thread overview]
Message-ID: <20100831162304.GE3071@fieldses.org> (raw)
In-Reply-To: <AANLkTinEPVpnKCzZS5fBhhGj9Xmh8H-758SdEJSuxZ=8@mail.gmail.com>
On Mon, Aug 30, 2010 at 04:39:54PM -0500, Peng Yu wrote:
> 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.
So if readding each of those directories required only a single round
trip, and if network round trip time were the dominating factor, the
whole thing would only take a second. So there may be more rpc's (is
find also stat'ing every directory entry?), and/or you may be
bottlenecked by somethign else (e.g. seek time on the server).
You might try using /proc/self/mounstats on the client to figure out
what rpc's are sent during the find and the average time they take.
--b.
next prev parent reply other threads:[~2010-08-31 16:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-27 23:08 30 time speed difference between using NFS and without using NFS Peng Yu
2010-08-30 17:09 ` J. Bruce Fields
2010-08-30 21:39 ` Peng Yu
2010-08-31 16:23 ` J. Bruce Fields [this message]
2010-08-31 21:27 ` Peng Yu
2010-09-01 1:15 ` J. Bruce Fields
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100831162304.GE3071@fieldses.org \
--to=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
--cc=pengyu.ut@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.