perf(networking): optimize TCP throughput for high-speed downloads#51
Merged
Conversation
Performance improvements: - Increase TCP_RX_BUF_SIZE from 16KB to 64KB to prevent packet drops during high-throughput transfers and allow proper buffering - Advertise full TCP_RX_BUF_SIZE (65536) instead of fixed 4096 bytes in window size, allowing senders to pump data without artificial throttling - Increase TCP maximum payload from 1024 to 1460 bytes (typical MTU - headers), reducing round-trips and improving efficiency - Update buffer allocations in http_get_to_file to use TCP_MAX_PAYLOAD for consistency These changes directly address the bottlenecks causing slow wget transfers by: 1. Eliminating artificial buffer limits that cause retransmissions 2. Allowing the remote sender to transmit at line speed instead of being artificially throttled by a small window 3. Reducing protocol overhead per byte transferred The main bottleneck shifts from OS to network provider as intended.
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.
Performance improvements:
These changes directly address the bottlenecks causing slow wget transfers by:
The main bottleneck shifts from OS to network provider as intended.