Re: [nfsv4] [PATCH 1/3] Allow the client to inform the MDS of statistics

Benny Halevy <bhalevy.lists@gmail.com> Mon, 19 May 2014 07:37 UTC

Return-Path: <bhalevy.lists@gmail.com>
X-Original-To: nfsv4@ietfa.amsl.com
Delivered-To: nfsv4@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6E0481A0314 for <nfsv4@ietfa.amsl.com>; Mon, 19 May 2014 00:37:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.7
X-Spam-Level:
X-Spam-Status: No, score=0.7 tagged_above=-999 required=5 tests=[BAYES_50=0.8, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] autolearn=ham
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 uYqZuym5xAE6 for <nfsv4@ietfa.amsl.com>; Mon, 19 May 2014 00:37:04 -0700 (PDT)
Received: from mail-we0-x235.google.com (mail-we0-x235.google.com [IPv6:2a00:1450:400c:c03::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F03321A0311 for <nfsv4@ietf.org>; Mon, 19 May 2014 00:37:03 -0700 (PDT)
Received: by mail-we0-f181.google.com with SMTP id w61so4911527wes.26 for <nfsv4@ietf.org>; Mon, 19 May 2014 00:37:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=BIdHRc1SwH0UTRcjA9hgkI+fNVf5mAxvbLDJJjMv9ck=; b=Tyyue8hFmH5v7e5wUYKqdO1QI3qG9iLJy83V6iFiyjTPtViMw3NZS4qOccCQtuUS3j j0IkDdIA1vfwkONt+PXMpc4aBCkEDqOe84SG3GJXnWgYCs0oS8arKnygx2ACzjZdrB+N 3UsFwNug0KvvDkRlUfhIsxEi/BmOYF8ahG98hJ9PIiJvsBDLBxQa9/w4Ai8aH6jAlXHw KQArkz5/XWylw/vmiBy1Iny7CyuOeQ20Ctd1y2O42rz/Cw9ym74X2j5DhsytbKoT02cF rpxvseufEGZ5AOj06/jZQTsShLO27CAmlzKVnD1AGrwB1eunHY198kYyioXzQ25lPQig bVAA==
X-Received: by 10.180.12.238 with SMTP id b14mr11503644wic.16.1400485022823; Mon, 19 May 2014 00:37:02 -0700 (PDT)
Received: from localhost.il.tonian.com (bzq-79-181-107-125.red.bezeqint.net. [79.181.107.125]) by mx.google.com with ESMTPSA id z14sm13586572wiu.6.2014.05.19.00.37.01 for <multiple recipients> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 19 May 2014 00:37:02 -0700 (PDT)
Message-ID: <5379B49B.5050706@gmail.com>
Date: Mon, 19 May 2014 10:36:59 +0300
From: Benny Halevy <bhalevy.lists@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0
MIME-Version: 1.0
To: Thomas Haynes <thomas.haynes@primarydata.com>, nfsv4@ietf.org
References: <1400201769-40352-1-git-send-email-Thomas.Haynes@primarydata.com> <1400201769-40352-2-git-send-email-Thomas.Haynes@primarydata.com>
In-Reply-To: <1400201769-40352-2-git-send-email-Thomas.Haynes@primarydata.com>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Archived-At: http://mailarchive.ietf.org/arch/msg/nfsv4/dyQlzzohCK--MTuBSBiX9hm-UEg
Subject: Re: [nfsv4] [PATCH 1/3] Allow the client to inform the MDS of statistics
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.15
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: <http://www.ietf.org/mail-archive/web/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: Mon, 19 May 2014 07:37:06 -0000

On 05/16/2014 03:56 AM, Thomas Haynes wrote:
> From: Tom Haynes <Thomas.Haynes@primarydata.com>
>
> Signed-off-by: Tom Haynes <Thomas.Haynes@primarydata.com>
> ---
>  Makefile                         |  4 ++++
>  dotx.d/Makefile                  | 23 +++++++++++++----------
>  dotx.d/layoutstats_args.x        | 10 ++++++++++
>  dotx.d/layoutstats_res.x         |  5 +++++
>  dotx.d/type_io_info.x            |  4 ++++
>  nfsv42_middle_errors.xml         | 31 +++++++++++++++++++++++++++++++
>  nfsv42_middle_new_errors.xml     | 31 +++++++++++++++++++++++++++++++
>  nfsv42_middle_op_layoutstats.xml | 38 ++++++++++++++++++++++++++++++++++++++
>  nfsv42_middle_op_mandlist.xml    |  1 +
>  9 files changed, 137 insertions(+), 10 deletions(-)
>  create mode 100644 dotx.d/layoutstats_args.x
>  create mode 100644 dotx.d/layoutstats_res.x
>  create mode 100644 dotx.d/type_io_info.x
>  create mode 100644 nfsv42_middle_op_layoutstats.xml
>
> diff --git a/Makefile b/Makefile
> index 6b65a00..3a81c8f 100755
> --- a/Makefile
> +++ b/Makefile
> @@ -355,6 +355,9 @@ AUTOGEN =	\
>  		autogen/layoutget_res.xml \
>  		autogen/layoutreturn_args.xml \
>  		autogen/layoutreturn_res.xml \
> +		autogen/type_io_info.xml \
> +		autogen/layoutstats_args.xml \
> +		autogen/layoutstats_res.xml \
>  		autogen/link_args.xml \
>  		autogen/link_res.xml \
>  		autogen/lock_args.xml \
> @@ -448,6 +451,7 @@ IDXMLSRC_BASE = \
>  	${DOC_PREFIX}_middle_op_deallocate.xml \
>  	${DOC_PREFIX}_middle_op_io_advise.xml \
>  	${DOC_PREFIX}_middle_op_layoutreturn.xml \
> +	${DOC_PREFIX}_middle_op_layoutstats.xml \
>  	${DOC_PREFIX}_middle_op_offload_cancel.xml \
>  	${DOC_PREFIX}_middle_op_offload_status.xml \
>  	${DOC_PREFIX}_middle_op_read_plus.xml \
> diff --git a/dotx.d/Makefile b/dotx.d/Makefile
> index 928bd5b..555b9ee 100755
> --- a/dotx.d/Makefile
> +++ b/dotx.d/Makefile
> @@ -106,16 +106,16 @@ FORE_OPS_AS_IS2 = \
>  		want_delegation_res.x \
>  		destroy_clientid_args.x \
>  		destroy_clientid_res.x \
> -                reclaim_complete_args.x \
> -                reclaim_complete_res.x \
> -                copy_args.x \
> -                copy_res.x \
> -                copy_notify_args.x \
> -                copy_notify_res.x \
> -                offload_cancel_args.x \
> -                offload_cancel_res.x \
> -                offload_status_args.x \
> -                offload_status_res.x \
> +		reclaim_complete_args.x \
> +		reclaim_complete_res.x \
> +		copy_args.x \
> +		copy_res.x \
> +		copy_notify_args.x \
> +		copy_notify_res.x \
> +		offload_cancel_args.x \
> +		offload_cancel_res.x \
> +		offload_status_args.x \
> +		offload_status_res.x \
>  		allocate_args.x \
>  		allocate_res.x \
>  		deallocate_args.x \
> @@ -123,6 +123,9 @@ FORE_OPS_AS_IS2 = \
>  		type_io_advise.x \
>  		io_advise_args.x \
>  		io_advise_res.x \
> +		type_io_info.x \
> +		layoutstats_args.x \
> +		layoutstats_res.x \
>  		read_plus_args.x \
>  		read_plus_content.x \
>  		read_plus_res_pre.x \
> diff --git a/dotx.d/layoutstats_args.x b/dotx.d/layoutstats_args.x
> new file mode 100644
> index 0000000..61e8eee
> --- /dev/null
> +++ b/dotx.d/layoutstats_args.x
> @@ -0,0 +1,10 @@
> +
> +struct LAYOUTSTATS4args {
> +        /* CURRENT_FH: file */
> +        offset4                 lsa_offset;
> +        length4                 lsa_length;
> +        stateid4                lsa_stateid;
> +	io_info4		lsa_read;
> +	io_info4		lsa_write;
> +        layoutupdate4           lsa_layoutupdate;
> +};
> diff --git a/dotx.d/layoutstats_res.x b/dotx.d/layoutstats_res.x
> new file mode 100644
> index 0000000..6928863
> --- /dev/null
> +++ b/dotx.d/layoutstats_res.x
> @@ -0,0 +1,5 @@
> +
> +struct LAYOUTSTATS4res {
> +	nfsstat4	lsr_status;
> +};
> +
> diff --git a/dotx.d/type_io_info.x b/dotx.d/type_io_info.x
> new file mode 100644
> index 0000000..fa1a22a
> --- /dev/null
> +++ b/dotx.d/type_io_info.x
> @@ -0,0 +1,4 @@
> +struct io_info4 {
> +	uint32_t	ii_count;
> +	uint64_t	ii_bytes;
> +};

Flex-files had an ios_duration field to relate <count, bytes> with a time span.
Otherwise the server's throughput estimate will be rough and possibly inaccurate
based on the time since last report, and this will miss bursts.

Benny

> diff --git a/nfsv42_middle_errors.xml b/nfsv42_middle_errors.xml
> index c8ecd2d..73f255c 100644
> --- a/nfsv42_middle_errors.xml
> +++ b/nfsv42_middle_errors.xml
> @@ -1955,6 +1955,37 @@
>          NFS4ERR_WRONG_TYPE
>        </c>
>  
> +      <c>LAYOUTSTATS</c>
> +      <c>
> +        NFS4ERR_ADMIN_REVOKED,
> +        NFS4ERR_BADXDR,
> +        NFS4ERR_BAD_STATEID,
> +        NFS4ERR_DEADSESSION,
> +        NFS4ERR_DELAY,
> +        NFS4ERR_DELEG_REVOKED,
> +        NFS4ERR_EXPIRED,
> +        NFS4ERR_FHEXPIRED,
> +        NFS4ERR_GRACE,
> +        NFS4ERR_INVAL,
> +        NFS4ERR_ISDIR,
> +        NFS4ERR_MOVED,
> +        NFS4ERR_NOFILEHANDLE,
> +        NFS4ERR_NOTSUPP,
> +        NFS4ERR_NO_GRACE,
> +        NFS4ERR_OLD_STATEID,
> +        NFS4ERR_OP_NOT_IN_SESSION,
> +        NFS4ERR_REP_TOO_BIG,
> +        NFS4ERR_REP_TOO_BIG_TO_CACHE,
> +        NFS4ERR_REQ_TOO_BIG,
> +        NFS4ERR_RETRY_UNCACHED_REP,
> +        NFS4ERR_SERVERFAULT,
> +        NFS4ERR_STALE,
> +        NFS4ERR_TOO_MANY_OPS,
> +        NFS4ERR_UNKNOWN_LAYOUTTYPE,
> +        NFS4ERR_WRONG_CRED,
> +        NFS4ERR_WRONG_TYPE
> +      </c>
> +
>        <c>LINK</c>
>        <c>
>          NFS4ERR_ACCESS,
> diff --git a/nfsv42_middle_new_errors.xml b/nfsv42_middle_new_errors.xml
> index 053a629..cc18168 100644
> --- a/nfsv42_middle_new_errors.xml
> +++ b/nfsv42_middle_new_errors.xml
> @@ -269,6 +269,37 @@
>          NFS4ERR_WRONG_TYPE
>        </c>
>  
> +      <c>LAYOUTSTATS</c>
> +      <c>
> +        NFS4ERR_ADMIN_REVOKED,
> +        NFS4ERR_BADXDR,
> +        NFS4ERR_BAD_STATEID,
> +        NFS4ERR_DEADSESSION,
> +        NFS4ERR_DELAY,
> +        NFS4ERR_DELEG_REVOKED,
> +        NFS4ERR_EXPIRED,
> +        NFS4ERR_FHEXPIRED,
> +        NFS4ERR_GRACE,
> +        NFS4ERR_INVAL,
> +        NFS4ERR_ISDIR,
> +        NFS4ERR_MOVED,
> +        NFS4ERR_NOFILEHANDLE,
> +        NFS4ERR_NOTSUPP,
> +        NFS4ERR_NO_GRACE,
> +        NFS4ERR_OLD_STATEID,
> +        NFS4ERR_OP_NOT_IN_SESSION,
> +        NFS4ERR_REP_TOO_BIG,
> +        NFS4ERR_REP_TOO_BIG_TO_CACHE,
> +        NFS4ERR_REQ_TOO_BIG,
> +        NFS4ERR_RETRY_UNCACHED_REP,
> +        NFS4ERR_SERVERFAULT,
> +        NFS4ERR_STALE,
> +        NFS4ERR_TOO_MANY_OPS,
> +        NFS4ERR_UNKNOWN_LAYOUTTYPE,
> +        NFS4ERR_WRONG_CRED,
> +        NFS4ERR_WRONG_TYPE
> +      </c>
> +
>        <c>OFFLOAD_CANCEL</c>
>        <c>
>          NFS4ERR_ADMIN_REVOKED,
> diff --git a/nfsv42_middle_op_layoutstats.xml b/nfsv42_middle_op_layoutstats.xml
> new file mode 100644
> index 0000000..4784b13
> --- /dev/null
> +++ b/nfsv42_middle_op_layoutstats.xml
> @@ -0,0 +1,38 @@
> +<!-- Copyright (C) The IETF Trust (2014) -->
> +<!-- Copyright (C) The Internet Society (2014) -->
> +
> +<section anchor='op:layout_event' title='Operation 70: LAYOUTSTATS - Provide Statistics for the Layout'>
> +  <section toc='exclude' title="ARGUMENT">
> +    <?rfc include='autogen/type_layoutupdate4.xml'?>
> +    <?rfc include='autogen/type_io_info.xml'?>
> +    <?rfc include='autogen/layoutstats_args.xml'?>
> +  </section>
> +
> +  <section toc='exclude' title="RESULT">
> +    <?rfc include='autogen/layoutstats_res.xml'?>
> +  </section>
> +
> +  <section toc='exclude' title="DESCRIPTION">
> +    <t>
> +      The client can use LAYOUTSTATS to inform the metadata server
> +      about its interaction with the layout represented by the
> +      current filehandle, client ID (derived from the session ID
> +      in the preceding SEQUENCE operation), byte-range (lea_offset
> +      + lea_length), and lea_stateid. lsa_read and lsa_write allow
> +      for non-Layout Type specific statistices to be reported.  The
> +      remaining information the client is presenting is specific
> +      to the Layout Type and presented in the lea_layoutupdate
> +      field. Each Layout Type MUST define the contents of
> +      lea_layoutupdate in their respective specifications.
> +    </t>
> +
> +    <t>
> +      LAYOUTSTATS can be combined with IO_ADVISE (see
> +      <xref target='op:io_advise' />) to augment the decision making
> +      process of how the metadata server handles a file.  I.e.,
> +      IO_ADVISE lets the server know that a byte range has a certain
> +      characteristic, but not necessarily the intensity of that
> +      characteristic.
> +    </t>
> +  </section>
> +</section>
> diff --git a/nfsv42_middle_op_mandlist.xml b/nfsv42_middle_op_mandlist.xml
> index 4ebd0bb..b590a6e 100644
> --- a/nfsv42_middle_op_mandlist.xml
> +++ b/nfsv42_middle_op_mandlist.xml
> @@ -141,6 +141,7 @@
>        <c>LAYOUTCOMMIT         </c> <c> OPT </c> <c> pNFS (REQ)   </c>
>        <c>LAYOUTGET            </c> <c> OPT </c> <c> pNFS (REQ)   </c>
>        <c>LAYOUTRETURN         </c> <c> OPT </c> <c> pNFS (REQ)   </c>
> +      <c>LAYOUTSTATS          </c> <c> OPT </c> <c> pNFS (REQ)   </c>
>        <c>LINK                 </c> <c> OPT </c> <c>              </c>
>        <c>LOCK                 </c> <c> REQ </c> <c>              </c>
>        <c>LOCKT                </c> <c> REQ </c> <c>              </c>