From 60ba4dacbd7964a3480cf319936850547861e76f Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Sun, 15 Mar 2015 17:23:10 +0300 Subject: [PATCH] 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 --- roles/common/templates/sysctl_Ubuntu.j2 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roles/common/templates/sysctl_Ubuntu.j2 b/roles/common/templates/sysctl_Ubuntu.j2 index b41877d..9190b20 100644 --- a/roles/common/templates/sysctl_Ubuntu.j2 +++ b/roles/common/templates/sysctl_Ubuntu.j2 @@ -96,3 +96,10 @@ net.ipv4.tcp_congestion_control=htcp {% endif %} # recommended for hosts with jumbo frames enabled #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