Skip to content

benchmarking/nighthawk-egress: size the rig so atenet-egress is the bottleneck under test - #3627

Open
Yuan Gao (ygao-g) wants to merge 4 commits into
agent-substrate:mainfrom
ygao-g:nighthawk-egress-1-sizing
Open

Yuan Gao (ygao-g) wants to merge 4 commits into
agent-substrate:mainfrom
ygao-g:nighthawk-egress-1-sizing

Conversation

@ygao-g

@ygao-g Yuan Gao (ygao-g) commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #3624: size the rig so atenet-egress is the bottleneck under test.

Before this PR, the benchmark ran at a fixed request rate. The later PRs of #3624 measure the highest rate that atenet-egress holds, with the gateway as the system under test. So the load generator, which runs inside an actor, and the origin server should get more CPU and memory.

Measured on a GKE cluster with 4 c3-standard-22 nodes and envoy of atenet-egress at 1 vCPU. In each of the modes http, mitm and passthrough, envoy reached its CPU limit. The worker pod of the load generator peaked at 12 of its 18 vCPUs, and nighthawk-server at 2.1 of its 8. The run used the search of those later PRs.

AI use: AI-assisted for the diff, the split and the test runs; I reviewed the diff.

  • Tests pass
  • Docs updated

@ygao-g Yuan Gao (ygao-g) self-assigned this Nov 4, 2026
@ygao-g
Yuan Gao (ygao-g) force-pushed the nighthawk-egress-1-sizing branch from d847d8c to 8ac15c2 Compare November 5, 2026 19:01
@ygao-g
Yuan Gao (ygao-g) marked this pull request as draft November 5, 2026 19:10
@ygao-g
Yuan Gao (ygao-g) force-pushed the nighthawk-egress-1-sizing branch 2 times, most recently from a70ba52 to e98a359 Compare November 5, 2026 21:19
@ygao-g
Yuan Gao (ygao-g) marked this pull request as ready for review November 5, 2026 21:28
@ygao-g
Yuan Gao (ygao-g) force-pushed the nighthawk-egress-1-sizing branch 2 times, most recently from 61962aa to 507ece3 Compare November 5, 2026 22:14
@ygao-g
Yuan Gao (ygao-g) marked this pull request as draft November 5, 2026 22:34
@ygao-g
Yuan Gao (ygao-g) force-pushed the nighthawk-egress-1-sizing branch 2 times, most recently from 61962aa to 8c06a5b Compare November 5, 2026 22:53
@ygao-g
Yuan Gao (ygao-g) marked this pull request as ready for review November 6, 2026 00:12
@ygao-g
Yuan Gao (ygao-g) force-pushed the nighthawk-egress-1-sizing branch from 97ecbc2 to 136457f Compare November 12, 2026 22:39
shankgan pushed a commit to shankgan/substrate that referenced this pull request Nov 13, 2026
…to nighthawk_common (agent-substrate#3628)

Part of agent-substrate#3624 (Stage 1, item 2): share the adaptive load session spec
and output helpers between `nighthawk-ingress` and the coming
`nighthawk-egress` runner.

### What changes
Pure relocation, no behavior change. `nighthawk-ingress/output.py` and
`spec.py` move to `benchmarking/nighthawk_common/`. The router-specific
parts of the spec builder (router SNI, certificate paths,
`build_spec_dict`) stay in `nighthawk-ingress/spec.py`, which now calls
the generic `build_session_spec`. Callers and tests import
`nighthawk_common` directly; the ingress Dockerfile copies the package
into the image.

### Review guide
1. `output.py` rename (GitHub shows 100%), two import lines, the
Dockerfile `COPY`, two `sys.path` lines in the ingress tests.
2. `spec.py` rename at 100%, importers repointed, an unused import
dropped from `actors.py`.
3. The split: read `nighthawk_common/spec.py` as deletions and
`nighthawk-ingress/spec.py` as the same lines moving back.

### Testing
`hack/verify/benchmarking-python.sh`: the ingress suite passes at each
commit, and fails without the new `sys.path` lines, so the import path
is exercised.

Independent of agent-substrate#3627. agent-substrate#3629 and agent-substrate#3630 stack on both.

AI use: AI-assisted for the diff, the commit split and the test runs; I
reviewed the diff.

- [x] Tests pass
- [ ] Docs updated (none needed)

---------

Signed-off-by: Yuan Gao <ypgao@google.com>
Move the function into benchmarking/lib/kubectl-ate.sh for reuse.

Signed-off-by: Yuan Gao <ypgao@google.com>
…ration

Give the actor sandbox, its worker pod and nighthawk-server
enough CPU and memory that the gateway saturates first.

Signed-off-by: Yuan Gao <ypgao@google.com>
deploy-traffic-driver.sh builds kubectl-ate from the tree into a
temporary directory.

Signed-off-by: Yuan Gao <ypgao@google.com>
With no context set, "${args[@]}" is an unbound variable under the macOS
system bash, and the EXIT trap of build_kubectl_ate made the script exit
0 after that error. The array now expands only when it has elements, as
in hack/run-e2e.sh.

Signed-off-by: Yuan Gao <ypgao@google.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants