Linux NFS development
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Chuck Lever III <chuck.lever@oracle.com>,
	Trond Myklebust <trondmy@hammerspace.com>,
	Dave Chinner <david@fromorbit.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
	"neilb@suse.com" <neilb@suse.com>
Subject: Re: knfsd performance
Date: Tue, 18 Jun 2024 16:16:47 -0400	[thread overview]
Message-ID: <87354accc0d1166eb60827c0f8da545e0669915b.camel@kernel.org> (raw)
In-Reply-To: <7F7971B5-C7C8-4D0B-99CB-2D6CA8235FDD@oracle.com>

On Tue, 2024-06-18 at 19:54 +0000, Chuck Lever III wrote:
> 
> 
> > On Jun 18, 2024, at 3:50 PM, Trond Myklebust
> > <trondmy@hammerspace.com> wrote:
> > 
> > On Tue, 2024-06-18 at 19:39 +0000, Chuck Lever III wrote:
> > > 
> > > 
> > > > On Jun 18, 2024, at 3:29 PM, Trond Myklebust
> > > > <trondmy@hammerspace.com> wrote:
> > > > 
> > > > On Tue, 2024-06-18 at 18:40 +0000, Chuck Lever III wrote:
> > > > > 
> > > > > 
> > > > > > On Jun 18, 2024, at 2:32 PM, Trond Myklebust
> > > > > > <trondmy@hammerspace.com> wrote:
> > > > > > 
> > > > > > I recently back ported Neil's lwq code and sunrpc server
> > > > > > changes to
> > > > > > our
> > > > > > 5.15.130 based kernel in the hope of improving the
> > > > > > performance
> > > > > > for
> > > > > > our
> > > > > > data servers.
> > > > > > 
> > > > > > Our performance team recently ran a fio workload on a
> > > > > > client
> > > > > > that
> > > > > > was
> > > > > > doing 100% NFSv3 reads in O_DIRECT mode over an RDMA
> > > > > > connection
> > > > > > (infiniband) against that resulting server. I've attached
> > > > > > the
> > > > > > resulting
> > > > > > flame graph from a perf profile run on the server side.
> > > > > > 
> > > > > > Is anyone else seeing this massive contention for the spin
> > > > > > lock
> > > > > > in
> > > > > > __lwq_dequeue? As you can see, it appears to be dwarfing
> > > > > > all
> > > > > > the
> > > > > > other
> > > > > > nfsd activity on the system in question here, being
> > > > > > responsible
> > > > > > for
> > > > > > 45%
> > > > > > of all the perf hits.
> > > > > 
> > > > > I haven't seen that, but I've been working on other issues.
> > > > > 
> > > > > What's the nfsd thread count on your test server? Have you
> > > > > seen a similar impact on 6.10 kernels ?
> > > > > 
> > > > 
> > > > 640 knfsd threads. The machine was a supermicro 2029BT-HNR with
> > > > 2xIntel
> > > > 6150, 384GB of memory and 6xWDC SN840.
> > > > 
> > > > Unfortunately, the machine was a loaner, so cannot compare to
> > > > 6.10.
> > > > That's why I was asking if anyone has seen anything similar.
> > > 
> > > If this system had more than one NUMA node, then using
> > > svc's "numa pool" mode might have helped.
> > > 
> > 
> > Interesting. I had forgotten about that setting.
> > 
> > Just out of curiosity, is there any reason why we might not want to
> > default to that mode on a NUMA enabled system?
> 
> Can't think of one off hand. Maybe back in the day it was
> hard to tell when you were actually /on/ a NUMA system.
> 
> Copying Dave to see if he has any recollection.
> 

It's at least partly because of the klunkiness of the old pool_threads
interface: You have to bring up the server first using the "threads"
procfile, and then you can actually bring up threads in the various
pools using pool_threads.

Same for shutdown. You have to bring down the pool_threads first and
then you can bring down the final thread and the rest of the server
with it. Why it was designed this way, I have NFC.

The new nfsdctl tool and netlink interfaces should make this simpler in
the future. You'll be able to set the pool-mode in /etc/nfs.conf and
configure a list of per-pool thread counts in there too. Once we have
that, I think we'll be in a better position to consider doing it by
default.

Eventually we'd like to make the thread poos dynamic, at which point
making that the default becomes much simpler from an administrative
standpoint.
-- 
Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2024-06-18 20:16 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18 18:32 knfsd performance Trond Myklebust
2024-06-18 18:40 ` Chuck Lever III
2024-06-18 19:29   ` Trond Myklebust
2024-06-18 19:39     ` Chuck Lever III
2024-06-18 19:50       ` Trond Myklebust
2024-06-18 19:54         ` Chuck Lever III
2024-06-18 20:16           ` Jeff Layton [this message]
2024-06-18 23:17             ` NeilBrown
2024-06-18 23:26               ` Chuck Lever III
2024-06-18 23:33                 ` Jeff Layton
2024-06-18 23:51                   ` Chuck Lever III
2024-06-19  2:56                 ` Dave Chinner
2024-06-19  5:47                   ` Christoph Hellwig
2024-06-19 13:44                   ` Chuck Lever III
2024-06-19 21:16                   ` NeilBrown
2024-06-19  0:42           ` Dave Chinner
2024-06-19  1:01             ` NeilBrown
2024-06-19 21:25               ` NeilBrown
2024-06-20  2:29                 ` Dave Chinner
2024-06-20 10:18                   ` Jeff Layton
2024-06-20 21:39                     ` NeilBrown
2024-06-20 18:33                   ` Chuck Lever III
2024-06-20 22:04                     ` NeilBrown
2024-06-20 23:57                       ` Trond Myklebust
2024-06-18 19:38 ` Jeff Layton
2024-06-18 23:12   ` NeilBrown

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=87354accc0d1166eb60827c0f8da545e0669915b.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=david@fromorbit.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.com \
    --cc=trondmy@hammerspace.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