Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3115948pxk; Tue, 15 Sep 2020 10:24:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzp9sg698yKqAWxVXNj0igQj/urTrWUcuAHAPS4m8kHchSHyYpXn7NwRZIlwS+1qt9OgTMl X-Received: by 2002:a17:906:5611:: with SMTP id f17mr22437289ejq.427.1600190673607; Tue, 15 Sep 2020 10:24:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600190673; cv=none; d=google.com; s=arc-20160816; b=0CYgGxCDXXRohqrp9JBoaIMCfR5oIt9oIuLlReh/Hl5DaKPylCvpKQmb70dRSHX21I LqzbOGxHXvn6sEfEtRNfVFEbN8ZaDtCh73nUcSKximNEIgjpiAhPJKXykBxkqCNejwh5 pxZdKc26X1z2+Z8vMH6qvA+7PiQK7j7k1kUXBxIkCNVJKbMxIwRwf0+bOOGo4c4EJX7V W+s3jJWJ7Z2oMA5B3N3pwdFAeyUD12gjivDfINMk1uTTnEuFv4vwoGBSxVXGhPmmcker EStTPcncHic9b7Urq5Ls5b9GKaXKwFceES24dW7iw7t5RQ+6se3guW8sYvBq6UJVnD/i Ew/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:from:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:dkim-signature:dkim-filter; bh=64NKhEMy3G6Usr7RizKHUe0/PgW9C7nGVNj2fkaTP28=; b=KLTPOb18S2XPXhyP5hb46Locq0TL2jwBQF/k3PUbpOS9CcWIoJi6Keh/Tp5epDeQEH uh7gTukebtgBNfdRbOjRfTYUnnuVahpYos6c+S8vmiSiegU+NlA9Wl/mBcY3TMgzQspy bcyLztn6UsOycxvuoA0KiDnTpp/ediMsMq0QaJdGZNhXLUpSLBnOsTth3Ku+6CdP8zLn UJuj6l3LFpzCocHNvlc6aFpNIKUKJHgN8S4aHAlDtW2LhoYFyVRBf0My+LZnaPTkG7gD s+DrCA9CYPwAvjrpgQzif1RNjZ7zT/+sFyaioISL3MPtgCsN97oOSFbS2l1yZiCSZOtz XDmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=UYD180hn; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ju7si10331500ejb.418.2020.09.15.10.23.54; Tue, 15 Sep 2020 10:24:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=UYD180hn; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727812AbgIORXk (ORCPT + 99 others); Tue, 15 Sep 2020 13:23:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727697AbgIORVn (ORCPT ); Tue, 15 Sep 2020 13:21:43 -0400 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9288AC061788 for ; Tue, 15 Sep 2020 10:21:43 -0700 (PDT) Received: by fieldses.org (Postfix, from userid 2815) id 915E67EC; Tue, 15 Sep 2020 13:21:40 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org 915E67EC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1600190500; bh=64NKhEMy3G6Usr7RizKHUe0/PgW9C7nGVNj2fkaTP28=; h=Date:To:Cc:Subject:References:In-Reply-To:From:From; b=UYD180hna+1yW/yZyJep/WhJ6Gi4IGtxxHhO3LhTd8BLQjECBIlto3ACF6c60a+B1 vptIpwzPBktwQyxCCKTbQ+AAxrkLI6FwLjdiQtXsHj30fo31WDwmbcum+WOmfXYVaj +hPbr60WwQy9bXwOAXrTVO3Xa2PtHJcUjfmK78aI= Date: Tue, 15 Sep 2020 13:21:40 -0400 To: Daire Byrne Cc: linux-nfs@vger.kernel.org, linux-cachefs@redhat.com Subject: Re: Adventures in NFS re-exporting Message-ID: <20200915172140.GA32632@fieldses.org> References: <943482310.31162206.1599499860595.JavaMail.zimbra@dneg.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <943482310.31162206.1599499860595.JavaMail.zimbra@dneg.com> User-Agent: Mutt/1.5.21 (2010-09-15) From: bfields@fieldses.org (J. Bruce Fields) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Mon, Sep 07, 2020 at 06:31:00PM +0100, Daire Byrne wrote: > 1) The kernel can drop entries out of the NFS client inode cache (under memory cache churn) when those filehandles are still being used by the knfsd's remote clients resulting in sporadic and random stale filehandles. This seems to be mostly for directories from what I've seen. Does the NFS client not know that knfsd is still using those files/dirs? The workaround is to never drop inode & dentry caches on the re-export servers (vfs_cache_pressure=1). This also helps to ensure that we actually make the most of our actimeo=3600,nocto mount options for the full specified time. I thought reexport worked by embedding the original server's filehandles in the filehandles given out by the reexporting server. So, even if nothing's cached, when the reexporting server gets a filehandle, it should be able to extract the original filehandle from it and use that. I wonder why that's not working? > 4) With an NFSv4 re-export, lots of open/close requests (hundreds per > second) quickly eat up the CPU on the re-export server and perf top > shows we are mostly in native_queued_spin_lock_slowpath. Any statistics on who's calling that function? > Does NFSv4 > also need an open file cache like that added to NFSv3? Our workaround > is to either fix the thing doing lots of repeated open/closes or use > NFSv3 instead. NFSv4 uses the same file cache. It might be the file cache that's at fault, in fact.... --b.