Repository navigation
atenet-router limits kernel send queues to slow clients - #3321
Closed
Chuang Wang (chuangw6) wants to merge 1 commit into
Closed
Chuang Wang (chuangw6) wants to merge 1 commit into
Chuang Wang (chuangw6) wants to merge 1 commit into
Conversation
Lior Lieberman (LiorLieberman)
requested review from
Lior Lieberman (LiorLieberman) and
Bowei Du (bowei)
October 27, 2026 17:11
Chuang Wang (chuangw6)
force-pushed
the
sockmem-router
branch
2 times, most recently
from
October 27, 2026 17:17
14145c5 to
a914ca1
Compare
A client that stops reading lets each of its sockets queue up to tcp_wmem's maximum, 4 MiB on GKE nodes, charged to the Envoy container but missing from Envoy's statistics. With TCP_NOTSENT_LOWAT at 16 KiB, the backlog stays in Envoy's buffers and upstream. In the Envoy benchmark this cut socket memory behind a stalled client from 981 to 57 KiB per connection, with throughput within run-to-run noise. Add --router-tcp-notsent-lowat, default 16384, set as an Envoy socket option on the TLS listeners and on the clusters that dial atunnel. 0 leaves the kernel default. --router-tcp-send-buffer and --router-tcp-receive-buffer set fixed buffer sizes, off by default: they cap a connection at the buffer size per round trip. Signed-off-by: Chuang Wang <chuangw@google.com>
Chuang Wang (chuangw6)
force-pushed
the
sockmem-router
branch
from
October 27, 2026 20:01
a914ca1 to
2a6fa69
Compare
Collaborator
Author
|
Merged into #3320. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #3133; design and data in
docs/network-socket-memory.md(#3319).The Envoy ingress router sets
TCP_NOTSENT_LOWATto 16 KiB on its client sockets and its sockets to atunnel. New flags:--router-tcp-notsent-lowat(default 16384),--router-tcp-send-bufferand--router-tcp-receive-buffer(default 0).Separately, the actor clusters keep Envoy's default 256 MiB HTTP/2 stream window. In the benchmark each stalled stream held about 15 MiB of heap and kept growing. That's phase 2; see the doc's "Not covered".