TCP Tuning
LeslieCarr (Talk | contribs) |
LeslieCarr (Talk | contribs) (→tcp_fin_timeout 2) |
||
| (4 intermediate revisions by one user not shown) | |||
| Line 1: | Line 1: | ||
| − | + | == Suggested Wikipedia Front End server tweaks == | |
| − | initcwnd 10 | + | === initcwnd 10 === |
| − | This makes the initial congestion window of 10, as tested by google. Default is 3. "Overall, more than 90% of client connections have a large enough receive window to fully benefit from using init cwnd=10 segments." Currently the only majorly used OS with a smaller advertised receive window is Linux 2.6. | + | This makes the initial congestion window of 10, as tested by google. Default is 3. "Overall, more than 90% of client connections have a large enough receive window to fully benefit from using init cwnd=10 segments." Currently the only majorly used OS with a smaller advertised receive window is Linux 2.6. Changing this on all servers is currently pointless, as the 2.6.32 kernel's receive window is stuck at 3 and cannot be increased. |
| − | + | * How do we implement this without just having an ip route command script on startup ? | |
| + | * Double check this has no negative impact on internal communication using iperf (highly doubtful, but double check). | ||
| + | [http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCUQFjAA&url=http%3A%2F%2Fcode.google.com%2Fspeed%2Farticles%2Ftcp_initcwnd_paper.pdf&ei=giMjT6XpA8HTiAKIxJSECA&usg=AFQjCNET-zahhIxtRlXe28xn_8QSXXLx6A&sig2=FWsvqqH5cRFOF2OeJmz_3Q] | ||
| − | tcp_fin_timeout | + | === tcp_fin_timeout 30 === |
| − | Lower our tcp_fin_timeout by | + | Lower our tcp_fin_timeout by 30 seconds (default is 60 seconds). This matters if the other side does not respond to tcp_fin's. Currently on our caches about 2-3% of all connections are stuck in the FIN state. 75% of them are in FIN_WAIT2 (Connection is closed, and the socket is waiting for a shutdown from the remote end.) We can change this on all servers. |
| − | + | * To implement we can use puppet managed files of sysctl.conf, or we can redo our puppet sysctl management system. | |
| + | == Future Tweaks == | ||
| + | === initrwnd 10 === | ||
| + | TCP Initial receive window bumped up to 10 from a default of 3. This currently can only be set in 2.6.33 onwards (we are currently using 2.6.32 in our lucid distro). Recommend that we up this to 10 once we upgrade to Precise [http://en.wikipedia.org/wiki/Pangolin Pangolin] | ||
| + | * This can be set with the "ip route" command - we should look for a more elegant way | ||
| − | + | == Non tweaks == | |
| − | + | The tcp_rmem and tcp_wmem windows are already large and appear to be beyond the level where it would be an issue. | |
| − | + | ||
| − | + | ||
| − | + | ||
Latest revision as of 00:02, 11 February 2012
Contents |
[edit] Suggested Wikipedia Front End server tweaks
[edit] initcwnd 10
This makes the initial congestion window of 10, as tested by google. Default is 3. "Overall, more than 90% of client connections have a large enough receive window to fully benefit from using init cwnd=10 segments." Currently the only majorly used OS with a smaller advertised receive window is Linux 2.6. Changing this on all servers is currently pointless, as the 2.6.32 kernel's receive window is stuck at 3 and cannot be increased.
- How do we implement this without just having an ip route command script on startup ?
- Double check this has no negative impact on internal communication using iperf (highly doubtful, but double check).
[edit] tcp_fin_timeout 30
Lower our tcp_fin_timeout by 30 seconds (default is 60 seconds). This matters if the other side does not respond to tcp_fin's. Currently on our caches about 2-3% of all connections are stuck in the FIN state. 75% of them are in FIN_WAIT2 (Connection is closed, and the socket is waiting for a shutdown from the remote end.) We can change this on all servers.
- To implement we can use puppet managed files of sysctl.conf, or we can redo our puppet sysctl management system.
[edit] Future Tweaks
[edit] initrwnd 10
TCP Initial receive window bumped up to 10 from a default of 3. This currently can only be set in 2.6.33 onwards (we are currently using 2.6.32 in our lucid distro). Recommend that we up this to 10 once we upgrade to Precise Pangolin
- This can be set with the "ip route" command - we should look for a more elegant way
[edit] Non tweaks
The tcp_rmem and tcp_wmem windows are already large and appear to be beyond the level where it would be an issue.