From: Ivan Babrou <email@example.com>
To: Eric Dumazet <firstname.lastname@example.org>
Cc: Linux Kernel Network Developers <email@example.com>,
"David S. Miller" <firstname.lastname@example.org>
Subject: Re: Initial TCP receive window is clamped to 64k by rcv_ssthresh
Date: Thu, 23 Dec 2021 14:52:55 -0800 [thread overview]
Message-ID: <CABWYdi0qBQ57OHt4ZbRxMtdSzhubzkPaPKkYzdNfu4+cgPyXCA@mail.gmail.com> (raw)
On Wed, Dec 22, 2021 at 10:10 AM Eric Dumazet <email@example.com> wrote:
> Stack is conservative about RWIN increase, it wants to receive packets
> to have an idea
> of the skb->len/skb->truesize ratio to convert a memory budget to RWIN.
> Some drivers have to allocate 16K buffers (or even 32K buffers) just
> to hold one segment
> (of less than 1500 bytes of payload), while others are able to pack
> memory more efficiently.
> I guess that you could use eBPF code to precisely tweak stack behavior
> to your needs.
Adding ebpf for this is certainly an option and it seems similar to
TCP_BPF_SNDCWND_CLAMP. I can certainly look into crafting a patch for
Is it not possible to do anything automatically to pick a bigger
window without ebpf? When the scaled window is first advertised in the
very first ACK, the kernel already has the SYN ACK skb from the other
end of the connection. Could the skb->len / skb->truesize ratio be
looked up there?
Increasing tcp_rmem (the middle part specifically) is a lower entry
barrier than making ebpf involved, and it can really help with latency
even for human use cases like opening a website across the ocean.
prev parent reply other threads:[~2021-12-23 22:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-22 17:46 Initial TCP receive window is clamped to 64k by rcv_ssthresh Ivan Babrou
2021-12-22 18:09 ` Eric Dumazet
2021-12-23 22:52 ` Ivan Babrou [this message]
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:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.