From: Eric Dumazet <edumazet@google.com>
To: Mike Freemon <mfreemon@cloudflare.com>
Cc: Jason Xing <kerneljasonxing@gmail.com>,
Stephen Hemminger <stephen@networkplumber.org>,
Neal Cardwell <ncardwell@google.com>,
netdev@vger.kernel.org, kernel-team@cloudflare.com
Subject: Re: [PATCH] Add a sysctl to allow TCP window shrinking in order to honor memory limits
Date: Tue, 6 Jun 2023 17:33:02 +0200 [thread overview]
Message-ID: <CANn89iJs92TW-FEw0rkp4=z1tbfEYjP9bin281d+SU5Cya2xxw@mail.gmail.com> (raw)
In-Reply-To: <dfeec14e-738a-bd04-05b4-70a139867ea5@cloudflare.com>
On Tue, Jun 6, 2023 at 5:17 PM Mike Freemon <mfreemon@cloudflare.com> wrote:
>
>
> On 6/5/23 21:09, Jason Xing wrote:
> > On Tue, Jun 6, 2023 at 6:44 AM Stephen Hemminger
> > <stephen@networkplumber.org> wrote:
> >>
> >> On Mon, 5 Jun 2023 15:42:29 -0700
> >> Stephen Hemminger <stephen@networkplumber.org> wrote:
> >>
> >>>> sysctl: net.ipv4.tcp_shrink_window
> >>>>
> >>>> This sysctl changes how the TCP window is calculated.
> >>>>
> >>>> If sysctl tcp_shrink_window is zero (the default value), then the
> >>>> window is never shrunk.
> >>>>
> >>>> If sysctl tcp_shrink_window is non-zero, then the memory limit
> >>>> set by autotuning is honored. This requires that the TCP window
> >>>> be shrunk ("retracted") as described in RFC 1122.
> >>>>
> >>>> [1] https://www.rfc-editor.org/rfc/rfc7323#appendix-F
> >>>> [2] https://www.rfc-editor.org/rfc/rfc7323#section-2.4
> >>>> [3] https://www.rfc-editor.org/rfc/rfc1122#page-91
> >>>> [4] https://www.rfc-editor.org/rfc/rfc793
> >>>> [5] https://www.rfc-editor.org/rfc/rfc1323
> >>>>
> >>>> Signed-off-by: Mike Freemon <mfreemon@cloudflare.com>
> >>>
> >>> Does Linux TCP really need another tuning parameter?
> >>> Will tests get run with both feature on and off?
> >>> What default will distributions ship with?
> >>>
> >>> Sounds like unbounded receive window growth is always a bad
> >>> idea and a latent bug.
> >>
> >> FYI - I worked in an environment where every bug fix had to have
> >> a tuning parameter to turn it off. It was a bad idea, driven by
> >> management problems with updating. The number of knobs lead
> >> to confusion and geometric growth in possible code paths.
> >>
> >
> > I agree. More than this, shrinking window prohibited in those classic
> > RFCs could cause unexpected/unwanted behaviour.
>
> I discuss the RFCs in more detail in my blog post here:
> https://blog.cloudflare.com/unbounded-memory-usage-by-tcp-for-receive-buffers-and-how-we-fixed-it/
Mike, the usual process to push linux patches is to make them self contained.
changelog should be enough, no need to read a lengthy blog post.
Also, I did not receive a copy of the patch, which is unfortunate,
given I am the linux TCP maintainer.
Next time you post it, make sure to CC me.
Thanks.
next prev parent reply other threads:[~2023-06-06 15:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-05 20:38 [PATCH] Add a sysctl to allow TCP window shrinking in order to honor memory limits Mike Freemon
2023-06-05 22:42 ` Stephen Hemminger
2023-06-05 22:44 ` Stephen Hemminger
2023-06-06 2:09 ` Jason Xing
2023-06-06 15:17 ` Mike Freemon
2023-06-06 15:33 ` Eric Dumazet [this message]
2023-06-06 15:35 ` Neal Cardwell
2023-06-06 17:00 ` Mike Freemon
2023-06-06 14:54 ` Mike Freemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CANn89iJs92TW-FEw0rkp4=z1tbfEYjP9bin281d+SU5Cya2xxw@mail.gmail.com' \
--to=edumazet@google.com \
--cc=kernel-team@cloudflare.com \
--cc=kerneljasonxing@gmail.com \
--cc=mfreemon@cloudflare.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).