Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3260441rwl; Thu, 13 Apr 2023 19:04:59 -0700 (PDT) X-Google-Smtp-Source: AKy350YNX5FE0SMuNXOzi4G+YDbGKP1IPdwPzr6xVi6gcEZdepLwb/m6OZPcUeIaSyKv+RHxMEeE X-Received: by 2002:a54:4814:0:b0:387:8e3a:cbd7 with SMTP id j20-20020a544814000000b003878e3acbd7mr1877183oij.51.1681437899145; Thu, 13 Apr 2023 19:04:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681437899; cv=none; d=google.com; s=arc-20160816; b=piSyHmtT34lHTa/J4qEdITwl5b3fkstKOxVuO4mmUblMIj14T4X1/VV/CWNtJjmhTm 9EtTLGwCXdeY3ymXAgkdoGf4OMgsXNZ/Q2ht60O6RI6aXat9bEhBz9crj1tDwLzXyVEs qfwi8My22ijJny/gT3TxW8KS6tKLk8Mgos+4fDErjui1h14h9IWvcBAsj6hBQUsAFUFQ lWmOGTbD0UEZdjIGSZwptLgCqt5sOdWzRtiqGc/cF0L8Nt01S1UEqSY6j43pxBzyI/MM 7emYfbAZ8NstBBacMBftCPZqWMrSoGHyaK6WShXHG/0XEjy6wCJx2pBjlvCNICYcwHLi Bxdw== 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=Dl2518gfS/Q1UTQTLUFTF13BLaNUhIq99/jZxFoVTE8=; b=ltOMpSGXTdPYJw/6X2qRFDwA4NkKOyOp62oUETjVDv0T0/CMoBvmyTGQTMFXY1n+6W T7UYJ7RDRZnHiEUUpdp0XuYzxNwKppSYUrXVQgbyJXiuws7/B+fxKzGGYW0ps1b+vm0n UmQVW6cIwHHQAiw+B2+vdEjeyHY2TL8zuUhSgnCtcP/ZZZoWzqBdf1lcdYBrFLGsKjyX NE/DYUEoUImuBEQfMq5u71Jls60TvRWSdX0VDKYUwgEqYgsIdx7edAw3ZAiHPJb7qhwH mxaJT5FORbGGkz6M1gRj+z0rcY9uI5L1SFxNzKGkijCitRgUFtvp6Xq2LXVwapuYPoqB jJUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=dbFOmnvX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eu11-20020a056808288b00b003894b354327si3150986oib.189.2023.04.13.19.04.23; Thu, 13 Apr 2023 19:04:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@gmail.com header.s=20221208 header.b=dbFOmnvX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229735AbjDNB6s (ORCPT + 99 others); Thu, 13 Apr 2023 21:58:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229593AbjDNB6q (ORCPT ); Thu, 13 Apr 2023 21:58:46 -0400 Received: from mail-vs1-xe33.google.com (mail-vs1-xe33.google.com [IPv6:2607:f8b0:4864:20::e33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96E6E3C15; Thu, 13 Apr 2023 18:58:44 -0700 (PDT) Received: by mail-vs1-xe33.google.com with SMTP id bs12so4110372vsb.1; Thu, 13 Apr 2023 18:58:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681437523; x=1684029523; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Dl2518gfS/Q1UTQTLUFTF13BLaNUhIq99/jZxFoVTE8=; b=dbFOmnvXWendtqHNWAnIIVQIAq5jJpuLDcEXgMFqI9KaQWq7P5E/IYMfFyG4lMrryj GWiDAIG7yiXx2GbkQLiJcfm4WP7f+TG/jGVIdYV4/kv7atqDhOZwQiQEEhLBFxEJyNNJ Uf0nPRy0nNqI7zzcmYYtMATxZgrJhhcrCAWm0USCkRQvkzupQVv5xNqjv00vGBGzSE2Q zU2QSSe4VhBo9fed9Z8lkZpM4K/6vsxBRt2jyGtFITzTK1Z3nvQ0gj/IY2wt7L4ugiog xaGZQ+lkOAvAYeCxylJ7eET8v7HZVcFKyXIbKBsD9gkpBaDNBRcLaAtdYGlp12okckka JRkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681437523; x=1684029523; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Dl2518gfS/Q1UTQTLUFTF13BLaNUhIq99/jZxFoVTE8=; b=M9/Aqie5qRcpA8PFnzrnOe7NxNCodM+qwdu8qK5gYyVq2Hq/FJwjc6Ps5w7uh5cLbZ Y/OFx1e2bkuRIeLD05/V8SZNakFx5yLWy2Mt6pfyau1mjSwfiaHz3zIk/yMQtxO9xRNO Rfxk9bQXg9HkAh124kW7NMjqdBmjRArnBDowF4gqBbj9CKBrgiWxTW/jm1Nwkqgaei3l 60P8TnSHFVXg6Qz0Zwf+JxizaNGeTdQInM/VR/Y+ykmKL/cSD2KE9JutOeg39Lf3YcBV KoD3UOTD38CXS1scCYJ+DU47J6e+w1/9bHImYGqHUaHLOTZKNJi1BT9ryXuaest/9Qtk xMtA== X-Gm-Message-State: AAQBX9dWqLf9nlajDB5Of7HzDSKu5zd74PnkwptHgaNlKiIHruI9m6qP 4jAiEPt7fnDED6wBKZ0sTaihH5UcRpA4PJDIV0M= X-Received: by 2002:a67:d496:0:b0:42e:3c2e:10bd with SMTP id g22-20020a67d496000000b0042e3c2e10bdmr590487vsj.1.1681437523577; Thu, 13 Apr 2023 18:58:43 -0700 (PDT) MIME-Version: 1.0 References: <20230412-increase_ipvs_conn_tab_bits-v1-1-60a4f9f4c8f2@gmail.com> In-Reply-To: From: Abhijeet Rastogi Date: Thu, 13 Apr 2023 18:58:06 -0700 Message-ID: Subject: Re: [PATCH] ipvs: change ip_vs_conn_tab_bits range to [8,31] To: Julian Anastasov Cc: Simon Horman , Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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-kernel@vger.kernel.org Hi Simon, Andrea and Julian, I really appreciate you taking the time to respond to my patch. Some follow up questions that I'll appreciate a response for. @Simon Horman >In any case, I think this patch is an improvement on the current situation. +1 to this. I wanted to add that, we're not changing the defaults here, the default still stays at 2^12. If a kernel user changes the default, they probably already know what the limitations are, so I personally don't think it is a big concern. @Andrea Claudi >for the record, RHEL ships with CONFIG_IP_VS_TAB_BITS set to 12 as default. Sorry, I should have been clearer. RHEL ships with the same default, yes, but it doesn't have the range check, at least, on the version I'm using right now (3.10.0-1160.62.1.el7.x86_64). On this version, I'm able to load with bit size 30, 31 gives me error regarding allocating memory (64GB host) and anything beyond 31 is mysteriously switched to a lower number. The following dmesg on my host confirms that the bitsize 30 worked, which is not possible without a patch on the current kernel version. "[Fri Apr 14 01:14:51 2023] IPVS: Connection hash table configured (size=1073741 824, memory=16777216Kbytes)" @Julian Anastasov, >This is not a limit of number of connections. I prefer not to allow value above 24 without adding checks for the available memory, Interesting that you brought up that number 24, that is exactly what we use in production today. One IPVS node is able to handle spikes of 10M active connections without issues. This patch idea originated as my company is migrating from the ancient RHEL version to a somewhat newer CentOS (5.* kernel) and noticed that we were unable to load the ip_vs kernel module with anything greater than 20 bits. Another motivation for kernel upgrade is utilizing maglev to reduce table size but that's out of context in this discussion. My request is, can we increase the range from 20 to something larger? If 31 seems a bit excessive, maybe, we can settle for something like [8,30] or even lower. With conn_tab_bits=30, it allocates 16GB at initialization time, it is not entirely absurd by today's standards. I can revise my patch to a lower range as you guys see fit. -- Cheers, Abhijeet (https://abhi.host)