From 421eecd1e5e6d86327278dd8620069297e2d9843 Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Wed, 15 Sep 2021 23:48:44 +0000 Subject: [PATCH] Increase TCP buffer maximum and MTU discovery This patch increases the maximum allowed TCP buffer memory to 32MB and enabled MTU probe discovery when an ICMP black hole is detected. This should improve reliability in some situations when the amphora are provisioned on hosts with 10gbps or faster network adapters. Change-Id: If7dc46ee18a46e3bd15756839f60ea5b51c9288b --- .../post-install.d/20-haproxy-tune-kernel | 9 +++++++-- ...nable-mtu-black-hole-detection.-0640432a7202400f.yaml | 5 +++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/Increase-TCP-buffer-memory-max-and-enable-mtu-black-hole-detection.-0640432a7202400f.yaml diff --git a/elements/haproxy-octavia/post-install.d/20-haproxy-tune-kernel b/elements/haproxy-octavia/post-install.d/20-haproxy-tune-kernel index cfe0e70215..da0bbd2a47 100755 --- a/elements/haproxy-octavia/post-install.d/20-haproxy-tune-kernel +++ b/elements/haproxy-octavia/post-install.d/20-haproxy-tune-kernel @@ -19,9 +19,14 @@ sysctl-write-value fs.nr_open 2600000 sysctl-write-value net.netfilter.nf_conntrack_tcp_timeout_time_wait 5 || true sysctl-write-value net.netfilter.nf_conntrack_tcp_timeout_fin_wait 5 || true +# Enable MTU icmp black hole detection (RFC4821) +sysctl-write-value net.ipv4.tcp_mtu_probing 1 + sysctl-write-value net.ipv4.tcp_fin_timeout 5 sysctl-write-value net.ipv4.ip_nonlocal_bind 1 sysctl-write-value net.ipv6.ip_nonlocal_bind 1 -sysctl-write-value net.ipv4.tcp_rmem "16384 65536 524288" -sysctl-write-value net.ipv4.tcp_wmem "16384 349520 699040" +sysctl-write-value net.core.rmem_max 67108864 +sysctl-write-value net.core.wmem_max 67108864 +sysctl-write-value net.ipv4.tcp_rmem "4096 87380 33554432" +sysctl-write-value net.ipv4.tcp_wmem "4096 87380 33554432" sysctl-write-value net.ipv4.ip_local_port_range "1025 65534" diff --git a/releasenotes/notes/Increase-TCP-buffer-memory-max-and-enable-mtu-black-hole-detection.-0640432a7202400f.yaml b/releasenotes/notes/Increase-TCP-buffer-memory-max-and-enable-mtu-black-hole-detection.-0640432a7202400f.yaml new file mode 100644 index 0000000000..f8793f469b --- /dev/null +++ b/releasenotes/notes/Increase-TCP-buffer-memory-max-and-enable-mtu-black-hole-detection.-0640432a7202400f.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Increased the TCP buffer memory maximum and enabled MTU ICMP black hole + detection.