All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <trondmy@hammerspace.com>
To: "bfields@fieldses.org" <bfields@fieldses.org>,
	"daire@dneg.com" <daire@dneg.com>
Cc: "fsorenso@redhat.com" <fsorenso@redhat.com>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
	"aglo@umich.edu" <aglo@umich.edu>,
	"neilb@suse.de" <neilb@suse.de>,
	"bcodding@redhat.com" <bcodding@redhat.com>,
	"chuck.lever@oracle.com" <chuck.lever@oracle.com>,
	"jshivers@redhat.com" <jshivers@redhat.com>
Subject: Re: unsharing tcp connections from different NFS mounts
Date: Tue, 4 May 2021 21:48:39 +0000	[thread overview]
Message-ID: <5bd2516e41f7a6b35ea9772a56a7dfdec52b83a9.camel@hammerspace.com> (raw)
In-Reply-To: <1449034832.11389942.1620163955863.JavaMail.zimbra@dneg.com>

On Tue, 2021-05-04 at 22:32 +0100, Daire Byrne wrote:
> Hi,
> 
> For what it's worth, I mentioned this on the associated redhat
> bugzilla but I'll replicate it here - I *think* this issue (bulk
> reads/writes starving getattrs etc) is one of the issues I was trying
> to describe in my re-export thread:
> 
> https://marc.info/?l=linux-nfs&m=160077787901987&w=4
> 
> Long story short, when we have already read lots of data into a
> client's pagecache (or fscache/cachefiles), you can't reuse it again
> later until you do some metadata lookups to re-validate. But if we
> are also continually filling the client cache with new data (lots of
> reads) as fast as possible, we starve the other processes (in my case
> - knfsd re-export threads) from processing the re-validate
> lookups/getattrs in a timely manner.
> 
> We have lots of previously cached data but we can't use it for a long
> time because we can't get the getattrs out and replied to quickly.
> 
> When I was testing the client behaviour, it didn't seem like nconnect
> or NFSv3/NFSv4.2 made much difference to the behaviour - metadata
> lookups from another client process to the same mountpoint slowed to
> a crawl when a process had reads dominating the network pipe.
> 
> I also found that maxing out the client's network bandwidth really
> showed this effect best. Either by saturating a client's physical
> network link or, in the case of reads, using an ingress qdisc + htb
> on the client to simulate a saturated low speed network.
> 
> In all cases where the client's network is (read) saturated
> (physically or using a qdisc), the metadata performance from another
> process becomes really poor. If I mount a completely different server
> on the same client, the metadata performance to that new second
> server is much better despite the ongoing network saturation caused
> by the continuing reads from the first server.
> 
> I don't know if that helps much, but it was my observation when I
> last looked at this.
> 
> I'd really love to see any kind of improvement to this behaviour as
> it's a real shame we can't serve cached data quickly when all the
> cache re-validations (getattrs) are stuck behind bulk IO that just
> seems to plow through everything else.

If you use statx() instead of the regular stat call, and you
specifically don't request the ctime and mtime, then the current kernel
should skip the writeback.

Otherwise, you're going to have to wait for the NFSv4.2 protocol
changes that we're trying to push through the IETF to allow the client
to be authoritative for the ctime/mtime when it holds a write
delegation.
> > 


-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com



  reply	other threads:[~2021-05-04 21:48 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-06 15:13 unsharing tcp connections from different NFS mounts J. Bruce Fields
2020-10-06 15:20 ` Chuck Lever
2020-10-06 15:22   ` Bruce Fields
2020-10-06 17:07     ` Tom Talpey
2020-10-06 19:30       ` Bruce Fields
     [not found]         ` <CAGrwUG5_KeRVR8chcA8=3FSeii2+4c8FbuE=CSGAtYVYqV4kLg@mail.gmail.com>
2020-10-07 14:08           ` Tom Talpey
2020-10-06 19:36 ` Benjamin Coddington
2020-10-06 21:46   ` Olga Kornievskaia
2020-10-07  0:18     ` J. Bruce Fields
2020-10-07 11:27       ` Benjamin Coddington
2020-10-07 12:55         ` Benjamin Coddington
2020-10-07 13:45           ` Chuck Lever
2020-10-07 14:05             ` Bruce Fields
2020-10-07 14:15               ` Chuck Lever
2020-10-07 16:05                 ` Bruce Fields
2020-10-07 16:44                   ` Trond Myklebust
2020-10-07 17:15                     ` Bruce Fields
2020-10-07 17:29                       ` Trond Myklebust
2020-10-07 18:05                         ` bfields
2020-10-07 19:11                           ` Trond Myklebust
2020-10-07 20:29                             ` bfields
2020-10-07 18:04                     ` Benjamin Coddington
2020-10-07 18:19                       ` Trond Myklebust
2020-10-07 16:50                   ` Trond Myklebust
2021-01-19 22:22                     ` bfields
2021-01-19 23:09                       ` Trond Myklebust
2021-01-20 15:07                         ` bfields
2021-05-03 20:09                           ` bfields
2021-05-04  2:08                             ` NeilBrown
2021-05-04 13:27                               ` Tom Talpey
2021-05-04 14:27                               ` Trond Myklebust
2021-05-04 16:51                                 ` bfields
2021-05-04 21:32                                   ` Daire Byrne
2021-05-04 21:48                                     ` Trond Myklebust [this message]
2021-05-05 12:53                                       ` Daire Byrne
2021-01-20 15:58                       ` Chuck Lever
2020-10-07 13:56 ` Patrick Goetz
2020-10-07 16:28   ` Igor Ostrovsky
2020-10-07 16:30   ` Benjamin Coddington

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=5bd2516e41f7a6b35ea9772a56a7dfdec52b83a9.camel@hammerspace.com \
    --to=trondmy@hammerspace.com \
    --cc=aglo@umich.edu \
    --cc=bcodding@redhat.com \
    --cc=bfields@fieldses.org \
    --cc=chuck.lever@oracle.com \
    --cc=daire@dneg.com \
    --cc=fsorenso@redhat.com \
    --cc=jshivers@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    /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.