Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look at effect of increasing MTU of the TUN interface #102

Closed
LeeSmet opened this issue Jan 9, 2024 · 3 comments
Closed

Look at effect of increasing MTU of the TUN interface #102

LeeSmet opened this issue Jan 9, 2024 · 3 comments
Labels
type_feature New feature or request

Comments

@LeeSmet
Copy link
Contributor

LeeSmet commented Jan 9, 2024

Currently MTU is a static 1400 to make sure packets would fit in a single packet of the lower layer. However since we use TCP and Quic, this is not strictly needed since those protocols take care of breaking up packets internally, and we also have a framing protocol for all traffic. As such, we could consider increasing the MTU of the TUN here, with the caveat that future transport implementations (if any), need to be able to handle packets larger than the actual link MTU. We should verify if this allows a significant improvement in performance. If not, we need to consider if the future hassle is worth it to do this.

@LeeSmet LeeSmet added the type_feature New feature or request label Jan 9, 2024
@delandtj
Copy link
Contributor

delandtj commented Jan 9, 2024

It actually is : IIRC, zeotier MTU was set at 2800.
basically it all boils down to this: if routed packets come to the tun iface at 1500, they will be fragmented in 2 packets, as all data needs to be encapsulated.
So: if we just set it at a 'big enough' value, the pakets originating from the node itself will be bigger , packets that come in from an IP in the routed subnet will be reassembled into the new MTU during forwarding (L3), but I need to confirm that. Path MTU discovery (pmtu) is there for a reason. Don't know if we can disable the bit by default in a tun iface

Arf: weekeepeedia knows : https://en.wikipedia.org/wiki/Path_MTU_Discovery but then I assume we need to enable that icmp message
2800 ? LGTM

@delandtj
Copy link
Contributor

delandtj commented Jan 9, 2024

Looking at it, even Ygg sets it at 0xffffff O_o

@LeeSmet
Copy link
Contributor Author

LeeSmet commented Mar 4, 2024

The current performance is largely sufficient for the common use case. Additionally, I'd like to keep the MTU of 1400, in case we end up setting up something like UDP transports in #144 . The currently preferred route to continue here would be #141

@LeeSmet LeeSmet closed this as not planned Won't fix, can't repro, duplicate, stale Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type_feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants