mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2025-02-23 10:23:21 +03:00
Updated Performance Tuning (markdown)
parent
14e53a17d8
commit
563a648fa4
@ -4,7 +4,7 @@
|
||||
|
||||
The TCP window limits throughput over high latency links (throughput <= window size / RTT). In Linux kernel, the window sizes are auto-tuned by the congestion control algorithm and limited by the maximum window sizes. The maximum window sizes are calculated from `tcp_rmem`, `tcp_wmem`, and `tcp_adv_win_scale`. Under the default effect of `tcp_adv_win_scale`, receive window = `tcp_rmem` / 2.
|
||||
|
||||
The default values of `tcp_rmem` (max) and `tcp_wmem` (max) are calculated from RAM size and always smaller than 6MB and 4MB. Thus the default maximum receive and send windows are 4MB and 2MB, which are enough for most cases but too small for fat links with e.g. 1Gbps bandwidth and >16ms RTT.
|
||||
The default values of `tcp_rmem` (max) and `tcp_wmem` (max) are calculated from RAM size and always smaller than 6MB and 4MB. Thus the default maximum receive and send windows are 3MB and 2MB, which are enough for most cases but too small for fat links with e.g. 1Gbps bandwidth and >16ms RTT.
|
||||
|
||||
The window sizes should be tuned to the actual BDP = Link speed * RTT. Example: Assuming 1Gbps link with 256ms RTT, it's a 32MiB maximum window size requiring 64MiB maximum buffer size. Add to sysctl.conf:
|
||||
* (Client only) `net.ipv4.tcp_rmem = 4096 131072 67108864`
|
||||
|
Loading…
x
Reference in New Issue
Block a user