Received: by 2002:ac0:cd04:0:0:0:0:0 with SMTP id w4csp270392imn; Fri, 1 Jul 2022 14:54:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sFydAHiEDLz1gL6RP4ou+8b4HzSib2jNonhV0aQ6iL2pzXTn2ggyBQbxHtx6OHQ4HUhSZE X-Received: by 2002:a17:902:aa41:b0:168:8d12:540b with SMTP id c1-20020a170902aa4100b001688d12540bmr23549193plr.35.1656712489931; Fri, 01 Jul 2022 14:54:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656712489; cv=none; d=google.com; s=arc-20160816; b=PzakkQsCzIf3ibx/eR4x0zlvYUzMFOt1xnq0aOFeUx0n6sc8Ql6toZ+5lWyoRqDv7D oyXC8NJg+HknHZ30Wk5nW/y+3ZQg89fziyyr1+mUu0jHSZcKQrENDMTYPD6MKDWPZwvO 7lEYZoH9KkYYyjDKmW/jPP8ZbfzCw9g3Pfr9RhwBK8Qn0vgA0k4KJyqinTa1iafOsOiJ Lcx539e3ZWXE0Im/59TInH9Y6WPco7kCDN9JGQYJbRmJWC/kPLIkHnhORKZMXuu/Icp/ Rlg70gpZ/7zoZJ4EHaB6CNYQdE6E4zEndzzVL0kECA9N5jKkEQ0apd1lS9kah5M8v9Jd +2Lw== 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=/96lfPgxyeYWItPL0GqeIfIZW1m1l6mW0bCfbfK6/G4=; b=M1OBVIIPpydjgq2CnL7LO8Bh640nwcHIba47aRRF9ZOXY/eSJi+eFHwlTpo4x46syM Zr2yqdYKxDDgr3++Dyuq4SslFqxgRCv6ZXy7Iv6i26qdzELnzRVTNCcjBF2/Ubn4O1G2 bs7LS+kMC113f5sXN5A058ph9CGwmMeWLGxxDMmWczvfZ1qQEws8CNhei3ueJ2kzCzOR W2iIo603jHHoUQAuD2QEh6uoRM6NWbfmG+6/g+GItj4PSoZrHUwr94qN3hvJWGEA+90A usHWn2dJhuqLhA7a0y+Y3LgmpI1J3BQCjJelY7I59tpjrpptaOHSGBz0W3PMtqg1ln4m lXIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dneg.com header.s=google header.b=tM6FkB9T; 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=dneg.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h71-20020a63834a000000b0040dc2f8f0e6si25409698pge.664.2022.07.01.14.54.23; Fri, 01 Jul 2022 14:54:49 -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=@dneg.com header.s=google header.b=tM6FkB9T; 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=dneg.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232056AbiGAVwh (ORCPT + 99 others); Fri, 1 Jul 2022 17:52:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232101AbiGAVwa (ORCPT ); Fri, 1 Jul 2022 17:52:30 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75D28599D9 for ; Fri, 1 Jul 2022 14:52:28 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id dn9so978080ejc.7 for ; Fri, 01 Jul 2022 14:52:28 -0700 (PDT) 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=/96lfPgxyeYWItPL0GqeIfIZW1m1l6mW0bCfbfK6/G4=; b=tM6FkB9TQSdtXLsbo9GSt0El+C6GsVSa0qgIzryHlb4YMh8EUqGDNiJffB/uKMX7ld 8ykgWJWHh3bpyfJiPApyauP7W9hZCAMZYman3NVxtOxw/CJU2/tlRwtg62Zs349a60Br PD/5TS2+BEIchA750jKxRh5H4XnBUsBM022+BFmdPjfYOEiKzI84XxAoUFP4rWgkyfJ8 X6F9KoHTR0oziYxm/y8i710qApWqXOhvb+WzidVXBfcr29SwEYB3c4nOw1EWu/GtgzDu 5AyNEU03AtVPWemwpQY7Wyrm1xf5siZsxYid34qO7dQvSCtdJKZsBj5dfmZzOCud7Xt4 79Jg== 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=/96lfPgxyeYWItPL0GqeIfIZW1m1l6mW0bCfbfK6/G4=; b=WsFVUBK2fgBzodQgTvazHtHum+7+mgS8OZcFLX/kxAlKtNm2pvp1/GHXGwLzGCtG36 CK/6Ec1awY0C4esHSan5kJzwPTt8amPBERZzRTA6rQh90vxxH7HdiAGiHuMUCG6+sTlW flvxz7Mm4rE601oJ3L1BlbggBA+ww3Vqf1dwj0puoKLd5yvByBeF8fQPr+oCBpeJEPvj U+vy5mh/hpYDk5k8UCZ/+yiqWA+wVIuc9WBQnlmtZmURIo0axy4H8ydod8TBiMuy9rh/ l+YEYQ1s7rpjkpRP1M++pbOH0ZghQfte/sle9vrguGKDLQSmcFYRZPPCHZ6uKRuSngnP 9QPg== X-Gm-Message-State: AJIora+2q7GW/KsTI3CfcXt5pK0xqSceVLnPVU/yyrkKhJfeO5Zd7eUD nMbZ2i4WJQHB51x7CRCzwhQRwsbBwkOEgTM8bSBJicltHRp7v2za X-Received: by 2002:a17:906:730f:b0:726:ca34:e605 with SMTP id di15-20020a170906730f00b00726ca34e605mr16713083ejc.347.1656712347023; Fri, 01 Jul 2022 14:52:27 -0700 (PDT) MIME-Version: 1.0 References: <737440541.1127428.1656698294694.JavaMail.zimbra@desy.de> <05f3b4e144ec5d12ab87d861222128181e805321.camel@hammerspace.com> In-Reply-To: <05f3b4e144ec5d12ab87d861222128181e805321.camel@hammerspace.com> From: Daire Byrne Date: Fri, 1 Jul 2022 22:51:51 +0100 Message-ID: Subject: Re: Per user rate limiter To: Trond Myklebust Cc: "tigran.mkrtchyan@desy.de" , "linux-nfs@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,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 Fri, 1 Jul 2022 at 19:23, Trond Myklebust wrote: > 2) Define QoS policies for the connections using the kernel Traffic If it helps, we use HTB qdisc/classes on our Linux NFS servers to optionally limit the total egress and ingress (ifb) bandwidth to/from our renderfarm. User workstations are exempt from these limits so always get full speed. We can do this fairly easily because our network is well defined and split into subnet ranges so filtering by these allows us to differentiate between host classes (farm/workstations etc). Strictly speaking, it's a bit more complicated in that we only apply limits and change them dynamically based on the "load" of the server and how well it is keeping up with demand. This is just a bash script running in a loop looking at the state, scaling the HTB limits and applying filters. Our goal is to always ensure that taff have a good experience on their interactive desktops and we'll happily slow batch farm jobs to keep it that way. It is basically a low-pass filter that limits server load spikes. To do something similar by user or process, you could run your jobs in a cgroup and have it mark the packets that the server could then use to filter. But I think this only works for the client writes to the server as you have no way to mark and act on the egress packets out of the server? Daire