Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1694685pxb; Wed, 9 Feb 2022 02:24:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJxieyp+/DrCrfPb5f7KcQTXhezagnuA5Tkc8LAt0MGulM4RrW8xatfTMG2+VG9iWKbzuPn5 X-Received: by 2002:a05:6a00:c92:: with SMTP id a18mr1518935pfv.50.1644402244408; Wed, 09 Feb 2022 02:24:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644402244; cv=none; d=google.com; s=arc-20160816; b=iStw0/R/QvGumUwlDjC4LjCLfWOh3Yu01Nd8G0IOvF3UaGpHgKs4NqCB9x86Y9/ivl 3uLQ/CHmEQG8V15D17CENZrHwwGL0nM9+2lnu51gGUw+fHIQqxUibPROd0h2tOtMXDbt /IC260O5i5Y/1oC0ki0HD7Icx4BxXjTLskGVif0tWGTs4EQV0zwGQYMubehxBFSZgxZY 3cft6WWvjHDU5CcqO0bjhLylMyTAVFWmvrIE1aq8tuz8BYONwk97ZaB/U04XwfoNu654 6m0gHMbBWELb+2ZdWbNcufV8hQY1zXERBOoKFTDs4AD+JYNHRApSRGa1dME7pFPk986b mvjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=s14TajN291sD1YxLCHXolCM3fi20R+bTdbrd5rqKyF4=; b=Q2Sqa9Sj0Sp3+4OcNVZPvnS4JXFsMWaxqTvIRtSpu5ZdvpllK23hjwuYtkL30kpGAz r+Sk61wGlFox4siAtX1zjYP8RAM55fIliWZU9wk0MMlcjZYjIVOaWBr6A8bPt+lLfOBU HmyzwEvRbN3C/VVS5Y0dS0pb8BIbciW/qzH3KWxL0TNjiaLAdpHJK+OpShsLwPX9LJW5 zRQbpE55+gZVi8aupkWMb9AbrnroosxhQo1aLWjlx+WZ/d5+m1DRLyJQaOx7kmYeiTwL HKvrCDeKQdIowpzdH0GdnQ3XUyQdXM2dSJb/G94VvxAvQ8Yi5s6aoI64bwEXxcjUmSH9 QT1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dneg.com header.s=google header.b=iyXGzXfo; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dneg.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id lb4si5239459pjb.11.2022.02.09.02.23.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 02:24:04 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@dneg.com header.s=google header.b=iyXGzXfo; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dneg.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C9A55E03490C; Wed, 9 Feb 2022 01:19:37 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1385506AbiBHSta (ORCPT + 99 others); Tue, 8 Feb 2022 13:49:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1385498AbiBHSt1 (ORCPT ); Tue, 8 Feb 2022 13:49:27 -0500 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 650A5C0612C0 for ; Tue, 8 Feb 2022 10:49:26 -0800 (PST) Received: by mail-ej1-x62a.google.com with SMTP id m4so316376ejb.9 for ; Tue, 08 Feb 2022 10:49:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dneg.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=s14TajN291sD1YxLCHXolCM3fi20R+bTdbrd5rqKyF4=; b=iyXGzXfoL0JpbP06eJjrzryVUDtWOks4c6WGlA8VSZcxeOXh7EesROhmVgp1lKsh2X mLox0sePMLEpyXiekeIfMzM8egoDhr06QlgjddtPCaHVfk6DqmlfeAR12wQH8EfLn4Yt bu42AzJrVCkkJFvbbBpzBu1vJoEgayO/7U328R+67QSbMIPpWN+x3LqaoIJGLpX3Qgan sjSs0VnL/uFjRvAYboGJpGfRtxpZHb0YyqY+2iy3k9K7QRh6/UEkz687lpDyExHxb/Ns 3bYFI478zKOA2aWe3y1b38xepMzJs5bWiB/NTxnAlp3cpUb/2OVBIJDtkF0IyRJvfmr8 i4NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=s14TajN291sD1YxLCHXolCM3fi20R+bTdbrd5rqKyF4=; b=Va9LKAYdowDbk8XWTPsUT0x0gLEneOKtBLMk6vtwTKT3Q4Zns/yzGbTNbmLV2Jb34z pJKqsDuuP/AxbSOnBybjtkdtE5Stzdid5TN0h4TQk51UGKU7L1UYDCBHmRA0UeUVLgFL P+g8lDAOqtV9CAwG13qF4/hwQuLQQBmd1+j/Xwa8XcnYMFf6HIdbL1+4dlK7YF+q0PI4 kTfWWo2H5B1uzCttOMv1IknHxuuJIr80jrUJvj+LUz+G+sSu/oDGZSz8Zo4AKKzm/9OI OKs0DMn4Egkm2V9e74CRvlOxF5RiklhXegEE8yL26q37PEft1ZtOhrwQ06Oq61CDBuU4 v/Vw== X-Gm-Message-State: AOAM533k5UYEKft/hZivHz+8aqb29svBpuCJ+I7gCO6qP9axlhHR7/dV +1lGVChzuRN+NDduA+T9bMnNny7bKd4nPTw4x/sHSA== X-Received: by 2002:a17:906:3b42:: with SMTP id h2mr4944788ejf.647.1644346164898; Tue, 08 Feb 2022 10:49:24 -0800 (PST) MIME-Version: 1.0 References: <20220124193759.GA4975@fieldses.org> <20220125212055.GB17638@fieldses.org> <164315533676.5493.13243313269022942124@noble.neil.brown.name> <20220126025722.GD17638@fieldses.org> In-Reply-To: <20220126025722.GD17638@fieldses.org> From: Daire Byrne Date: Tue, 8 Feb 2022 18:48:49 +0000 Message-ID: Subject: Re: parallel file create rates (+high latency) To: "J. Bruce Fields" Cc: NeilBrown , Patrick Goetz , linux-nfs Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Wed, 26 Jan 2022 at 02:57, J. Bruce Fields wrote: > > On Wed, Jan 26, 2022 at 11:02:16AM +1100, NeilBrown wrote: > > On Wed, 26 Jan 2022, J. Bruce Fields wrote: > > > On Tue, Jan 25, 2022 at 03:15:42PM -0600, Patrick Goetz wrote: > > > > So the directory is locked while the inode is created, or something > > > > like this, which makes sense. > > > > > > It accomplishes a number of things, details in > > > https://www.kernel.org/doc/html/latest/filesystems/directory-locking.html > > > > Just in case anyone is interested, I wrote this a while back: > > > > http://lists.lustre.org/pipermail/lustre-devel-lustre.org/2018-November/008177.html > > > > it includes a patch to allow parallel creates/deletes over NFS (and any > > other filesystem which adds support). > > I doubt it still applies, but it wouldn't be hard to make it work if > > anyone was willing to make a strong case that we would benefit from > > this. Well, I couldn't resist quickly testing Neil's patch. I found it applied okay to v5.6.19 with minimal edits. As before, without the patch, parallel file creates in a single directory with 1000 threads topped out at an aggregate of 3 creates/s over a 200ms link. With the patch it jumps up to 1,200 creates/s. So a pretty dramatic difference. I can't say if there are any other side effects or regressions as I only did this simple test. It's great for our super niche workloads and use case anyway. Daire > Neato. > > Removing the need to hold an exclusive lock on the directory across > server round trips seems compelling to me.... > > I also wonder: why couldn't you fire off the RPC without any locks, then > wait till you get a reply to take locks and update your local cache? > > OK, for one thing, calls and replies and server processing could all get > reordered. We'd need to know what order the server processed operations > in, so we could process replies in the same order. > > --b.