Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4063830ybl; Mon, 27 Jan 2020 15:57:15 -0800 (PST) X-Google-Smtp-Source: APXvYqymaLr0/MMqbPtkmQEgicJOVtM0kc3f7CQquxoSifT7KN9n/c2aSyKUmfzeycR9j9rvvw6M X-Received: by 2002:aca:dc04:: with SMTP id t4mr1100121oig.51.1580169435116; Mon, 27 Jan 2020 15:57:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580169435; cv=none; d=google.com; s=arc-20160816; b=fEHR5CtHUg0TzJySz8bCIvFJ+tL00gKM4IBtM9sC/64WBq9r6XI8mL53uOVNV09UVG 6iSqSvvmCNHnRbiHNLxT005vvVIChN/6HCZx6ue6fo43Obs2wYDXERYf6JuZftLUC4na lK6JMVyDdEZpnxFGHuQ6wEq8RwnN92Qjt55OX1gI2FLN9fLYt0obP+oAnRH6joEkJ2Ie pD/2mHpXGAIc+fPd0AKB+Pc0UEoZ208j51QIH53ybrHmJhgKVvqzm7u1ToHTf7G+ztmx lyb0OTZ57g6HHFrII4Jck948bto4tNQcWy0vX3cJDiW+yBYbO5k7RdWW8U7+jXqCn/o2 pb3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=cddaBJhi14LILcdJxPUOqRzIFQzQqowLduXZfAy5glc=; b=Nlzg1FAHCT9oJthCTrrYTiVpRcF/f+VQrwO1CbNd1r+LeGmChfpVsQTHnL0jk2sxn/ 57Xh4BcShnHuAxArG8Q/2wpBksW7PPw4kETd0zRkViYhSt4WNRnNIDd+qVXpRXIa9EGF HxnLneocf9sawVYo/bUB4Pm/63yLLxyrKkNgkFBsvBillBzqaO1x36H/Jbha43w2U+IE ZUSEPxYKK//b8xXUPt+7m8mt70bpPQyNz0Uh7AXH2f9ALtk+kgPiMjgxz6r6tCYtdA4K cCQ5I+FCdglymYwjL2GRuOGPFccwouwvrW87hrZExTITO5qMhvak75Zsguud6No9N3pE o0yA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b25si7507755otp.212.2020.01.27.15.56.45; Mon, 27 Jan 2020 15:57:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726327AbgA0X4V (ORCPT + 99 others); Mon, 27 Jan 2020 18:56:21 -0500 Received: from mail105.syd.optusnet.com.au ([211.29.132.249]:38122 "EHLO mail105.syd.optusnet.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726191AbgA0X4V (ORCPT ); Mon, 27 Jan 2020 18:56:21 -0500 Received: from dread.disaster.area (pa49-195-111-217.pa.nsw.optusnet.com.au [49.195.111.217]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 245C13A1F01; Tue, 28 Jan 2020 10:56:19 +1100 (AEDT) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1iwEEr-0005bi-9v; Tue, 28 Jan 2020 10:56:17 +1100 Date: Tue, 28 Jan 2020 10:56:17 +1100 From: Dave Chinner To: "Darrick J. Wong" Cc: Murphy Zhou , linux-xfs@vger.kernel.org, linux-nfs@vger.kernel.org Subject: Re: A NFS, xfs, reflink and rmapbt story Message-ID: <20200127235617.GB18610@dread.disaster.area> References: <20200123083217.flkl6tkyr4b7zwuk@xzhoux.usersys.redhat.com> <20200124011019.GA8247@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200124011019.GA8247@magnolia> User-Agent: Mutt/1.10.1 (2018-07-13) X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.3 cv=W5xGqiek c=1 sm=1 tr=0 a=0OveGI8p3fsTA6FL6ss4ZQ==:117 a=0OveGI8p3fsTA6FL6ss4ZQ==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=Jdjhy38mL1oA:10 a=7-415B0cAAAA:8 a=DKXhrarefucG-zT5zuIA:9 a=VFtz45cXcEUkXO3f:21 a=2Tythr-q2aEXjZyO:21 a=CjuIK1q_8ugA:10 a=biEYGPWJfzWAr4FL6Ov7:22 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Thu, Jan 23, 2020 at 05:10:19PM -0800, Darrick J. Wong wrote: > On Thu, Jan 23, 2020 at 04:32:17PM +0800, Murphy Zhou wrote: > > Hi, > > > > Deleting the files left by generic/175 costs too much time when testing > > on NFSv4.2 exporting xfs with rmapbt=1. > > > > "./check -nfs generic/175 generic/176" should reproduce it. > > > > My test bed is a 16c8G vm. > > What kind of storage? Is the NFS server the same machine as what the local XFS tests were run on? > > NFSv4.2 rmapbt=1 24h+ > > Wow. I wonder what about NFS makes us so slow now? Synchronous > transactions on the inactivation? (speculates wildly at the end of the > workday) Doubt it - NFS server uses ->commit_metadata after the async operation to ensure that it is completed and on stable storage, so the truncate on inactivation should run at pretty much the same speed as on a local filesystem as it's still all async commits. i.e. the only difference on the NFS server is the log force that follows the inode inactivation... > I'll have a look in the morning. It might take me a while to remember > how to set up NFS42 :) > > --D > > > NFSv4.2 rmapbt=0 1h-2h > > xfs rmapbt=1 10m+ > > > > At first I thought it hung, turns out it was just slow when deleting > > 2 massive reflined files. Both tests run on the scratch device, so I don't see where there is a large file unlink in either of these tests. In which case, I'd expect that all the time is consumed in generic/176 running punch_alternating to create a million extents as that will effectively run a synchronous server-side hole punch half a million times. However, I'm guessing that the server side filesystem has a very small log and is on spinning rust, hence the ->commit_metadata log forces are preventing in-memory aggregation of modifications. This results in the working set of metadata not fitting in the log and so each new hole punch transaction ends up waiting on log tail pushing (i.e. metadata writeback IO). i.e. it's thrashing the disk, and that's why it is slow..... Storage details, please! Cheers, Dave. -- Dave Chinner david@fromorbit.com