test(proto): Implement bandwidth-limited routing#720
Open
matheus23 wants to merge 5 commits into
Open
Conversation
|
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/noq/pr/720/docs/noq/ Last updated: 2026-06-26T17:21:25Z |
Performance Comparison Report
|
| Scenario | noq | upstream | Delta | CPU (avg/max) |
|---|---|---|---|---|
| large-single | 5587.6 Mbps | 7896.7 Mbps | -29.2% | 95.8% / 100.0% |
| medium-concurrent | 5418.7 Mbps | 7983.6 Mbps | -32.1% | 94.8% / 99.5% |
| medium-single | 3991.1 Mbps | 4615.6 Mbps | -13.5% | 98.1% / 151.0% |
| small-concurrent | 3954.0 Mbps | 5292.2 Mbps | -25.3% | 93.3% / 102.0% |
| small-single | 3600.8 Mbps | 4674.9 Mbps | -23.0% | 93.7% / 102.0% |
Netsim Benchmarks (network simulation)
| Condition | noq | upstream | Delta |
|---|---|---|---|
| ideal | N/A | 4022.5 Mbps | N/A |
| lan | N/A | 810.4 Mbps | N/A |
| wan | N/A | 83.8 Mbps | N/A |
Summary
noq is 26.0% slower on average
0c79f22c7b2a70f628e475829b347a670890bcb6 - artifacts
Raw Benchmarks (localhost)
| Scenario | noq | upstream | Delta | CPU (avg/max) |
|---|---|---|---|---|
| large-single | 5450.5 Mbps | 7744.4 Mbps | -29.6% | 94.0% / 99.0% |
| medium-concurrent | 5256.1 Mbps | 7767.4 Mbps | -32.3% | 94.2% / 99.0% |
| medium-single | 3800.0 Mbps | 4748.9 Mbps | -20.0% | 93.9% / 100.0% |
| small-concurrent | 3835.1 Mbps | 5358.7 Mbps | -28.4% | 90.8% / 99.1% |
| small-single | 3516.7 Mbps | 4798.9 Mbps | -26.7% | 89.3% / 97.2% |
Netsim Benchmarks (network simulation)
| Condition | noq | upstream | Delta |
|---|---|---|---|
| ideal | 3086.8 Mbps | 4092.4 Mbps | -24.6% |
| lan | 782.4 Mbps | 810.4 Mbps | -3.5% |
| lossy | 69.8 Mbps | 69.8 Mbps | ~0% |
| wan | 83.8 Mbps | 83.8 Mbps | ~0% |
Summary
noq is 27.0% slower on average
9cedbd99a9c48819bd910f8618c569c92465a93f - artifacts
Raw Benchmarks (localhost)
| Scenario | noq | upstream | Delta | CPU (avg/max) |
|---|---|---|---|---|
| large-single | 5450.8 Mbps | 8057.1 Mbps | -32.3% | 96.7% / 98.2% |
| medium-concurrent | 5469.7 Mbps | 7652.7 Mbps | -28.5% | 96.7% / 98.0% |
| medium-single | 4089.4 Mbps | 4563.3 Mbps | -10.4% | 95.9% / 98.3% |
| small-concurrent | 3791.2 Mbps | 5214.6 Mbps | -27.3% | 97.7% / 100.0% |
| small-single | 3551.4 Mbps | 4622.5 Mbps | -23.2% | 96.0% / 98.3% |
Netsim Benchmarks (network simulation)
| Condition | noq | upstream | Delta |
|---|---|---|---|
| ideal | 3030.9 Mbps | 4064.0 Mbps | -25.4% |
| lan | 782.4 Mbps | 803.1 Mbps | -2.6% |
| lossy | 69.8 Mbps | 69.8 Mbps | ~0% |
| wan | 83.8 Mbps | 83.8 Mbps | ~0% |
Summary
noq is 25.1% slower on average
flub
reviewed
Jun 24, 2026
0c79f22 to
9cedbd9
Compare
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.
Description
RoutingDecision::Delivercase to give it arecv_time: Instantfield. This allowsRoutingto decide when to deliver packets.BwLimitedRoutingrouting implementation that implements a queue that delays packets the more packets are queued and tail-drops packets at a certain max queue length.throughputtest as a quick way of testing noq-proto and its congestion control againstBwLimitedRouting.Breaking Changes
None. Test changes only.
Notes & open questions
Started this work because it might be really useful in catching regressions in congestion control, and to prepare work for when we send on multiple paths simultaneously.
Still draft because this needs a little more work in the test itself (it doesn't actually assert anything yet).
But we can now generate neat pictures from noq-proto itself!

The qlog file for this is generated in 0.2 seconds on my machine, even though it is a simulated 10MB transfer over a 1MB/s connection, so this simulates ~10s of actual time.
The other neat thing about it is that it is fairly deterministic. There's still some sources of randomness in noq, but all of the "measured" transfer speeds fall into a 1% range.
Change checklist