Repository navigation
fix(bench): throttle in a netns instead of shaping the runner NIC - #1909
Merged
Merged
Conversation
…face Run 41969830529 was killed with 'the hosted runner lost communication with the server'. Shaping all ingress on the runner's default interface starves the runner's own control channel to GitHub, so any whole-interface tc approach is unsafe regardless of queue sizing. The benchmark now runs inside its own network namespace behind a veth pair, with tbf applied to the veth (host -> namespace, i.e. the download direction). Only benchmark traffic is limited; the runner keeps full connectivity. The 10 MB probe now runs inside the namespace and still requires 0.9-1.8 MB/s, so an unshaped or over-throttled link fails the job instead of publishing.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
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.
Run 41969830529 completed the shaping step and then died in the measurement with a runner annotation:
Root cause: shaping all ingress on the runner's default interface throttles the runner's own control channel to GitHub. While a 271 MB cold download saturates the 10 Mbit link, the heartbeat starves and the job is killed. No amount of tbf queue tuning fixes this — whole-interface shaping is intrinsically unsafe on a runner.
Fix: the benchmark now runs inside its own network namespace:
veth-h(host) ↔veth-b(namespace), NAT via MASQUERADE, DNS via/etc/netns/bench/resolv.confrate 10mbit burst 64kb latency 400msonveth-h— that is the host→namespace direction, i.e. downloadsif: always(): netns, veth and the iptables rules are removedSite note updated from "
tctraffic shaping" to "the benchmark runs in its own shaped network namespace".soldr cargo test -p fbuild-bench-fastled-examples→ 38 passed.This is the third infrastructure blocker; the previously-merged #1905 (ingress vs egress) and #1907 (burst sizing) were both correct but insufficient on their own.