Repository navigation
atunnel benchmark measures 100,000 idle egress connections - #3072
Merged
Bowei Du (bowei) merged 2 commits intoOct 21, 2026
Merged
Conversation
A sandbox has one address, and atunnel's redirect leaves only the source port to tell its egress connections apart, so one sandbox can hold at most about 64k of them. EgressIdleConns now splits its connections across an egress actor in each sandbox, which lets it reach 100,000. The other egress scenarios still use actor-0's.
EgressIdleConns at 25k, 50k and 100k connections with atunnel at 4 CPUs and 16 GiB: about 27 KiB and 4 goroutines per idle connection, flat across the three, with no limit reached.
Chuang Wang (chuangw6)
force-pushed
the
atunnel-bench-100k
branch
from
October 21, 2026 17:52
605185e to
c6ca6fe
Compare
Lior Lieberman (LiorLieberman)
self-requested a review
October 21, 2026 18:11
Bowei Du (bowei)
approved these changes
Oct 21, 2026
Collaborator
|
This is a benchmark only change. |
Merged
via the queue into
agent-substrate:main
with commit Oct 21, 2026
52386bd
17 of 18 checks passed
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.
EgressIdleConns couldn't get past 64,512 connections. All of them came
from the egress actor in one sandbox, and atunnel's redirect sends every
connection to the same listener, so only the source port tells them
apart. That's a per-actor limit, not a per-worker one.
The worker now runs an egress actor in every sandbox, and EgressIdleConns
splits its connections across them. The other egress scenarios still use
actor-0's, so their numbers stay comparable with earlier runs.
Also adds a 100k run, with atunnel at 4 CPUs / 16 GiB so neither limit
is reached:
Memory per connection stays flat. Before #2908 it was about 157 KiB. The
CPU is what opening new connections costs (about 1 ms each); holding the
idle ones costs almost none.