NethermindEth / NethermindEth/execution-payloads-benchmarks
Configured download_speed bandwidth limit is silently not enforced
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 19
- Forks
- 13
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 7
Description
When limit_bandwidth is enabled and a download_speed is configured, the download
(ingress) limit is never actually applied to the execution-client container. Only the
egress (upload) direction is shaped, so a benchmark that is meant to run under a
constrained download bandwidth actually runs with an unconstrained download path, and
nothing warns the user.
Where
src/expb/payloads/utils/networking.py, apply_tc_limits() (called from
executor.py when self.config.limit_bandwidth is set). The code already carries a note:
# FIXME: current implementation only limits egress speed (uploading)
The download_speed value is passed to an HTB class, but that class sits on the veth's
egress root qdisc. tc on the root qdisc only shapes traffic leaving the interface
(the container's upload). Shaping inbound traffic (the container's download) requires
redirecting ingress to an IFB (Intermediate Functional Block) device and applying the
rate there, or using an ingress policer. As written, download_speed has no effect.
Impact
For a benchmarking tool this is a correctness issue rather than cosmetics: any run
configured with a download_speed limit is not actually download-constrained, so
comparisons that rely on that constraint can be silently invalid.
Suggested direction
Two options:
- Implement ingress shaping via IFB:
modprobe ifb, create anifbdevice, redirect
the veth's ingress to it (tc filter ... action mirred egress redirect dev ifbN), and
apply the HTBdownload_speedrate on the IFB egress. Tear it down on cleanup. - Interim: if only upload shaping is supported for now, log a warning when
download_speedis set and document the limitation, so results are not silently
misinterpreted.
Happy to open a PR for either approach if useful.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/expb/payloads/utils/networking.py at apply_tc_limits(), then trace its call from executor.py and inspect the existing tc setup and cleanup. Confirm whether the fix will implement ingress shaping with IFB or provide the interim warning and documentation; done means download_speed is either enforced for the container or its limitation is explicitly surfaced.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, python
- Domain
- devops, networking, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100