feat: Only wait for the start of the draining period in Endpoint::wait_idle#651
Draft
matheus23 wants to merge 2 commits into
Draft
feat: Only wait for the start of the draining period in Endpoint::wait_idle#651matheus23 wants to merge 2 commits into
Endpoint::wait_idle#651matheus23 wants to merge 2 commits into
Conversation
…it_idle` Instead of waiting for draining to have finished. This allows dropping the `Endpoint` once all connections became inactive and there is no need to wait for all connections to have drained.
|
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/noq/pr/651/docs/noq/ Last updated: 2026-05-13T17:16:35Z |
Performance Comparison Report
|
| Scenario | noq | upstream | Delta | CPU (avg/max) |
|---|---|---|---|---|
| large-single | 5404.5 Mbps | 7985.5 Mbps | -32.3% | 97.1% / 146.0% |
| medium-concurrent | 5535.1 Mbps | 7822.1 Mbps | -29.2% | 91.8% / 97.0% |
| medium-single | 3831.3 Mbps | 4625.2 Mbps | -17.2% | 92.1% / 100.0% |
| small-concurrent | 3839.5 Mbps | 5240.7 Mbps | -26.7% | 95.6% / 102.0% |
| small-single | 3567.2 Mbps | 4876.3 Mbps | -26.8% | 95.4% / 151.0% |
Netsim Benchmarks (network simulation)
| Condition | noq | upstream | Delta |
|---|---|---|---|
| ideal | 3081.2 Mbps | N/A | N/A |
| lan | 782.4 Mbps | N/A | N/A |
| lossy | 69.8 Mbps | N/A | N/A |
| wan | 83.8 Mbps | N/A | N/A |
Summary
noq is 27.4% slower on average
188306b6a7260d8233bdb81b75592bf53b2f9933 - artifacts
Raw Benchmarks (localhost)
| Scenario | noq | upstream | Delta | CPU (avg/max) |
|---|---|---|---|---|
| large-single | 5242.0 Mbps | 8051.1 Mbps | -34.9% | 95.4% / 99.5% |
| medium-concurrent | 5450.4 Mbps | 7718.4 Mbps | -29.4% | 96.7% / 149.0% |
| medium-single | 3833.3 Mbps | 4749.4 Mbps | -19.3% | 97.2% / 149.0% |
| small-concurrent | 3926.8 Mbps | 5209.8 Mbps | -24.6% | 93.6% / 102.0% |
| small-single | 3568.0 Mbps | 4848.3 Mbps | -26.4% | 92.9% / 102.0% |
Netsim Benchmarks (network simulation)
| Condition | noq | upstream | Delta |
|---|---|---|---|
| ideal | 3063.8 Mbps | 3977.7 Mbps | -23.0% |
| lan | 782.4 Mbps | 802.3 Mbps | -2.5% |
| lossy | 69.9 Mbps | 69.9 Mbps | ~0% |
| wan | 83.8 Mbps | 83.8 Mbps | ~0% |
Summary
noq is 26.7% slower on average
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
Only wait for the start of the draining period in
Endpoint::wait_idleinstead of waiting for draining to have finished.This allows dropping the
Endpointonce all connections became inactive and there is no need to wait for all connections to have drained.Also adds
Endpoint::wait_drainedwhich now has the same behavior asEndpoint::wait_idlehas had before. This is needed in two tests that want to wait for connections being dropped.Breaking Changes
Endpoint::wait_idlenow only waits for connections to become inactive (for them to start the draining period), instead of waiting for them to stop the draining period.Notes & open questions
Draft for now until this has tests & the docs are adjusted.
Change checklist