Re: [nfsv4] Current-stateid/special-stateid for Layoutget

Trond Myklebust <trondmy@gmail.com> Tue, 07 March 2017 01:30 UTC

Return-Path: <trondmy@gmail.com>
X-Original-To: nfsv4@ietfa.amsl.com
Delivered-To: nfsv4@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A5EAC129567 for <nfsv4@ietfa.amsl.com>; Mon, 6 Mar 2017 17:30:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c_llqZPOzN-c for <nfsv4@ietfa.amsl.com>; Mon, 6 Mar 2017 17:30:20 -0800 (PST)
Received: from mail-ot0-x232.google.com (mail-ot0-x232.google.com [IPv6:2607:f8b0:4003:c0f::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B969A128B37 for <nfsv4@ietf.org>; Mon, 6 Mar 2017 17:30:20 -0800 (PST)
Received: by mail-ot0-x232.google.com with SMTP id i1so125947023ota.3 for <nfsv4@ietf.org>; Mon, 06 Mar 2017 17:30:20 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=LTgfie+rnw8zUdb2EdgL4Fgj5H3YFC/qyMeTxHWhrfo=; b=fm/nRflYShg8klIx5/tuIvH2SC4JZ1uYCXMPzKW1xdN5wQqUNzbQgAczvJ5tx6lVsL DdHz219Uxw9bV68dr681pRc9YOo4TXye3UyXVWLV9Y1uP6lOlYcVBPXUmIVwMWb4TItM GEfE/vouL3qnR40Gj+u3yn+nZOfLFNKZEc0hrqSj/XZrQreTlpeOkovngztsNA3BfXVH wdlBS7ixSnZXIZXFZVNVIKtoKzJswIvgYP+bNy5DOzfFfsXOa8LjyPrMSrcHrM/ciw6/ NXW7xbbDFmTm2kTzdy6ztkSSuzmqiAAfVA0yulJMHQsKhNYJ3Xox7SFduhMp/Jw0OC6T 2d5A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=LTgfie+rnw8zUdb2EdgL4Fgj5H3YFC/qyMeTxHWhrfo=; b=YH1tWj7C5ylmuxGlW9p3w6om9QrsNIJVw85rFNzYbbHTfPdgK4K0D6Vg7AYElC9dGC PpJxvsA04tEHF7d1KSdCBlgKM+EGBJFGpWqTx7ruKhFvw9Tu/BS9KnGrKgVXHw99Rdml gqh9tanQD0KkcX71A+WHR0kbmLwehrVOTUQn9GyV3tdbFbNZTjq8jVJqnptZgiKDQvfG ayEQsaE2yBojgagSDGC/zCjpmuu7Sj5AALHvXi9/a7lQqUAy7x6BhRFWCVip1P5fLutL pZe7557dyY5YrQh7rKf5rhQgtkOugk2N7EaFcBIJKcTCGASVG8lLPzwscm+l+Ms5yCXV OdJw==
X-Gm-Message-State: AMke39nFFn5g3KXkcdjC8MXieUs+1GCDe618TtdMkFpeH63ayUqwVF3zMu+w1E535r4XyWbyYsa8mTlH8kB98w==
X-Received: by 10.157.4.5 with SMTP id 5mr5339306otc.205.1488850220142; Mon, 06 Mar 2017 17:30:20 -0800 (PST)
MIME-Version: 1.0
Received: by 10.157.21.60 with HTTP; Mon, 6 Mar 2017 17:30:19 -0800 (PST)
In-Reply-To: <YTXPR01MB018991790132B7CA9DA22FE5DD2C0@YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM>
References: <YTXPR01MB018991790132B7CA9DA22FE5DD2C0@YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM>
From: Trond Myklebust <trondmy@gmail.com>
Date: Mon, 06 Mar 2017 18:30:19 -0700
Message-ID: <CAABAsM457v6imD9UF9Bx71L43YFziG7TXRnoR7+cY6Q_qx88bg@mail.gmail.com>
To: Rick Macklem <rmacklem@uoguelph.ca>
Content-Type: multipart/alternative; boundary="001a113703027ed617054a19f4f0"
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/kN5Rh7Vk_6NWxBe0btKSd_jbRQU>
Cc: "nfsv4@ietf.org" <nfsv4@ietf.org>
Subject: Re: [nfsv4] Current-stateid/special-stateid for Layoutget
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: NFSv4 Working Group <nfsv4.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/nfsv4/>
List-Post: <mailto:nfsv4@ietf.org>
List-Help: <mailto:nfsv4-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 07 Mar 2017 01:30:22 -0000

Hi Rick,

Please see: https://tools.ietf.org/html/rfc5661#section-8.2.3
The '"other" is zero and "seqid" is 1' option should be what you are
looking for.

Cheers
  Trond

On 6 March 2017 at 15:59, Rick Macklem <rmacklem@uoguelph.ca> wrote:

> Boring background...
> I created a pNFS server using Flex File layout and GlusterFS. It was
> a dud. Basically worked, but was very slow.
> I came up with Plan B, which is a simple, single MDS server using
> File layout and FreeBSD's nfsd. It seems to work pretty well, which
> brings me to...
>
> When I have a client mounted with pNFS enabled, I see better I/O
> performance for tests on fairly big files, however for software builds
> (lots of I/O on small files), the performance is about the same for pNFS
> as when pNFS is disabled and all I/O is being done through the MDS.
>
> I am not 100% sure, but when pNFS is enabled, the client does two RPCs
> when a file is opened:
> - one that does the Open
> - one that does the LayoutGet
> and I think the extra RPC round trip time slows the pNFS case down.
>
> The obvious fix is to do the Open and LayoutGet in the same compound RPC.
> If the client already has a layout for the file, the LayoutGet can use the
> Current-FH set by the Open operation and the layout_stateid and life is
> good.
> However, if the client is getting the first layout for the file (this is
> usually the
> case for the File Layout), then it doesn`t work, because LayoutGet needs
> an open_stateid argument.
>
> So, here`s what I am thinking of:
> - Define a Current-OpenStateID, which is unset at the start of a compound.
> - A successful Open op. sets the Current-OpenStateID to the one in its
> reply,
>   so that it is set along with the Current-FH.
> - Any other operation that sets the Current-FH unsets Current-OpenStateID.
> - Redefine the case of LayoutGet with a special stateid as...
>   If the stateid in LayoutGet`s argument is a special stateid, replace it
> with
>   the Current-OpenStateID if one is set.
> --> Then, do everything else just as RFC-5661 states.
>
> I don't know about other implementations, but this would be easy to do in
> the FreeBSD NFSv4.1 server and would allow LayoutGet to follow Open in
> the same RPC, I think? (I haven't actually coded this yet.)
>
> For server's that don't support this, I don't think it would be a problem,
> since the compound would fail at the LayoutGet with NFS4ERR_BAD_STATEID.
> At that point, the client would have the Open reply and could just do the
> additional compound RPC with LayoutGet, using the OpenStateID in the Open
> reply.
>
> So, what do others think?
>
> Also, I haven't followed the versioning discussion, so I have no idea if
> this
> can be done without having a new minor version?
>
> Thanks, rick
> ps: I will probably code this up in FreeBSD experimentally, to see how it
> works.
>
> _______________________________________________
> nfsv4 mailing list
> nfsv4@ietf.org
> https://www.ietf.org/mailman/listinfo/nfsv4
>