Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp444376rdg; Tue, 10 Oct 2023 15:28:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEatF9RISqVthZfxgxIUkRX5QK1RducQXBcssZ90MJ8HW6SK8nWIec7qrXNqnQAA1ONRn2S X-Received: by 2002:a17:90a:2cc4:b0:271:7cd6:165d with SMTP id n62-20020a17090a2cc400b002717cd6165dmr16711536pjd.26.1696976896064; Tue, 10 Oct 2023 15:28:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696976896; cv=none; d=google.com; s=arc-20160816; b=xIUmE6imF+k7jxuDfKu4smGcLwO6NXwj3MJHThb3BaTMSYvhcd1Qqrb7cDl9A2jrTd rfcZBeNCb1OrFo7Serp+U0wLk2Wss7Ai+xNIraNyw0AnAkBiAiO1GOwWEn8KhSm2q6/2 /IlbLN4CgEaBUPSZGwQs3+a9gRDYE+FLomsf6slDK2O8P59HJxkzL/AKQ7fR8jnj44xi YLUGiMbog1PCx0wrYKwQdD4De+YCieG88qilJ9BOdG4sxybcPmqxBdF8olSwyZRTnFFR 0BKOXbEUbMff9ohqc7W6o37dN1oletHlS7RHRpwkBDX/ze3AXFB4bdAkSRinAytLNgtp egDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=CkLtTpyq6hhRKA1Cd8NmRte6SMNGKfwrDP5J91+SqxM=; fh=30x2LODdtnAl7mcl1AxcW/a/zb4dl7P6JDbQ38K3OmY=; b=btWZtx97mVKReOyHggv4VLSO1sBDeOJs6Hn1JWCgZTRfIcFcWZd/ZhiaWxVuHrJLVM aA0qgxaDL2D2sNVndgN46fjxrP8q4aZYZe1m/8pSVBu2zGcla++RfTn9gcYx8nZqghDp dDVnbIgLbCcX9TMCv9oJVpVkfRzxbAWzVmIgXBLAzH4nU9hUzcRuzznfAh38n8YFrSNj BJEq9JS6x/TRWd5Xq968N/HO343aJpOlysNU77v0dPL3nPMj8/rsr0F8NAMTa+49XXAm BqBesN3M1P3efQhxvvNIBpqadeI0FhVKptunrKo/j3VDYGfr9vxIqqT/9bMEaSRNTaw5 Z/tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=sOLzgyav; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id ha22-20020a17090af3d600b0027b123fbe9dsi12694247pjb.156.2023.10.10.15.28.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 15:28:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=sOLzgyav; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id EF9BC81DDD0F; Tue, 10 Oct 2023 15:28:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234773AbjJJW2G (ORCPT + 99 others); Tue, 10 Oct 2023 18:28:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234573AbjJJW1x (ORCPT ); Tue, 10 Oct 2023 18:27:53 -0400 Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FE0CAC for ; Tue, 10 Oct 2023 15:27:42 -0700 (PDT) Received: by mail-qk1-x72b.google.com with SMTP id af79cd13be357-7742da399a2so409717385a.0 for ; Tue, 10 Oct 2023 15:27:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696976861; x=1697581661; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=CkLtTpyq6hhRKA1Cd8NmRte6SMNGKfwrDP5J91+SqxM=; b=sOLzgyavxmNPuIxJT66RHVRJKPM4L7Y9mosU4527HC4w8KJRNktEAYHaiOvOQgSk1W WgDXRkFGo2xLRGU3Eek+jCG4D0655oAzIpaEmUvKLlz9gC4+1srsdf640xGp/hMxnMJB VI6e4mzHz8VGpe7Gibg3n7Nox0eAy4azTsx1/hd74JY/Sh2gbeQnrqmWf0Ug4VMud0gp gEZoVEoqLrmoJQLPyNKJcNMdeMj4uAIYxWDoVlT9WrATIxVQb0axKhX8KXqvTlezx/0T CxZSH2FaCGcV1lUwERDBgx6SFAqdgeW6kzeRn+UnLXDocf6UZXePvumzIzchPf/o7XlC de5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696976861; x=1697581661; h=content-transfer-encoding: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=CkLtTpyq6hhRKA1Cd8NmRte6SMNGKfwrDP5J91+SqxM=; b=Lrvur1YoBYHh5rJZv9+xU2jezwYhXgjWPTafEKqjuYzeo+AcwAA5t2Axrm2H/N3AY1 qYlDEaXLIQma1bQPED2mEnbLEQS4Bp/qsl/u745URYyHkAXj03UXwsW6cZmwTAnUkf6h XMjZzttTLfSJoI2N1N5K20uBTkKDGo1e+lX9cWJmEn93xYY3mlFzdHVjPvdjXl/2bBT/ bjjMoiK2PgXzj8swKIOb1Qb9RUBG3Z+nU2s+M08L8D/ryeZlwcg9aF4RkWzAj73m1Gig wMW33d/s0IdrF/1ZY0WRESm4ffSNNDwecB6CczsbLUkQOFxCMg8ppPA/+VQQ/t0HSXZp RK8A== X-Gm-Message-State: AOJu0YwWRpGq2gPPcTgxZTJk3FR7MPl1JAt1wk3cuGxYp9eNuaYx7kTe RU6nyxG3ioMrnYBZ1YlVW2VOU/wh6/OwToNAmZOQSg== X-Received: by 2002:a0c:8cca:0:b0:656:3317:b926 with SMTP id q10-20020a0c8cca000000b006563317b926mr16022671qvb.17.1696976861005; Tue, 10 Oct 2023 15:27:41 -0700 (PDT) MIME-Version: 1.0 References: <1696965810-8315-1-git-send-email-haiyangz@microsoft.com> <20231010151404.3f7faa87@hermes.local> In-Reply-To: <20231010151404.3f7faa87@hermes.local> From: Yuchung Cheng Date: Tue, 10 Oct 2023 15:27:05 -0700 Message-ID: Subject: Re: [PATCH net-next,v2] tcp: Set pingpong threshold via sysctl To: Stephen Hemminger Cc: Haiyang Zhang , linux-hyperv@vger.kernel.org, netdev@vger.kernel.org, kys@microsoft.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, corbet@lwn.net, dsahern@kernel.org, ncardwell@google.com, kuniyu@amazon.com, morleyd@google.com, mfreemon@cloudflare.com, mubashirq@google.com, linux-doc@vger.kernel.org, weiwan@google.com, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.8 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 10 Oct 2023 15:28:14 -0700 (PDT) On Tue, Oct 10, 2023 at 3:14=E2=80=AFPM Stephen Hemminger wrote: > > On Tue, 10 Oct 2023 12:23:30 -0700 > Haiyang Zhang wrote: > > > TCP pingpong threshold is 1 by default. But some applications, like SQL= DB > > may prefer a higher pingpong threshold to activate delayed acks in quic= k > > ack mode for better performance. > > > > The pingpong threshold and related code were changed to 3 in the year > > 2019 in: > > commit 4a41f453bedf ("tcp: change pingpong threshold to 3") > > And reverted to 1 in the year 2022 in: > > commit 4d8f24eeedc5 ("Revert "tcp: change pingpong threshold to 3"") > > > > There is no single value that fits all applications. > > Add net.ipv4.tcp_pingpong_thresh sysctl tunable, so it can be tuned for > > optimal performance based on the application needs. > > > > Signed-off-by: Haiyang Zhang > > If this an application specific optimization, it should be in a socket op= tion > rather than system wide via sysctl. Initially I had a similar comment but later decided a sysctl could still be useful if 1) the entire host (e.g. virtual machine) is dedicated to that application 2) that application is difficult to change