Repository navigation
benchmarking: measure kernel socket memory behind slow readers in the atunnel and Envoy benchmarks - #3319
Open
Chuang Wang (chuangw6) wants to merge 1 commit into
Open
benchmarking: measure kernel socket memory behind slow readers in the atunnel and Envoy benchmarks#3319Chuang Wang (chuangw6) wants to merge 1 commit into
Chuang Wang (chuangw6) wants to merge 1 commit into
Conversation
Chuang Wang (chuangw6)
force-pushed
the
sockmem-bench
branch
4 times, most recently
from
October 27, 2026 19:10
1d185e1 to
ad9949b
Compare
Chuang Wang (chuangw6)
force-pushed
the
sockmem-bench
branch
from
October 27, 2026 20:01
ad9949b to
68edc1d
Compare
Chuang Wang (chuangw6)
force-pushed
the
sockmem-bench
branch
from
October 27, 2026 22:25
68edc1d to
81a9dfe
Compare
Lior Lieberman (LiorLieberman)
left a comment
Collaborator
There was a problem hiding this comment.
I think LGTM - lets get #3320 first
Add slow-peer scenarios to the atunnel benchmark: connections whose reader stalls after reading 4 MiB, in both directions on the egress and CONNECT paths. The report reads the cgroup's memory.stat sock, the socket buffers no heap profile shows, per held connection. Also add throughput scenarios for egress download and CONNECT, and run-docker.sh options for added round trip time (--network-delay) and atunnel flags (--tunnel-flag). The containers and actor sandboxes get a GKE node's TCP buffer limits. Add benchmarking/envoy-sockmem, which measures the same for an Envoy configured like atenet-router or the egress gateway, with per-socket options set from flags. docs/network-socket-memory.md has the results and the defaults they lead to. Signed-off-by: Chuang Wang <chuangw@google.com>
Chuang Wang (chuangw6)
force-pushed
the
sockmem-bench
branch
from
October 28, 2026 01:27
81a9dfe to
626b2cf
Compare
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. When a reader stalls, the data atunnel, atenet-router and the egress gateway relay waits in kernel socket buffers. That memory counts toward the proxy's memory limit, but no heap profile shows it. This adds a way to measure it, and a design doc with the results.
benchmarking/atunnelgets four slow-reader scenarios (--scenarios slow), on the egress and CONNECT paths in both directions. They report kernel socket memory per connection. It also gets throughput scenarios for egress download and CONNECT, and newrun-docker.shoptions:--network-delayand--tunnel-flag. The containers get a GKE node's TCP buffer limits.benchmarking/envoy-sockmemis a new benchmark that does the same for an Envoy configured like the router or the egress gateway.docs/network-socket-memory.mdexplains the problem and the options, and gives the results and the defaults.Kernel socket memory per stalled connection, 100 connections, median of 3:
TCP_NOTSENT_LOWAT16 KiBThree follow-up PRs set the option in atunnel, the router and the egress gateway. Not measured on GKE yet; the numbers come from Docker with GKE's TCP buffer limits.