Linux NFS development
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: chucklever@gmail.com
Cc: Krishna Kumar2 <krkumar2@in.ibm.com>,
	Benny Halevy <bhalevy@panasas.com>,
	linux-nfs@vger.kernel.org, Peter Staubach <staubach@redhat.com>
Subject: Re: kernel hacker's pub night
Date: Thu, 26 Jun 2008 17:22:14 -0400	[thread overview]
Message-ID: <20080626212214.GD13293@fieldses.org> (raw)
In-Reply-To: <76bd70e30806261405g9357c6fg51b973ff076ee78b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Thu, Jun 26, 2008 at 05:05:44PM -0400, Chuck Lever wrote:
> On Thu, Jun 26, 2008 at 1:55 PM, J. Bruce Fields <bfields@fieldses.org> wrote:
> > On Thu, Jun 26, 2008 at 01:42:58PM -0400, Chuck Lever wrote:
> >> On Jun 26, 2008, at 3:19 AM, Krishna Kumar2 wrote:
> >>> Benny Halevy <bhalevy@panasas.com> wrote on 06/23/2008 06:10:40 PM:
> >>>
> >>>> Apparently the file is cached.  You needed to restart nfs
> >>>> and remount the file system to make sure it isn't before reading it.
> >>>> Or, you can create a file larger than your host's cache size so
> >>>> when you write (or read) it sequentially, its tail evicts its head
> >>>> out of the cache.  This is a less reliable method, yet creating a
> >>>> file about 25% larger than the host's memory size should work for
> >>>> you.
> >>>
> >>> I did a umount of all filesystems and restart NFS before testing. Here
> >>> is the result:
> >>>
> >>> Local:
> >>>      Read:  69.5 MB/s
> >>>      Write: 70.0 MB/s
> >>> NFS of same FS mounted loopback on same system:
> >>>      Read:  29.5 MB/s  (57% drop)
> >>>      Write: 27.5 MB/s  (60% drop)
> >>>
> >>> The drops seems exceedingly high. How can I figure out the source of
> >>> the
> >>> problem? Even if it is as general as to be able to state: "Problem is
> >>> in
> >>> the NFS client code" or "Problem is in the NFS server code", or
> >>> "Problem
> >>> can be mitigated by tuning" :-)
> >>
> >> It's hard to say what might be the problem just by looking at
> >> performance results.
> >>
> >> You can look at client-side NFS and RPC performance metrics using some
> >> prototype Python tools that were just added to nfs-utils.  The scripts
> >> themselves can be downloaded from:
> >>
> >>    http://oss.oracle.com/~cel/Linux-2.6/2.6.25
> >>
> >> but unfortunately they are not fully documented yet so you will have to
> >> approach them with an open mind and a sense of experimentation.
> >>
> >> You can also capture network traces on your loopback interface to see if
> >> there is, for example, unexpected congestion or latency, or if there are
> >> other problems.
> >>
> >> But for loopback, the problem is often that the client and server are
> >> sharing the same physical memory for caching data.  Analyzing your test
> >> system's physical memory utilization might be revealing.
> >
> > If he's just doing a single large read or write with cold caches (sounds
> > like that's probably the case), then memory probably doesn't matter
> > much, does it?
> 
> I expect it might.
> 
> The client and server would contend for available physical memory as
> the file was first read in from the physical file system by the
> server, and then a second copy was cached by the client.
> 
> A file as small as half the available physical memory on his system
> could trigger this behavior.

So, forgive me for being naive about this stuff, but I would've thought
that the cached pages (which have been read once and then never touched
again) would just be discarded, and life would continue.  Otherwise how
would the kernel be able to get acceptable streaming read performance in
any situation? 

This doesn't sound fundamentally different, e.g., from doing streaming
reads two files on different filesystems at once.

> On older 2.6 kernels (.18 or so), both the server's physical file
> system and the client would trigger bdi congestion throttling.

How does that work?

--b.

  parent reply	other threads:[~2008-06-26 21:22 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-19  6:46 NFS performance degradation of local loopback FS Krishna Kumar2
2008-06-19  9:58 ` Krishna Kumar2
2008-06-19 12:04   ` Peter Staubach
2008-06-19 12:52     ` Benny Halevy
2008-06-20  6:39       ` Krishna Kumar2
2008-06-20  9:21       ` Krishna Kumar2
2008-06-22  8:35         ` Benny Halevy
2008-06-23  8:11           ` Krishna Kumar2
2008-06-23 12:40             ` Benny Halevy
2008-06-26  7:19               ` Krishna Kumar2
2008-06-26 17:42                 ` Chuck Lever
2008-06-26 17:55                   ` J. Bruce Fields
2008-06-26 21:05                     ` Chuck Lever
     [not found]                       ` <76bd70e30806261405g9357c6fg51b973ff076ee78b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-06-26 21:22                         ` J. Bruce Fields [this message]
2008-06-26 21:24                           ` kernel hacker's pub night J. Bruce Fields
2008-06-27  7:14                             ` Benny Halevy
2008-06-27  9:04                   ` NFS performance degradation of local loopback FS Krishna Kumar2
2008-06-27 14:06                     ` Chuck Lever
     [not found]                       ` <76bd70e30806270706x7cbfd291l6cb6d0cc5e81771-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-06-30  9:57                         ` Krishna Kumar2
2008-06-30 15:25                           ` Chuck Lever
     [not found]                             ` <76bd70e30806300825t6490477dpb8ce3ee48a0a6777-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-01  3:43                               ` Krishna Kumar2
2008-06-27 17:44                     ` J. Bruce Fields
2008-06-27 18:06                     ` Dean Hildebrand
2008-06-30 10:10                       ` Krishna Kumar2
2008-06-30 15:26                         ` Jeff Layton
     [not found]                           ` <20080630112654.012ce3e4-xSBYVWDuneFaJnirhKH9O4GKTjYczspe@public.gmane.org>
2008-06-30 15:35                             ` J. Bruce Fields
2008-06-30 16:00                               ` Chuck Lever
2008-07-01 10:19                               ` Krishna Kumar2
2008-07-01 12:47                                 ` Jeff Layton
2008-06-30 15:35                             ` Chuck Lever
2008-07-01  5:07                             ` Krishna Kumar2
2008-06-30 15:30                         ` Chuck Lever

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=20080626212214.GD13293@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=bhalevy@panasas.com \
    --cc=chucklever@gmail.com \
    --cc=krkumar2@in.ibm.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=staubach@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox