Skip to content

fix(iroh-relay): Turn off nagle for relayed streams in iroh-relay servers#3995

Merged
dignifiedquire merged 2 commits intomainfrom
matheus23/no-delay
Mar 9, 2026
Merged

fix(iroh-relay): Turn off nagle for relayed streams in iroh-relay servers#3995
dignifiedquire merged 2 commits intomainfrom
matheus23/no-delay

Conversation

@matheus23
Copy link
Copy Markdown
Member

Description

Fixes #3974

We already turn off nagle in iroh-relay clients. Turning it off in servers also seems sensible, given we mostly send around nicely-packaged data and aim for low latency.

Notes & open questions

Would love thoughts & experiences from others. I'm not sure how common setting this on servers is.

We should probably also benchmark this.

Change checklist

  • Self-review.

@matheus23 matheus23 self-assigned this Mar 4, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 4, 2026

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

Last updated: 2026-03-04T16:59:19Z

@n0bot n0bot bot added this to iroh Mar 4, 2026
@github-project-automation github-project-automation bot moved this to 🚑 Needs Triage in iroh Mar 4, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 6, 2026

Netsim report & logs for this PR have been generated and is available at: LOGS
This report will remain available for 3 days.

Last updated for commit: bd15faa

@matheus23
Copy link
Copy Markdown
Member Author

matheus23 commented Mar 9, 2026

This gives me a very consistent, major performance improvement for local relayed iroh throughput:

This branch:

      │  Throughput   │ Duration 
──────┼───────────────┼──────────
 AVG  │   48.20 MiB/s │     2.08s
 P0   │   48.19 MiB/s │     2.07s
 P10  │   48.22 MiB/s │     2.08s
 P50  │   48.22 MiB/s │     2.08s
 P90  │   48.22 MiB/s │     2.08s
 P100 │   48.22 MiB/s │     2.08s

main:

      │  Throughput   │ Duration 
──────┼───────────────┼──────────
 AVG  │   28.93 MiB/s │     3.46s
 P0   │   28.92 MiB/s │     3.46s
 P10  │   28.94 MiB/s │     3.46s
 P50  │   28.94 MiB/s │     3.46s
 P90  │   28.94 MiB/s │     3.46s
 P100 │   28.94 MiB/s │     3.46s

I see very little fluctuation in these numbers from run-to-run (all within 10%).

Let's ship this! Thank you for identifying this issue @ISensuiI !

@matheus23 matheus23 added this pull request to the merge queue Mar 9, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 9, 2026
@dignifiedquire dignifiedquire added this pull request to the merge queue Mar 9, 2026
Merged via the queue into main with commit 82e0695 Mar 9, 2026
51 of 54 checks passed
@github-project-automation github-project-automation bot moved this from 🚑 Needs Triage to ✅ Done in iroh Mar 9, 2026
@matheus23 matheus23 deleted the matheus23/no-delay branch March 9, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

bug: iroh-relay's server side doesn't set the TCP socket to no-delay

3 participants