-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tcp: Add a sysctl to skip tcp collapse processing when the receive bu…
…ffer is full For context and additional information about this patch, see the blog post at https://blog.cloudflare.com/optimizing-tcp-for-high-throughput-and-low-latency/ sysctl: net.ipv4.tcp_collapse_max_bytes If tcp_collapse_max_bytes is non-zero, attempt to collapse the queue to free up memory if the current amount of memory allocated is less than tcp_collapse_max_bytes. Otherwise, the packet is dropped without attempting to collapse the queue. If tcp_collapse_max_bytes is zero, this feature is disabled and the default Linux behavior is used. The default Linux behavior is to always perform the attempt to collapse the queue to free up memory. When the receive queue is small, we want to collapse the queue. There are two reasons for this: (a) the latency of performing the collapse will be small on a small queue, and (b) we want to avoid sending a congestion signal (via a packet drop) to the sender when the receive queue is small. The result is that we avoid latency spikes caused by the time it takes to perform the collapse logic when the receive queue is large and full, while preserving existing behavior and performance for all other cases. Signed-off-by: Alexandre Frade <kernel@xanmod.org>
- Loading branch information
Showing
5 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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