Skip to content

Tie up PLPMTUD's loose ends - #1529

Merged
djc merged 5 commits into
quinn-rs:mainfrom
aochagavia:plpmtud-2
May 3, 2023
Merged

Tie up PLPMTUD's loose ends#1529
djc merged 5 commits into
quinn-rs:mainfrom
aochagavia:plpmtud-2

Conversation

@aochagavia

Copy link
Copy Markdown
Contributor

This PR introduces a few self-contained improvements to make PLPMTUD work better.

We will probably want to discuss the API impact of the change to the congestion controller code:

  • New on_mtu_update function on the Controller trait
  • Removed max_datagram_size from all controller configs (the current MTU is used now instead)
  • Removed minimum_window from all controller configs (it is now calculated on demand based on the current MTU)

With all this in place, running the top-level bench crate with a MTUD upper bound of 9000 results in sending rates of ~900 MiB/s (on my machine ™).

Comment thread quinn-proto/src/connection/mtud.rs Outdated
Comment thread quinn-proto/src/connection/mtud.rs
Comment thread quinn-proto/src/congestion/bbr/mod.rs Outdated
@aochagavia

Copy link
Copy Markdown
Contributor Author

I just pushed updated commits with the changes you suggested 😉

@aochagavia

aochagavia commented Apr 17, 2023

Copy link
Copy Markdown
Contributor Author

@djc @Ralith Here's a reminder just in case this slipped through the cracks. I'll need these changes for my work on ACK frequency (not yet blocked, though).

@Ralith

Ralith commented Apr 18, 2023

Copy link
Copy Markdown
Collaborator

Still high on my list 👍

@aochagavia

Copy link
Copy Markdown
Contributor Author

Just a heads up: I'm working on an additional commit to close #1540

@aochagavia

aochagavia commented Apr 19, 2023

Copy link
Copy Markdown
Contributor Author

The last commit adds a base_udp_payload_size to TransportConfig, meant to configure the payload size that is guaranteed to be supported by the network. Adding it to MtuDiscoveryConfig, as @Ralith suggested, doesn't work here, because this is a property of the black hole detector (i.e. we want to use it even if MTU discovery is is disabled).

By the way, I felt a bit limited by the fact that we aren't using the builder pattern for TransportConfig, with a build function or some such where to do validation. To keep things user-friendly, I decided to automatically raise the initial_max_udp_payload_size when the base_udp_payload_size is raised (instead of crashing, which would force the user to set the values in a particular order). Have you thought about biting the bullet and introducing a builder? There is otherwise quite some implicit stuff going on, like values < 1200 being ignored when passed to initial_max_udp_payload_size.

@djc djc mentioned this pull request Apr 19, 2023
3 tasks
Comment thread quinn-proto/src/config.rs Outdated
Comment thread quinn-proto/src/connection/mtud.rs Outdated
Comment thread quinn-proto/src/connection/mtud.rs Outdated
Comment thread quinn-proto/src/congestion.rs Outdated
Comment thread quinn-proto/src/connection/mtud.rs

@Ralith Ralith left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, overall this is looking great!

Comment thread quinn-proto/src/connection/mtud.rs
Comment thread quinn-proto/src/connection/mtud.rs
Comment thread quinn-proto/src/config.rs Outdated
Comment thread quinn-proto/src/config.rs Outdated
Comment thread quinn-proto/src/connection/mtud.rs
@aochagavia

Copy link
Copy Markdown
Contributor Author

Thanks for the review! Just pushed changes addressing all comments 😉

Comment thread quinn-proto/src/config.rs Outdated

@Ralith Ralith left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, thanks!

@aochagavia

aochagavia commented May 1, 2023

Copy link
Copy Markdown
Contributor Author

Just FYI, I'd like to fininsh the ACK frequency PR no later than next week (it is not 100% sure yet whether funding will be extended after that period), so it would be helpful if this can get merged soon (the changes related to congestion control are necessary for ACK frequency).

@djc djc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved with nits.

Sorry for the slow review, I'm on vacation.

Comment thread quinn-proto/src/connection/mod.rs Outdated
Comment thread quinn-proto/src/connection/mtud.rs Outdated
Comment thread quinn-proto/src/connection/mtud.rs Outdated
Comment thread quinn-proto/src/congestion.rs Outdated
Comment thread quinn-proto/src/congestion/bbr/mod.rs Outdated
@aochagavia

Copy link
Copy Markdown
Contributor Author

Just amended the relevant commits to apply @djc's suggestions

@djc

djc commented May 3, 2023

Copy link
Copy Markdown
Member

Thanks!

@djc
djc merged commit 030a0e8 into quinn-rs:main May 3, 2023
@aochagavia
aochagavia deleted the plpmtud-2 branch May 3, 2023 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants