client: only set TCP socket buffer size on macOS#437
Merged
Conversation
|
Code coverage summary for 9a2191d: ✅ Region coverage 69% passes |
5d20e6b to
f47fa32
Compare
xv-piotr-haber
previously approved these changes
May 27, 2026
kp-mariappan-ramasamy
previously approved these changes
May 28, 2026
Contributor
|
We could also update the config documentation to reflect this change: lightway/lightway-client/src/config.rs Lines 172 to 184 in 5c6ded2 Or add a warn skipping these values in TCP |
305533e
f47fa32 to
305533e
Compare
Contributor
Author
|
Good suggestion 🙏 added docs in |
kp-mariappan-ramasamy
approved these changes
May 28, 2026
Setting SO_SNDBUF/SO_RCVBUF on TCP disables kernel buffer autotuning, capping the bandwidth-delay product and throttling high-RTT links. UDP still needs explicit sizing since it has no autotuning. macOS benefits from explicit buffers based on real-world testing.
305533e to
94b255c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Setting SO_SNDBUF/SO_RCVBUF on TCP disables kernel buffer autotuning, capping the bandwidth-delay product and throttling high-RTT links. UDP still needs explicit sizing since it has no autotuning.
However, macOS benefits from explicit buffers based on real-world testing.
How Has This Been Tested?
CI tested and manually tested.
Performance difference on Lightway TCP when socket buffer is set/not set over a high RTT connection:
Linux
macOS
Windows
Types of changes
Checklist:
main