All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <trondmy@hammerspace.com>
To: "guy@vastdata.com" <guy@vastdata.com>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: Linux NFS4.1 client's "server trunking" seems to do the opposite of what the name implies
Date: Wed, 21 Apr 2021 12:18:03 +0000	[thread overview]
Message-ID: <2b8ca2ac6e43acaf604eb1c0efdd45ca7a917038.camel@hammerspace.com> (raw)
In-Reply-To: <ee933f9d-21fd-9bc7-cdce-8da2d43b30a1@vastdata.com>

On Wed, 2021-04-21 at 10:42 +0300, guy keren wrote:
> hi Olga, thanks for the response. more comments/questions below:
> 
> On 4/21/21 2:28 AM, Olga Kornievskaia wrote:
>  > On Tue, Apr 20, 2021 at 4:59 PM guy keren <guy@vastdata.com>
> wrote:
>  >> Hi,
>  >>
>  >> when attempting to make two NFS 4.1 mounts from a linux NFS
> client, to
>  >> two IP addresses belonging to two different hosts in the same
> cluster
>  >> (i.e. the server major id in the EXCHANGE_ID response is the
> same) - the
>  >> linux NFS4.1 client discards the new TCP connection (to the 2nd
> IP) and
>  >> instead decides to use the first client connection for both
> mounts. this
>  >> seems to be handled in a hard-coded inside the function named
>  >> "nfs41_discover_server_trunking", and leads to reduced
> performance,
>  >> relative to using NFS3 (which will use two different TCP
> connections to
>  >> the two different hosts in the storage cluster).
>  >>
>  >> i was under the impression that (client_id) trunking is supposed
> to
>  >> allow to multiplex commands over multiple TCP connections - not
> to
>  >> consolidate different workloads onto the same TCP connection.
>  >>
>  >> is there a way to avoid this behaviour, other then faking that
> the
>  >> "server major id" is different on each node in the cluster? (this
> is
>  >> what appears to be done by NetApp, for instance).
>  > Hi Guy,
>  >
>  > Current implementation of the linux client does not support
> session
>  > trunking to the MDS (nor does it support client id trunking). I'm
>  > hoping session trunking support comes in the near future. Clientid
>  > trunking might not be something that's supported unless we'll have
> a
>  > clustered NFS server out there that can utilize that behaviour.
> 
> i see.
> 
>  > Btw you can do multipath NFS flows by using the combination of
>  > nconnect and the newly proposed sysfs interface (still in review)
> that
>  > can manipulate server endpoints.
> 
> the problem with nconnect is that although we will have multiple TCP 
> requests parallelism that can be achieved (since the slot table size
> is 
> the limiting factor for the number of in-flight commands).
> 
> the same problem will also exist with session trunking - while when 
> connection) - the number of in-flight commands can be increased
> linearly 
> to the number of TCP connections.
> 
> is there any way to work around that?
> 
> 

The Linux NFS client already supports dynamic slot allocation, and will
adjust its slot table size to match the values of sr_highest_slotid and
sr_target_highest_slotid. You can also recall slots using
CB_RECALL_SLOT in order to shrink the table size.

We consider this to be the right solution for scaling the number of
session slots, and are not considering implementing client id trunking.
The latter is a lot more onerous to manage for the client and does not
help solve the problem of flow control.

...and no, nobody promised anyone that performing a new mount would
magically increase the number of TCP connections available to existing
NFSv4 mounts. That's the reason why we're looking at Olga's sysfs
solution to add a proper control mechanism to allow dynamic
manipulation of the transports.

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



      reply	other threads:[~2021-04-21 12:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-20 20:59 Linux NFS4.1 client's "server trunking" seems to do the opposite of what the name implies guy keren
2021-04-20 23:28 ` Olga Kornievskaia
     [not found]   ` <4999b214-db58-a5ab-3097-523cf9a51c75@vastdata.com>
2021-04-21 13:21     ` Olga Kornievskaia
2021-04-21  7:42 ` guy keren
2021-04-21 12:18   ` Trond Myklebust [this message]

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=2b8ca2ac6e43acaf604eb1c0efdd45ca7a917038.camel@hammerspace.com \
    --to=trondmy@hammerspace.com \
    --cc=guy@vastdata.com \
    --cc=linux-nfs@vger.kernel.org \
    /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.