Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4325927rwb; Tue, 6 Sep 2022 06:06:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR4Hoe8PGO25ujS+xzLZG4DrYz194cKSi/UcXVB52hU5Pm+jNK7VGi4jApR6q2MwFe0VDrTf X-Received: by 2002:a17:906:e12:b0:750:bf91:caa4 with SMTP id l18-20020a1709060e1200b00750bf91caa4mr14908967eji.387.1662469600855; Tue, 06 Sep 2022 06:06:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662469600; cv=none; d=google.com; s=arc-20160816; b=EDLWh/tYGaVQuXd0XI+7AAaZGtIRMCI42M/lD20x3JNUCNmrPvyJTc4cgm5BlsIWAk P9tRHSly5+hk3YB2N/ktrE2CLdCSi3wl38iBhsxvz40088/UDaB08eSarsYk9tCXE0wA +rKzOKOXX4lw1a/dts4xEmi4qxpamxWG1dIRS/DHOsHqhV9jnabJNwKRWLEDZ0LQbv+R ZFSl5ZuKOnIJN0no2ZE4cRjokH5owczPy+xNq+7YzDRztaEkyOttNM1VBkb3eG0MyUI8 LvwogU/dLahcT518g0TdmvIcTMxKqLZculPGtKlKolb0ibgBaNuBuPBPhcpkITqPO96Q CjKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:from:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:date :dkim-signature:dkim-filter; bh=IJOyuF6urIA6S6GGr4y8z0q8js5tsULVoh3/SfaEaSY=; b=cx6XwfOt9NueLR0MNMMu6qlcL4B6NFjZh09MbV/BEuC2PwCF9L8CnuzsuhYxDazGuK pQ3En1lWDivGMzaFUwFaClzIETxDu16l0SwbelUy/QPcLJKRuUdVJrktfm3ImlIq+x6O iHqfCHXKpVSuwY8+v3e6tdWikHAWjYcme113H3A8Y2Dbo7PT0Xt2UgrOO+mxX4fncPvX lMss+S7CQ3LZ6qX6HH4O4JBFISbvFDkYKO/G5BjN4ah5fEWqEv5vGRjiKOzSLRVFAGxN O0IGA8Z8K4YklaoSv5CHtF6V/hkVW9CFzTvXveAdxJCg1wntbCFW7RCpflDK13y4bk+E SD5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=kNcNYgo7; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fieldses.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc18-20020a170907169200b007308f39b5afsi9397173ejc.407.2022.09.06.06.06.05; Tue, 06 Sep 2022 06:06:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=kNcNYgo7; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fieldses.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238052AbiIFNAN (ORCPT + 99 others); Tue, 6 Sep 2022 09:00:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239522AbiIFNAN (ORCPT ); Tue, 6 Sep 2022 09:00:13 -0400 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B0A712091 for ; Tue, 6 Sep 2022 06:00:12 -0700 (PDT) Received: by fieldses.org (Postfix, from userid 2815) id CD4A24298; Tue, 6 Sep 2022 09:00:11 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org CD4A24298 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1662469211; bh=IJOyuF6urIA6S6GGr4y8z0q8js5tsULVoh3/SfaEaSY=; h=Date:To:Cc:Subject:References:In-Reply-To:From:From; b=kNcNYgo7B+SXT9G7UVRk1GlHKzArqu5Vjktjh71Hh8dLTgJIjtVd66yfQDzW61AHV X81eS/BgDSKN7vROipE7CUoNfQH7BEntXM6/wqHhs3kFAB4gff+GmFwrzQl/lNAaok tKYDFLQaDbbpGdx9Fmk4u+UjD23dnxAHlrBLQjFg= Date: Tue, 6 Sep 2022 09:00:11 -0400 To: dai.ngo@oracle.com Cc: Chuck Lever III , Jeff Layton , Linux NFS Mailing List , steved@redhat.com Subject: Re: [PATCH v4 2/2] NFSD: add shrinker to reap courtesy clients on low memory condition Message-ID: <20220906130011.GB25323@fieldses.org> References: <2df6f1fe-c8eb-d5a1-0a11-2fd965555a33@oracle.com> <7041D47D-ECB3-497E-9174-96E9E36FFBDE@oracle.com> <3CD64E7F-8E81-4B37-AAF3-499B47B25D19@oracle.com> <44A716C4-3904-424D-A5D6-CE46FC9145F0@oracle.com> <2b9549f8-58ec-be8a-1b15-3a6d7751a04f@oracle.com> <5B4E5FAA-5D46-4E43-962D-64AFDC035C41@oracle.com> <1f395e2b-695f-836f-2038-6a672c651d53@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1f395e2b-695f-836f-2038-6a672c651d53@oracle.com> User-Agent: Mutt/1.5.21 (2010-09-15) From: bfields@fieldses.org (J. Bruce Fields) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Sat, Sep 03, 2022 at 10:59:17AM -0700, dai.ngo@oracle.com wrote: > On 9/3/22 10:29 AM, Chuck Lever III wrote: > >What I was suggesting was a longer term strategy for improving the > >laundromat. In order to scale well in the number of clients, it > >needs to schedule client expiry and deletion without serializing. > > > >(ie, the laundromat itself can identify a set of clients to clean, > >but then it should pass that list to other workers so it can run > >again as soon as it needs to -- and that also means it can use more > >than just one CPU at a time to do its work). > > I see. Currently on my lowly 1-CPU VM it takes about ~35 secs to > destroy 128 clients, each with only few states (generated by pynfs's > CID5 test). We can improve on this. Careful--it's not the CPU that's the issue, it's waiting for disk. If you're on a hard drive, for example, it's going to take at least one seek (probably at least 10ms) to expire a single client, so you're never going to destroy more than 100 per second. That's what you need to parallelize. See item 3 from https://lore.kernel.org/linux-nfs/20220523154026.GD24163@fieldses.org/ Also, looks like current nfs-utils is still doing 3 commits per expiry. Steve, for some reason I think "nfsdcld: use WAL journal for faster commits" never got applied: https://lore.kernel.org/linux-nfs/20220104222445.GF12040@fieldses.org/ --b.