Re: [nfsv4] Inter server-side copy performance

"Mora, Jorge" <Jorge.Mora@netapp.com> Thu, 15 June 2017 19:34 UTC

Return-Path: <Jorge.Mora@netapp.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 45683128AB0 for <nfsv4@ietfa.amsl.com>; Thu, 15 Jun 2017 12:34:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.901
X-Spam-Level:
X-Spam-Status: No, score=-6.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=netapp.onmicrosoft.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 nG3FlJFvL7iK for <nfsv4@ietfa.amsl.com>; Thu, 15 Jun 2017 12:34:28 -0700 (PDT)
Received: from mx143.netapp.com (mx143.netapp.com [216.240.21.24]) (using TLSv1.2 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F21291277BB for <nfsv4@ietf.org>; Thu, 15 Jun 2017 12:34:27 -0700 (PDT)
X-IronPort-AV: E=Sophos;i="5.39,344,1493708400"; d="scan'208";a="199891566"
Received: from hioexcmbx07-prd.hq.netapp.com ([10.122.105.40]) by mx143-out.netapp.com with ESMTP; 15 Jun 2017 12:11:13 -0700
Received: from VMWEXCCAS07-PRD.hq.netapp.com (10.122.105.25) by hioexcmbx07-prd.hq.netapp.com (10.122.105.40) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Thu, 15 Jun 2017 12:29:24 -0700
Received: from NAM02-BL2-obe.outbound.protection.outlook.com (10.120.60.153) by VMWEXCCAS07-PRD.hq.netapp.com (10.122.105.25) with Microsoft SMTP Server (TLS) id 15.0.1210.3 via Frontend Transport; Thu, 15 Jun 2017 12:29:23 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netapp.onmicrosoft.com; s=selector1-netapp-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=00/yZU59NZk0C8JNyLKIj6GhXgPZlwMFYOmubt3VhQ8=; b=jmb9WipeXyk3UEHYp7OJ/4Ana6DWmWh2LDl9r4PBrUWY+5PI3rPIjK7b6o4UNXXDrZYyX+spHOhDkJ8Hxi90I9AGLeUn2YuZd4EJ0K+tePOuPsvV9d87ayevWkUq51n5IAi0cyOsYskk3VuVPAaA48ZBvAL+8t72TcY2zkqKiXU=
Received: from BLUPR06MB547.namprd06.prod.outlook.com (10.141.205.22) by BLUPR06MB547.namprd06.prod.outlook.com (10.141.205.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14; Thu, 15 Jun 2017 19:29:24 +0000
Received: from BLUPR06MB547.namprd06.prod.outlook.com ([10.141.205.22]) by BLUPR06MB547.namprd06.prod.outlook.com ([10.141.205.22]) with mapi id 15.01.1178.016; Thu, 15 Jun 2017 19:29:24 +0000
From: "Mora, Jorge" <Jorge.Mora@netapp.com>
To: "J. Bruce Fields" <bfields@fieldses.org>, Olga Kornievskaia <aglo@umich.edu>
CC: Anna Schumaker <schumakeranna@gmail.com>, "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>, "nfsv4@ietf.org" <nfsv4@ietf.org>
Thread-Topic: [nfsv4] Inter server-side copy performance
Thread-Index: AQHSs5u10bLXlWBn5Uu+5DgJxojRSqHDlDKAgAFWJ4CAAHjNgIAENMEAgAAf3ACAAbObuIAAEfuAgFrSOwA=
Date: Thu, 15 Jun 2017 19:29:24 +0000
Message-ID: <0E501639-4064-4EB8-8EFF-3F23CCA6A806@netapp.com>
References: <DFE33002-FE1C-4E83-B6E3-50BFD304C7F6@netapp.com> <20170413174515.GA5140@fieldses.org> <59BDF7CA-78BB-42FC-8BC4-95101F5E1EC7@netapp.com> <CAN-5tyHOdU9BJnJft+X06=6X7_s8MS_hDmg9t=fJQ=QtvJQD=w@mail.gmail.com> <20170417133604.GA22694@fieldses.org> <CAN-5tyF10OCihgYUMwoju6V+SnVZkpQNoQLb_UKoCAPuG+EgbQ@mail.gmail.com> <CAFX2JfkiraKm2Rmqhkrh3CSWBoYfW0QU=uXw=sSx-8Wt8JD7wg@mail.gmail.com> <CAN-5tyEO3wJ3sT_phM6LNGH3zpYmi21e+fhHjkSGvZrRqWziMw@mail.gmail.com> <20170418183333.GH6208@fieldses.org>
In-Reply-To: <20170418183333.GH6208@fieldses.org>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/f.21.0.170409
authentication-results: fieldses.org; dkim=none (message not signed) header.d=none;fieldses.org; dmarc=none action=none header.from=netapp.com;
x-originating-ip: [216.240.19.104]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; BLUPR06MB547; 7:OTOYJOJJ0aCJpIhlQ4J4pl3IK5cgKazSc4QIZsZF8ITJ+7F9dGipJ9LzhgWgt0l7g9sof8p2ab/rS3gjyg0miyGWC/+KoKnbOqnH0kS3eDBkCUOfHoF1cx9a7uvT1PUXZjcoiuuejfqgK1gn5EhINQy4/pfZKGXGPISu8bKCrGBsSwpFDzEImxNc8Gyxw3AHc6Oru2E95P1Y7OmYLy5C0NZuxVJ3NqSzKZ0l4Ka+GHxmu26Sk/dXDea/sdAogvdRrXfWpYf6KEZ5pm46pIgivvaGZDB+m6UQNLorASXahfBeq1ugFV/zEJllc8HOLeBnc+ZwUgH1mbpRqEqeqR5yGw==
x-ms-office365-filtering-correlation-id: ad32f55b-59b2-4a5a-3a2b-08d4b424d4cb
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:BLUPR06MB547;
x-ms-traffictypediagnostic: BLUPR06MB547:
x-microsoft-antispam-prvs: <BLUPR06MB54753EBD52D4D0F0F02F5EFE1C00@BLUPR06MB547.namprd06.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(158342451672863)(9452136761055);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6055026)(6041248)(20161123564025)(20161123560025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR06MB547; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR06MB547;
x-forefront-prvs: 0339F89554
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39410400002)(39400400002)(39840400002)(39850400002)(39450400003)(377454003)(24454002)(76176999)(86362001)(8936002)(53546009)(93886004)(3660700001)(66066001)(305945005)(2171002)(2906002)(3280700002)(8656002)(6486002)(478600001)(72206003)(966005)(189998001)(6246003)(6506006)(6436002)(77096006)(33656002)(7736002)(2950100002)(8676002)(6512007)(122556002)(38730400002)(229853002)(4326008)(50986999)(14454004)(81166006)(3846002)(6116002)(36756003)(83716003)(102836003)(2900100001)(25786009)(5660300001)(99286003)(6306002)(83506001)(54906002)(82746002)(53936002)(39060400002)(54356999)(4001350100001)(422495003); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR06MB547; H:BLUPR06MB547.namprd06.prod.outlook.com; FPR:; SPF:None; MLV:ovrnspm; PTR:InfoNoRecords; LANG:en;
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-ID: <0E104596F20A804D93F922CC8285BB5D@namprd06.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jun 2017 19:29:24.6899 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4b0911a0-929b-4715-944b-c03745165b3a
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR06MB547
X-OriginatorOrg: netapp.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/u307QFUhQYJErrsGTtX30n__Lhc>
Subject: Re: [nfsv4] Inter server-side copy performance
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.22
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: Thu, 15 Jun 2017 19:34:30 -0000

Here are the new numbers using latest SSC code for an 8GB copy.
The code has a delayed unmount on the destination server which allows for single
mount when multiple COPY calls are made back to back.
Also, there is a third option which is using ioctl with a 64 bit copy length in order to 
issue a single call for copy lengths >= 4GB.

Setup:
     Client: 16 CPUs, 32GB
     SRC server: 4 CPUs, 8GB
     DST server: 4 CPUs, 8GB

Traditional copy:
    DBG2: 20:31:43.683595 - Traditional COPY returns 8589934590 (96.8432810307 seconds)
SSC (2 copy_file_range calls back to back):
    DBG2: 20:30:00.268203 - Server-side COPY returns 8589934590 (83.0517759323 seconds)
    PASS: SSC should outperform traditional copy, performance improvement for a 8GB file: 16%
SSC (2 copy_file_range calls in parallel):
    DBG2: 20:34:49.686573 - Server-side COPY returns 8589934590 (79.3080010414 seconds)
    PASS: SSC should outperform traditional copy, performance improvement for a 8GB file: 20%
SSC (1 ioctl call):
    DBG2: 20:38:41.323774 - Server-side COPY returns 8589934590 (74.7774350643 seconds)
    PASS: SSC should outperform traditional copy, performance improvement for a 8GB file: 28%

Since I don’t have three similar systems to test with, having the best machine (more cpu’s and more memory)
as the client gives a better performance for the traditional copy. The following results are done using
the best machine as the destination server instead.

Setup (using the best machine as the destination server instead):
     Client: 4 CPUs, 8GB
     SRC server: 4 CPUs, 8GB
     DST server: 16 CPUs, 32GB

Traditional copy:
    DBG2: 21:52:15.039625 - Traditional COPY returns 8589934590 (178.686635971 seconds)
SSC (2 copy_file_range calls back to back):
    DBG2: 21:49:08.961384 - Server-side COPY returns 8589934590 (173.071172953 seconds)
    PASS: SSC should outperform traditional copy, performance improvement for a 8GB file: 3%
SSC (2 copy_file_range calls in parallel):
    DBG2: 21:35:59.822467 - Server-side COPY returns 8589934590 (159.743849993 seconds)
    PASS: SSC should outperform traditional copy, performance improvement for a 8GB file: 18%
SSC (1 ioctl call):
    DBG2: 21:28:33.461528 - Server-side COPY returns 8589934590 (83.9983980656 seconds)
    PASS: SSC should outperform traditional copy, performance improvement for a 8GB file: 119%

As you can see a single 8GB copy (ioctl with 64 bit copy length) performs the same as before (about 80 seconds)
but in this case the traditional copy takes a lot longer.


--Jorge


On 4/18/17, 12:33 PM, "linux-nfs-owner@vger.kernel.org on behalf of J. Bruce Fields" <linux-nfs-owner@vger.kernel.org on behalf of bfields@fieldses.org> wrote:

    On Tue, Apr 18, 2017 at 01:28:39PM -0400, Olga Kornievskaia wrote:
    > Given how the code is written now it looks like it's not possible to
    > save up commits....
    > 
    > Here's what I can see happening:
    > 
    > nfs42_proc_clone() as well as nfs42_proc_copy() will call
    > nfs_sync_inode(dst) "to make sure server(s) have the latest data"
    > prior to initiating the clone/copy. So even if we just queue up (not
    > send) the commit after the executing nfs42_proc_copy, then next call
    > into vfs_copy_file_range() will send out that queued up commit.
    > 
    > Is it ok to relax the requirement that requirement, I'm not sure...
    
    Well, if the typical case of copy_file_range is just opening a file,
    doing a single big copy_file_range(), then closing the file, then this
    doesn't matter.
    
    The linux server is currently limiting COPY to 4MB at a time, which will
    make the commits more annoying.
    
    Even there the typical case will probably still be an open, followed by
    a series of non-overlapping copies, then close, and that shouldn't
    require the commits.
    
    --b.
    --
    To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html