Skip to content

fix(proto): correctly set per path idle timer#771

Open
divagant-martian wants to merge 3 commits into
mainfrom
path-timer
Open

fix(proto): correctly set per path idle timer#771
divagant-martian wants to merge 3 commits into
mainfrom
path-timer

Conversation

@divagant-martian

@divagant-martian divagant-martian commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR fixes a couple bugs: setting per path idle timers before multipath is negotiated, inconsistent calculation of the timer, and misleading docs based on wrong assumptions.

The timer arm/stop logic from set_path_max_idle_timeout and reset_idle_timeout is moved into a single shared helper, sync_path_max_idle_timer, which now also enforces that the per-path idle timer only applies once multipath has been negotiated. The previous logic that re-armed the timer by accounting for already-elapsed idle time based on the old deadline/timeout is also removed. This assumed the timer had been set to now + timeout, which is very likely not true. The real instant in which the timer was set, and the path was thus last used is irrecoverable. Docs are adjusted to account for the changes.

TimerTable::get is marked #[allow(unused)] since it's no longer in use. We might want to remove it later if it remains dead code.

Breaking Changes

n/a

Notes & open questions

n/a

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • This PR was created by a human that thought critically about the
    proposed change and wrote an as clear and concise description as
    they could.
  • This PR isn't slop, and is carefully crafted to do have the
    intended effect.
  • cargo make passes locally.

@divagant-martian divagant-martian added this to the noq: Sprint 0 milestone Jul 25, 2026
@divagant-martian divagant-martian added the multipath QUIC Multipath extension label Jul 25, 2026
@divagant-martian divagant-martian self-assigned this Jul 25, 2026
@divagant-martian divagant-martian linked an issue Jul 25, 2026 that may be closed by this pull request
@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/noq/pr/771/docs/noq/

Last updated: 2026-07-25T17:15:11Z

@divagant-martian divagant-martian changed the title path timer fix(proto): correctly set per path idle timer Jul 25, 2026
@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown

Performance Comparison Report

61cb8cfc77bdac18c7160df4dbc09acf414c9a23 - artifacts

Raw Benchmarks (localhost)

Scenario noq upstream Delta CPU (avg/max)
large-single 5462.0 Mbps 7862.8 Mbps -30.5% 96.4% / 147.0%
medium-concurrent 5446.8 Mbps 7418.8 Mbps -26.6% 91.4% / 96.8%
medium-single 4040.2 Mbps 4663.3 Mbps -13.4% 89.6% / 97.7%
small-concurrent 3790.8 Mbps 5207.0 Mbps -27.2% 96.4% / 103.0%
small-single 3435.8 Mbps 4759.8 Mbps -27.8% 94.0% / 102.0%

Netsim Benchmarks (network simulation)

Condition noq upstream Delta
ideal 3003.5 Mbps 4022.9 Mbps -25.3%
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 25.2% slower on average

---
7f2052c83611892d0891c226c1196e5fb55c178c - artifacts

Raw Benchmarks (localhost)

Scenario noq upstream Delta CPU (avg/max)
large-single 5613.0 Mbps 7902.0 Mbps -29.0% 96.6% / 98.3%
medium-concurrent 5370.4 Mbps 7548.7 Mbps -28.9% 96.1% / 97.9%
medium-single 4046.5 Mbps 4469.5 Mbps -9.5% 96.9% / 98.9%
small-concurrent 3805.2 Mbps 4978.9 Mbps -23.6% 96.9% / 99.5%
small-single 3446.1 Mbps 4550.8 Mbps -24.3% 95.4% / 97.5%

Netsim Benchmarks (network simulation)

Condition noq upstream Delta
ideal N/A 4106.8 Mbps N/A
lan N/A 810.3 Mbps N/A
lossy N/A 69.8 Mbps N/A
wan N/A 83.8 Mbps N/A

Summary

noq is 24.3% slower on average

@n0bot n0bot Bot added this to iroh Jul 25, 2026
@github-project-automation github-project-automation Bot moved this to 🚑 Needs Triage in iroh Jul 25, 2026
@divagant-martian
divagant-martian marked this pull request as ready for review July 25, 2026 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

multipath QUIC Multipath extension

Projects

Status: 🚑 Needs Triage

Development

Successfully merging this pull request may close these issues.

PathIdle timer fires before multipath is negotiated

1 participant