Ajout : vm_hosted : rule_sysctl_configure
[lhc/ateliers.git] / etc / sysctl.d / local-net-tcp.conf
diff --git a/etc/sysctl.d/local-net-tcp.conf b/etc/sysctl.d/local-net-tcp.conf
new file mode 100644 (file)
index 0000000..24fe62b
--- /dev/null
@@ -0,0 +1,20 @@
+# DOC: http://dak1n1.com/blog/12-nginx-performance-tuning
+
+# NOTE: increase system IPv4 port limits to allow for more connections.
+net.ipv4.ip_local_port_range = 2000 65000
+net.ipv4.tcp_window_scaling = 1
+
+# NOTE: number of packets to keep in backlog before the kernel starts dropping them.
+net.ipv4.tcp_max_syn_backlog = 3240000
+
+# NOTE: increase socket listen backlog.
+net.core.somaxconn = 3240000
+net.ipv4.tcp_max_tw_buckets = 1440000
+
+# NOTE: increase TCP buffer sizes.
+net.core.rmem_default = 8388608
+net.core.rmem_max = 16777216
+net.core.wmem_max = 16777216
+net.ipv4.tcp_congestion_control = cubic
+net.ipv4.tcp_rmem = 4096 87380 16777216
+net.ipv4.tcp_wmem = 4096 65536 16777216