From: Chris Koeritz Date: Thu, 2 Feb 2017 19:37:23 +0000 (-0500) Subject: sets tcpip buffer sizes X-Git-Tag: 2.140.90~236 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=5b2b4473bd46dc412b11d1372704a2d4ef7d0465;p=feisty_meow.git sets tcpip buffer sizes --- diff --git a/examples/os_related/set_tcp_config.sh b/examples/os_related/set_tcp_config.sh new file mode 100644 index 00000000..7fc3d76e --- /dev/null +++ b/examples/os_related/set_tcp_config.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# this script modifies the linux kernel for maximum tcp buffer size, which can +# improve long-haul transfers over a wan. + +# new maximum buffer size to set. +new_max=4194304 + +echo "net.core.wmem_max=$new_max" >> /etc/sysctl.conf +echo "net.core.rmem_max=$new_max" >> /etc/sysctl.conf + +echo "net.ipv4.tcp_rmem= 10240 87380 $new_max" >> /etc/sysctl.conf +echo "net.ipv4.tcp_wmem= 10240 87380 $new_max" >> /etc/sysctl.conf + +echo "net.ipv4.tcp_window_scaling = 1" >> /etc/sysctl.conf + +echo "net.ipv4.tcp_timestamps = 1" >> /etc/sysctl.conf + +echo "net.ipv4.tcp_sack = 1" >> /etc/sysctl.conf + +echo "net.ipv4.tcp_no_metrics_save = 1" >> /etc/sysctl.conf + +echo "net.core.netdev_max_backlog = 5000" >> /etc/sysctl.conf +