Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp1138512pxb; Wed, 16 Feb 2022 11:53:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJwcMjPmtUtsJNLLXphA/IYkcuE3yaf6y4caRkzIki9VGhOBb3s2IAw6MKDbZj8Qub1jAi8B X-Received: by 2002:a17:906:3c1a:b0:6ce:c404:9e3 with SMTP id h26-20020a1709063c1a00b006cec40409e3mr3487616ejg.454.1645041237889; Wed, 16 Feb 2022 11:53:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645041237; cv=none; d=google.com; s=arc-20160816; b=jdO1RN5gB/nG3g/dBvj14zMKYNAs2m2PwLjMJmQ6JmYbo1fkK0W/WlZYABSZwXoT9I XbtlQmUL2s9SfJnjKddG8l2Zm3nnYmSuPcQUJ/G8dFHZQmn/fVVHKms0a/XMw+HCUlCU UTgAKw3uxu9nkQCMpJL31Qeme4qIb6D7aXONv8ojdLm5sUE3Yl2HSZUhImM7lRYrSfNg TwwtV0VOY7ypMlrhVSVKxdxCkWZQoD+6jZ0J9tQ9TmZNixxq5MU4IB78Z75byDbdBMAQ s5v8xulijkzTrDD8I8DFO+ciZ+5NpCKJUuZWxtcbxTw+iFZx8PVey0SwONiMwuNl2YP0 94lA== 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=+84qCiDFIAKwdzWF/m9U2KjRUazhunK359ZX+y8pQwU=; b=AeBn+fHqScy2VjW62AK8K2wb3Sc4cVtDrPwDJMFq2SeR6QmtbzvvAB8Fa1+tb+TNF3 +afPcjxPsQBqmpolAGamxL3HAu2cTzReyWM/udLdAgmwcHNzeMzlhE6Z2G81ZUpt7Ych TXoRVR2F4VatHVkVNa//jMh39lVr7wc0Yryv7Vg+tN2D0WoAvS/WQ3vuENP4njuzO9XN nzpuwb3Gpz4AZtH2ohVT970YZ8HSPa6+cdWfI3Ws4WwmURxFuRAz80wOhYHvWqcf4ynS /RdA1NdBh0wAN6jXTx8DGQXX5d/PgIOgzOiNnrl395kmLt3e9VPM2mHGFG9oiPSeGrnv YFDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=aJ6R0daA; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e7si2921059edz.397.2022.02.16.11.53.28; Wed, 16 Feb 2022 11:53:57 -0800 (PST) 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=aJ6R0daA; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230238AbiBPTWd (ORCPT + 99 others); Wed, 16 Feb 2022 14:22:33 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:49522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229995AbiBPTWa (ORCPT ); Wed, 16 Feb 2022 14:22:30 -0500 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E82CE24F1A for ; Wed, 16 Feb 2022 11:22:16 -0800 (PST) Received: by fieldses.org (Postfix, from userid 2815) id BD8CE6CD5; Wed, 16 Feb 2022 14:22:15 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org BD8CE6CD5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1645039335; bh=+84qCiDFIAKwdzWF/m9U2KjRUazhunK359ZX+y8pQwU=; h=Date:To:Cc:Subject:References:In-Reply-To:From:From; b=aJ6R0daAr3D/z0NfNtEmhxusRUKvaJLTMxfzVDI0Zz+KfMna3QW+oCs4Sp743WzT7 Fiux3QpstNxuFYNEimIg1DaASk2M4+b346R9DtIZ6UJoi+2/PvMiPxT8hOsRLcJTKl QX6X45TmvloOBRYKq9B+39sq9tUN9Jk3pgMEHRd0= Date: Wed, 16 Feb 2022 14:22:15 -0500 To: Patrick Goetz Cc: "linux-nfs@vger.kernel.org" Subject: Re: How are client requests load balanced across multiple nfsd processes? Message-ID: <20220216192215.GB29074@fieldses.org> References: <19e14932-ed88-60a1-844a-0e17deee269d@math.utexas.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19e14932-ed88-60a1-844a-0e17deee269d@math.utexas.edu> 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 Tue, Feb 15, 2022 at 04:13:25PM -0600, Patrick Goetz wrote: > When I set > > RPCNFSDCOUNT=16 > > what I thought this did was spin up an nfsd thread master with 15 > threads and the thread master would pass out client requests to the > threads, but looking at /proc/$PID/status -> TGID clearly indicates > these are all entirely separate processes. (I wasn't sure if ps > showed threads as separate processes; apparently it doesn't.) They're all kernel tasks, which makes the distinction between "thread" and "process" a little vague. > So the question is how do different client requests get farmed out > to different nfsd daemons for service? Who's actually listening on > port 2049? There's no user process that calls "listen"; knfsd's normal rpc handling is all in-kernel. Incoming rpc's may be handed to any of those 16 tasks for processing. A single task just runs a loop where it receives an rpc, handles it, and sends a response back. > This was all prompted by some vendor trying to sell me an EC > (Erasure Coding) n+m system who commented "NFS isn't multi-threaded, > NFS can only communicate with one server, for a shared/mounted > filesystem, so it will always be limited to the speed of that NFS > Server. POSIX/Multi-threaded means the filesystem is parallel and > can be reading/writing to multiple nodes at once in a storage > cluster/setup. The opposite of NFS." That explanation is a little muddled. NFS clients and servers both typically have lots of parallelism. Whether it's sufficient for your purposes depends on exactly what you need. But, yes, they're mostly correct to say that, in the absence of pNFS, "NFS can only communicate with one server, for a shared/mounted filesystem, so it will always be limited to the speed of that NFS Server". > I think pNFS addresses this, but then how does one implement pNFS? So, right, pNFS can let you perform IO to multiple servers simultaneously, if that's what you need. The Linux NFS client has support for pNFS, but the kernel server doesn't, so you'd need to look elsewhere for a pNFS server. Whether any of this is useful to you depends on exactly what problem you're trying to solve. --b.