Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2117385pxb; Wed, 9 Feb 2022 11:11:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJx3L9n9jFTVB6uZTIyvaNwfodAND+hS5SUSx+vWpREAkI6wlii0sGN9IOhikNPzA/e7XUDT X-Received: by 2002:a05:6a00:1682:: with SMTP id k2mr3849661pfc.69.1644433904076; Wed, 09 Feb 2022 11:11:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1644433904; cv=pass; d=google.com; s=arc-20160816; b=nK4YM/3uic4x/bsOoD+JFvJ7yzTqvtBkJwzu2hZG5WFWLLXZI+aJ92p7plg8JimIcK G5ia6RH/qCTk7syFOIJGQtysh+RxBW+s7d5Skg0O1xpHVYwUk62TofKvRrkeIHPKLvuv A4hq8kwUhP49yXUYsermDJBwQoORYB69APbxxxvjXFZY4sckDCyBApY7+XJqwPUpmRuA KkmiBpzI9E9o4MSX4NZB3Z/oacwrPqMz48FK7ThL4hvmCY7pmuI85MUACqV90dtCk4iL 9/FLgLegmcS7xUZzHPQgoB/LtG6Q6UdJdjmMP3akV1CPtK7oSyHnbpZeEPubBwZs8ojS 45uQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:to:content-language:subject:user-agent :date:message-id; bh=6+zh1QZ4aj+gNqhcwq7J/ErbkV82vv5tKQ7Or2qM5dw=; b=OwG8pCVrIHsom7PJ+R4qp52Qt5l3Hf3EGsyD0ZodSdeXQaz5qdtyhelv1Udhda4qrB DcTawkW/m6CZr+E2FiSeD2NJvKspL5P+rXKt1EaUgYXUwU8nK8EOJhwEf5hPjcQOOsSj l8p3t5LqV/ukw5pdpqwyAFB7enrqEetq4L45zRCWgVSG1l07V74NJZapAnp5n2zroOIl 7GjEI/fe9b7wmEXiYVDqvOQVdOpNCL67eTkRZxG35MZFZKzQ2Z+/2wzjOT7mjn9bQ0vM gx6hxcMmJelK6BWujm65DkFdIudhBy95nN/XgyzDhWXugC7Ej1piSgAw3ZUYMZBpCCw9 o2GQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id c14si6789394pfl.136.2022.02.09.11.11.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 11:11:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6CD83C014C78; Wed, 9 Feb 2022 11:11:07 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234972AbiBIRiK (ORCPT + 99 others); Wed, 9 Feb 2022 12:38:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230289AbiBIRiJ (ORCPT ); Wed, 9 Feb 2022 12:38:09 -0500 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2051.outbound.protection.outlook.com [40.107.223.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FDC7C0613C9 for ; Wed, 9 Feb 2022 09:38:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kh7P5Rwfz4c23BTH8l9RXyvIOQ9D7txBtBLtluVL/uBH4RpMQv8am/p7hqKp1iKuGcAZiiXNYVVA1lcSKvYg1wLvl3m7zFXb6SQHnf7Nid5nVfdzNDqKEFb70vAsrNTLSpbLwLY3sRxPhN5oG3Lm+zUt5CV8rpVMzitgRyrl1lJ+82pGj5Ut+uH+Ytq7j6Gyq2VzQMeBbGhTFxAh1ZbixfzaPAahd6UGNmpW1bgcIFMY7sLOvlTf/LNGmINwZCclY3yfxQFz2qOwf/vqyk/Bfw6G69PIHVGaJOiVNKOjSEYAc5x5CDkDDJ9jci+B5y55+x86jORVb5H29ilftNGyFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6+zh1QZ4aj+gNqhcwq7J/ErbkV82vv5tKQ7Or2qM5dw=; b=JWSSlzPF4WT+4pFbwyJppLbT5cTivesFMIyg3RoNu1/kYsZj34LfZyOIDaIgFnMvTei6I420dhK92acXHDAmh2tzRHnXUIIqeJATjzFAO0FrqgSbRdjgJnuaspPHrj7swr3iqkdnL9iXOZEW/i8eDdRerOIy4YPgZqjIqqs/zhP7DLgpaOxFXdForNC58rxKVf8jxksBzfb/cd5ccpSUXoirVtg48qGrbYYhkt3aYX17E7LU5IMfjPSE0lQB/03DNJq7LdmjP6h0VjHlcZWoVQ5KRrdvW+5MA360GCmAwkOFwOkolexTxbGFCOpWr6oUnHkaeSuMgGt+TnjV6KKnDg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=talpey.com; Received: from SN6PR01MB4445.prod.exchangelabs.com (2603:10b6:805:e2::33) by BYAPR01MB5095.prod.exchangelabs.com (2603:10b6:a03:1e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.18; Wed, 9 Feb 2022 17:38:10 +0000 Received: from SN6PR01MB4445.prod.exchangelabs.com ([fe80::f94e:e0e0:4d0f:ef81]) by SN6PR01MB4445.prod.exchangelabs.com ([fe80::f94e:e0e0:4d0f:ef81%4]) with mapi id 15.20.4951.019; Wed, 9 Feb 2022 17:38:10 +0000 Message-ID: <6b528d29-1a9c-d16e-f649-5d994d6222b8@talpey.com> Date: Wed, 9 Feb 2022 12:38:08 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: NFSv4 versus NFSv3 parallel client op/s Content-Language: en-US To: Daire Byrne , linux-nfs References: From: Tom Talpey In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BL0PR02CA0144.namprd02.prod.outlook.com (2603:10b6:208:35::49) To SN6PR01MB4445.prod.exchangelabs.com (2603:10b6:805:e2::33) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5d0b684f-1f82-4139-73c3-08d9ebf2f074 X-MS-TrafficTypeDiagnostic: BYAPR01MB5095:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YAwq7eJiIMOUsgoudf/2VPyeh+1yOhZ7E0TZmy8qNr8fyvgmSMphSJk+4KTL5UcuX6ZcceZRncfNnLoAQCsSudho+qfUDxTtnCRxugn7Oc8/RwMOm/gAzxJadb+vENl0TgHlQP4KCu21BG2n/9vtFls0xv6+0+kyd9hV1Q0QDkanZh+HSFOroA4ipbRQKmgteab7JExPpo5Q8GPzzE2aYwq3tdeZrUW/+1PDls+akKCjIycJel/nQ6tYCZpneVche1nWhiu4icjpEQuUzK4pFKy1fsWom0sTAFs5Pktd3GFtO8+5VWaXS40ALQwDim+QaNbuA6PXA2mFS8fN7oiqkr5SgONu/L3eZZUhlBjnrP3iBsULTk3o36BMMLx5DbF+krl0OKoHWnomhDVQlkUB3qnsa1ew91bE6pMvo+XYmcqsX6MFnHLx87ju6XFgLUfoO9j7rNWKWObw/or3OtvmOSy1Achp5MlikNnhHknO6fTo5D8/+fx441BDvWipmHkT9CVPb7i8hlYRjSUmQH9/oDqYyoSzPcgsifv+2DXTEA8cRBhel/jWYLpP1SPEDvRIztCJf3vi96NL3pVx/8vVWEQ4wKS5xhs/Dib5mJkhUvcRvMBoJUlNDJvOyM+NWpZcY94tAjVvMW4gMkQJNfOM/t2G/nDtcH0plFWrxFJYfGHu/DPfn56tjDOJWMaG/N1vbOqjnE95cptghcwA+XOYehpiOQnr48cGcvCjuO3BtPTqcX/A8kx88MKRZAI5RxfH X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR01MB4445.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230001)(346002)(39830400003)(366004)(136003)(376002)(396003)(83380400001)(110136005)(2616005)(5660300002)(86362001)(36756003)(31686004)(186003)(6486002)(316002)(26005)(38350700002)(38100700002)(52116002)(31696002)(53546011)(66476007)(6506007)(508600001)(8936002)(6512007)(2906002)(66946007)(8676002)(66556008)(486264002)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Zjg4N0h1Mis1dW51TWlIRFgzTnN2VUwzUkFqMitJa2hRS3ovL3g2Ri9NM2Zr?= =?utf-8?B?bU4zYlM3U0MvUkZCTWpuNGxnYzVVNkVsNlhSQUpwKzFYMnFWWTd2RkU2RFpC?= =?utf-8?B?Z0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24xb1dYYXZO?= =?utf-8?B?QU1QRm5rbFZnaStHME5ZSzRTNk91a2ZkSC9BOEFUWWhIeVZnMHc1NHJmZDR3?= =?utf-8?B?Q3hHZy9KSTFGdzlkREpGNDVqc2JoMk9sbnRncC9jcHQ2WUMrYThtb0lVc0p4?= =?utf-8?B?NXl1bnZqbXhXSS9XemJDRUVLZHZ5N0ZZNVp4L3lXMzZIeVhQdWpkK1FqVVpp?= =?utf-8?Q?SzYQ=3D?= X-OriginatorOrg: talpey.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5d0b684f-1f82-4139-73c3-08d9ebf2f074 X-MS-Exchange-CrossTenant-AuthSource: SN6PR01MB4445.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2022 17:38:10.0756 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 2b2dcae7-2555-4add-bc80-48756da031d5 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: uIC+sTHrBJfu6r41Nkp2EXDukyahQ0MUT9yR41bvTl2NkCUCspLpc8wRa83iYTiq X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR01MB5095 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, 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 2/7/2022 1:57 PM, Daire Byrne wrote: > Hi, > > As part of my ongoing investigations into high latency WAN NFS > performance with only a single client (for the purposes of then > re-exporting), I have been looking at the metadata performance > differences between NFSv3 and NFSv4.2. > > High latency seems to be a particularly good way of highlighting the > parallel/concurrency performance limitations with a single NFS client. > So I took a client 200ms away from the server and ran things like > open() and stat() calls to many files & directories using simultaneous > threads (200+) to see how many requests and operations we could keep > in flight simultaneously. > > The executive summary is that NFSv4 is around 10x worse than NFSv3 and > an NFSv4 client clearly flatlines at around 180 ops/s with 200ms. By > comparison, an NFSv3 client can do around 1,500 ops/s (access+lookup) > with the same test. > > On paper, NFSv4 is more compelling over the WAN as it should reduce > round trips with things like compound operations and delegations, but > that's only good if it can do lots of them simultaneously too. > > Comparing the slot table/xport stats between the two protocols while > running the benchmark highlights the difference: > > NFSv3 > opts: rw,vers=3,rsize=1048576,wsize=1048576,namlen=255,acregmin=3600,acregmax=3600,acdirmin=3600,acdirmax=3600,hard,nocto,noresvport,proto=tcp,nconnect=4,timeo=600,retrans=10,sec=sys,mountaddr=10.25.22.17,mountvers=3,mountport=20048,mountproto=udp,fsc,local_lock=none > xprt: tcp 0 1 2 0 0 85480 85380 0 6549783 0 102 166291 6296122 > xprt: tcp 0 1 2 0 0 85827 85727 0 6575842 0 102 149914 6322130 > xprt: tcp 0 1 2 0 0 85674 85574 0 6577487 0 102 131288 6320278 > xprt: tcp 0 1 2 0 0 84943 84843 0 6505613 0 102 182313 6251396 > > NFSv4.2 > opts: rw,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,acregmin=3600,acregmax=3600,acdirmin=3600,acdirmax=3600,hard,nocto,noresvport,proto=tcp,nconnect=4,timeo=600,retrans=10,sec=sys,clientaddr=10.25.112.8,fsc,local_lock=none > xprt: tcp 0 0 2 0 0 301 301 0 1439 0 9 80 1058 > xprt: tcp 0 0 2 0 0 294 294 0 1452 0 10 79 1085 > xprt: tcp 0 0 2 0 0 292 292 0 1443 0 10 102 1055 > xprt: tcp 0 0 2 0 0 287 286 0 1407 0 9 64 1067 > > So either we aren't putting things into the slot table quickly enough > for it to scale up, or it just isn't scaling for some other reason. > > The max slots of 101 for NFSv3 and 10 for NFSv4.2 probably accounts > for the aggregate difference of 10x I see in benchmarking? > > I tried increasing the /sys/module/nfs/parameters/max_session_slots > from 64 to 128 on the client (modprobe.conf & reboot) but it didn't > seem to make much difference. Maybe it's a server side limit then and > the lowest is being used: > > fs/nfsd/stat.h: > #define NFSD_SLOT_CACHE_SIZE 2048 > /* Maximum number of NFSD_SLOT_CACHE_SIZE slots per session */ > #define NFSD_CACHE_SIZE_SLOTS_PER_SESSION 32 > > I'm sure there are probably good reasons for these values (like > stopping a client from hogging the queue) but is this the reason I see > such a big difference in the performance of concurrency for a single > client over high latencies? Daire, I'm interested in your results if you increase the server slot limits. Remember that the "slot" is an NFSv4.1+ protocol element. In NFSv3 and v4.0, there is no protocol-based flow control, so the max outstanding RPC counts are effectively the smaller of the client's and server's RPC task and/or thread limits, and of course the wire itself. With a 200msec RTT and a single-threaded workload, you'll get 5 ops/sec, times 32 slots that's pretty much the 180 you see. So I'd expect it to rise linearly as you scale both ends' slot numbers. > Why do I feel like in writing this all down, I have probably answered > my own question... :) Tom.