lkml.org 
[lkml]   [2023]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH net-next,v2] tcp: Set pingpong threshold via sysctl
Date


> -----Original Message-----
> From: Neal Cardwell <ncardwell@google.com>
> Sent: Tuesday, October 10, 2023 4:07 PM
> To: Haiyang Zhang <haiyangz@microsoft.com>
> Cc: linux-hyperv@vger.kernel.org; netdev@vger.kernel.org; KY Srinivasan
> <kys@microsoft.com>; davem@davemloft.net; edumazet@google.com;
> kuba@kernel.org; pabeni@redhat.com; corbet@lwn.net;
> dsahern@kernel.org; ycheng@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
> Subject: Re: [PATCH net-next,v2] tcp: Set pingpong threshold via sysctl
>
> [You don't often get email from ncardwell@google.com. Learn why this is
> important at https://aka.ms/LearnAboutSenderIdentification ]
>
> On Tue, Oct 10, 2023 at 3:24 PM Haiyang Zhang <haiyangz@microsoft.com>
> 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 quick
> > 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 <haiyangz@microsoft.com>
> > ---
> > v2: Make it per-namesapce setting, and other updates suggested by Neal
> Cardwell,
> > and Kuniyuki Iwashima.
> >
> > ---
> > Documentation/networking/ip-sysctl.rst | 8 ++++++++
> > include/net/inet_connection_sock.h | 16 ++++++++++++----
> > include/net/netns/ipv4.h | 1 +
> > net/ipv4/sysctl_net_ipv4.c | 8 ++++++++
> > net/ipv4/tcp_ipv4.c | 2 ++
> > net/ipv4/tcp_output.c | 4 ++--
> > 6 files changed, 33 insertions(+), 6 deletions(-)
> >
> > diff --git a/Documentation/networking/ip-sysctl.rst
> b/Documentation/networking/ip-sysctl.rst
> > index 5bfa1837968c..c0308b65dc2f 100644
> > --- a/Documentation/networking/ip-sysctl.rst
> > +++ b/Documentation/networking/ip-sysctl.rst
> > @@ -1183,6 +1183,14 @@ tcp_plb_cong_thresh - INTEGER
> >
> > Default: 128
> >
> > +tcp_pingpong_thresh - INTEGER
> > + TCP pingpong threshold is 1 by default, but some application may need
> a
> > + higher threshold for optimal performance.
> > +
> > + Possible Values: 1 - 255
> > +
> > + Default: 1
> > +
>
> It would be good to document what the meaning of the parameter is.
> Perhaps consider something like:
>
> 'The number of estimated data replies sent for estimated incoming data
> requests that must happen before TCP estimates that a connection is a
> "ping-pong" (request-response) connection for which delayed
> acknowledgments can provide benefits. This threshold is 1 by default,
> but some applications may need a higher threshold for optimal
> performance.'
>
Will do.

Thanks,
- Haiyang
\
 
 \ /
  Last update: 2023-10-10 23:06    [W:0.114 / U:0.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site