Skip to content

examples(iroh): allow to configure the receive window in the transfer example#4082

Open
Frando wants to merge 1 commit intomainfrom
Frando/transfer-rwnd
Open

examples(iroh): allow to configure the receive window in the transfer example#4082
Frando wants to merge 1 commit intomainfrom
Frando/transfer-rwnd

Conversation

@Frando
Copy link
Copy Markdown
Member

@Frando Frando commented Apr 8, 2026

This allows to configure the receive window in the transfer example. It can either be set by value, or by setting the expected RTT and then calculating the receive window for a desired max throughput of 12.5 MB/s (like in noq's default calculation).

For a relay-only transfer (with --relay-only) and the relay pinned to use1 (~100ms one-way latency from my laptop, so 400ms RTT between two endpoints on my laptop), increasing this from the default to 5MB (i.e. --receive-window 5Mor --receive-window-rtt 400) lets the transfer throughput go from ~600 KB/s to ~1.8 MB/s.

Description

Breaking Changes

Notes & open questions

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.
    • List all breaking changes in the above "Breaking Changes" section.
    • Open an issue or PR on any number0 repos that are affected by this breaking change. Give guidance on how the updates should be handled or do the actual updates themselves. The major ones are:

@Frando Frando requested a review from flub April 8, 2026 07:25
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

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

Last updated: 2026-04-08T08:19:38Z

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 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: 9380187

@n0bot n0bot bot added this to iroh Apr 8, 2026
@github-project-automation github-project-automation bot moved this to 🚑 Needs Triage in iroh Apr 8, 2026
@Frando Frando force-pushed the Frando/transfer-rwnd branch from 44bcd0a to c18dfad Compare April 8, 2026 08:17
@flub
Copy link
Copy Markdown
Contributor

flub commented Apr 8, 2026

We probably need to limit the number of features we throw into this example. Yes, it's a tool for our testing but also is this going to be generally useful enough to clutter the CLI?

Perhaps this is better off as a one-off thing to play with? Or perhaps the code needs to be structured differently so that it is easy to do this kind of tweaks locally if you need them?

Another concern is that tweaking the receive window without also tweaking the send window is also going to hurt at some point.

Copy link
Copy Markdown
Contributor

@flub flub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently github didn't think that counted as a review 🤷

Anyway, I need more convincing that we want to add this complexity to the transfer example :)

@github-project-automation github-project-automation bot moved this from 🚑 Needs Triage to 🏗 In progress in iroh Apr 8, 2026
@Frando
Copy link
Copy Markdown
Member Author

Frando commented Apr 8, 2026

Anyway, I need more convincing that we want to add this complexity to the transfer example :)

My reasoning is:

  • The transfer example is what we use to test connectivity and performance of iroh, and where we point people towards for testing themselves under varying conditions
  • The default receive window size is far too low for high-latency conditions
  • Making it tunable here allows people to test with higher sizes without having to write code themselves, to see if that is there issue

So I think that this argument makes sense here.

Another concern is that tweaking the receive window without also tweaking the send window is also going to hurt at some point.

Good point. The default is 8 * STREAM_RWND so I think I'd just do the same here.

@flub
Copy link
Copy Markdown
Contributor

flub commented Apr 9, 2026

Do we no longer send folks to doctor? Anyway, you've done more maintaining of transfer than me, so your call. Though I do think it keeps getting more and more complex.

Do you plan on doing the send window as well or do you want an lgtm now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

2 participants