Skip to content

fix(bench): throttle in a netns instead of shaping the runner NIC - #1909

Merged
zackees merged 1 commit into
mainfrom
fix/bench-trickle
Nov 5, 2026
Merged

zackees merged 1 commit into
mainfrom
fix/bench-trickle

Conversation

@zackees

@zackees zackees commented Nov 5, 2026

Copy link
Copy Markdown
Member

Run 41969830529 completed the shaping step and then died in the measurement with a runner annotation:

The hosted runner lost communication with the server. Anything in your workflow that terminates the runner process, starves it for CPU/Memory, or blocks its network access can cause this error.

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 pair veth-h (host) ↔ veth-b (namespace), NAT via MASQUERADE, DNS via /etc/netns/bench/resolv.conf
  • tbf rate 10mbit burst 64kb latency 400ms on veth-h — that is the host→namespace direction, i.e. downloads
  • only benchmark traffic is limited; the runner keeps full connectivity
  • 10 MB probe now runs inside the namespace and still requires 0.9–1.8 MB/s, so unshaped or over-throttled links fail the job instead of publishing
  • teardown is if: always(): netns, veth and the iptables rules are removed

Site note updated from "tc traffic 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.

…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.
@coderabbitai

coderabbitai Bot commented Nov 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@zackees
zackees merged commit 33d538a into main Nov 5, 2026
22 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant