All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Daire Byrne <daire@dneg.com>
Cc: NeilBrown <neilb@suse.de>, Patrick Goetz <pgoetz@math.utexas.edu>,
	linux-nfs <linux-nfs@vger.kernel.org>
Subject: Re: parallel file create rates (+high latency)
Date: Mon, 25 Apr 2022 12:02:36 -0400	[thread overview]
Message-ID: <20220425160236.GB24825@fieldses.org> (raw)
In-Reply-To: <CAPt2mGMtBH=jzK0cTT7+PTbX-iR-iSx1RmF2beCDxBjXY5sj8A@mail.gmail.com>

On Mon, Apr 25, 2022 at 04:24:50PM +0100, Daire Byrne wrote:
> On Mon, 25 Apr 2022 at 14:22, J. Bruce Fields <bfields@fieldses.org> wrote:
> >
> > On Mon, Apr 25, 2022 at 02:00:32PM +0100, Daire Byrne wrote:
> > > On Mon, 21 Feb 2022 at 13:59, Daire Byrne <daire@dneg.com> wrote:
> > > >
> > > > On Fri, 18 Feb 2022 at 07:46, NeilBrown <neilb@suse.de> wrote:
> > > > > I've ported it to mainline without much trouble.  I started some simple
> > > > > testing (parallel create/delete of the same file) and hit a bug quite
> > > > > easily.  I fixed that (eventually) and then tried with more than 1 CPU,
> > > > > and hit another bug.  But then it was quitting time.  If I can get rid
> > > > > of all the easy to find bugs, I'll post it with a CC to you, and you can
> > > > > find some more for me!
> > > >
> > > > That would be awesome! I have a real world production case for this
> > > > and it's a pretty heavy workload. If that doesn't shake out any bugs,
> > > > nothing will.
> > > >
> > > > The only caveat being that it will likely be restricted to NFSv3
> > > > testing due to the concurrency limitations with NFSv4.1+ (from the
> > > > other thread).
> > > >
> > > > Daire
> > >
> > > Just to follow up on this again - I have been using Neil's patch for
> > > parallel file creates (thanks!) but I'm a bit confused as to why it
> > > doesn't seem to help in my NFS re-export case.
> > >
> > > With the patch, I can achieve much higher parallel (multi process)
> > > creates directly on my re-export server to a high latency remote
> > > server mount, but when I re-export that to multiple clients, the
> > > aggregate create rate again degrades to that which we might expect
> > > either without the patch or if there was only one process creating the
> > > files in sequence.
> > >
> > > My assumption was that the nfsd threads of the re-export server would
> > > act as multiple independent processes and it's clients would be spread
> > > across them such that they would also benefit from the parallel
> > > creates patch on the re-export server. So I expected many clients
> > > creating files in the same directory would achieve much higher
> > > aggregate performance.
> >
> > That's the idea.
> >
> > I've lost track, where's the latest version of Neil's patch?
> >
> > --b.
> 
> The latest is still the one from this thread (with a minor update to
> apply it to v5.18-rc):
> 
> https://lore.kernel.org/lkml/893053D7-E5DD-43DB-941A-05C10FF5F396@dilger.ca/T/#m922999bf830cacb745f32cc464caf72d5ffa7c2c

Thanks!

I haven't really tried to understand that patch--but just looking at the
diffstat, it doesn't touch fs/nfsd/.  And nfsd calls into the vfs only
after it locks the parent.  So nfsd is probably still using
the old behavior, where local callers are using the new (parallel)
behavior.

So I bet what you're seeing is expected, and all that's needed is some
updates to fs/nfsd/vfs.c to reflect whatever Neil did in fs/namei.c.

--b.

> My test is something like this:
> 
> reexport1 # for x in {1..5000}; do
>     echo /srv/server1/touch.$HOSTNAME.$x
> done | xargs -n1 -P 200 -iX -t touch X 2>&1 | pv -l -a >|/dev/null
> 
> Without the patch this results in 3 creates/s and with the patch it's
> ~250 creates/s with 200 threads/processes (200ms latency) when run
> directly against a remote RHEL8 server (server1).
> 
> Then I run something similar to this but simultaneously across 200
> clients of the "reexport1" server's re-export of the originating
> "server1". I get an aggregate of around 3 creates/s even with the
> patch applied to reexport1 (v5.18-rc2) which is suspiciously similar
> to the performance without the parallel vfs create patch.
> 
> The clients don't run any special kernels or configurations. I have
> only tested NFSv3 so far.
> 
> Daire

  reply	other threads:[~2022-04-25 16:02 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-23 23:53 parallel file create rates (+high latency) Daire Byrne
2022-01-24 13:52 ` Daire Byrne
2022-01-24 19:37 ` J. Bruce Fields
2022-01-24 20:10   ` Daire Byrne
2022-01-24 20:50     ` J. Bruce Fields
2022-01-25 12:52       ` Daire Byrne
2022-01-25 13:59         ` J. Bruce Fields
2022-01-25 15:24           ` Daire Byrne
2022-01-25 15:30           ` Chuck Lever III
2022-01-25 21:50             ` Patrick Goetz
2022-01-25 21:58               ` Chuck Lever III
2022-01-25 21:59               ` Bruce Fields
2022-01-25 22:11                 ` Patrick Goetz
2022-01-25 22:41                   ` Daire Byrne
2022-01-25 23:01                     ` Patrick Goetz
2022-01-25 23:25                       ` Daire Byrne
2022-01-25 21:15   ` Patrick Goetz
2022-01-25 21:20     ` J. Bruce Fields
2022-01-26  0:02       ` NeilBrown
2022-01-26  0:28         ` Daire Byrne
2022-01-26  2:57         ` J. Bruce Fields
2022-02-08 18:48           ` Daire Byrne
2022-02-10 18:19             ` Daire Byrne
2022-02-11 15:59               ` J. Bruce Fields
2022-02-17 19:50                 ` Daire Byrne
2022-02-18  7:46                   ` NeilBrown
2022-02-21 13:59                     ` Daire Byrne
2022-04-25 13:00                       ` Daire Byrne
2022-04-25 13:22                         ` J. Bruce Fields
2022-04-25 15:24                           ` Daire Byrne
2022-04-25 16:02                             ` J. Bruce Fields [this message]
2022-04-25 16:47                               ` Daire Byrne
2022-04-26  1:36                                 ` NeilBrown
2022-04-26 12:29                                   ` Daire Byrne
2022-04-28  5:46                                     ` NeilBrown
2022-04-29  7:55                                       ` Daire Byrne

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=20220425160236.GB24825@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=daire@dneg.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=pgoetz@math.utexas.edu \
    /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.