roles/common: Add TCP/IP tweaks to sysctl template

Disable TCP slow start and increase the number of ports available
for client connections.

See: http://vincent.bernat.im/en/blog/2014-tcp-time-wait-state-linux.html
See: http://www.chromium.org/spdy/spdy-best-practices

Signed-off-by: Alan Orth <alan.orth@gmail.com>
This commit is contained in:
Alan Orth 2015-03-15 17:23:10 +03:00
parent 942f45834f
commit 60ba4dacbd
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -96,3 +96,10 @@ net.ipv4.tcp_congestion_control=htcp
{% endif %} {% endif %}
# recommended for hosts with jumbo frames enabled # recommended for hosts with jumbo frames enabled
#net.ipv4.tcp_mtu_probing=1 #net.ipv4.tcp_mtu_probing=1
# increase quadruplets (src ip, src port, dest ip, dest port)
# see: http://vincent.bernat.im/en/blog/2014-tcp-time-wait-state-linux.html
net.ipv4.ip_local_port_range = 10240 65535
# recommended for web servers, especially if running SPDY
# see: http://www.chromium.org/spdy/spdy-best-practices
net.ipv4.tcp_slow_start_after_idle = 0