From eddd6887282c1b5a0fa9b53b13a9b0d98b481f5b Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Thu, 8 Sep 2022 00:53:43 -0500 Subject: [PATCH] Optimize TCP buffers - Improve VPN performance by tuning TCP buffer sizes. - If the Docker container is not running in privileged mode, this has no effect because sysctl settings cannot be changed. You can instead specify it using "--sysctl" when creating the Docker container. --- run.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/run.sh b/run.sh index ba127f8b..b4b4a5b0 100755 --- a/run.sh +++ b/run.sh @@ -537,6 +537,8 @@ $syt net.ipv4.conf.default.send_redirects=0 2>/dev/null $syt net.ipv4.conf.default.rp_filter=0 2>/dev/null $syt "net.ipv4.conf.$NET_IFACE.send_redirects=0" 2>/dev/null $syt "net.ipv4.conf.$NET_IFACE.rp_filter=0" 2>/dev/null +$syt net.ipv4.tcp_rmem="4096 87380 16777216" 2>/dev/null +$syt net.ipv4.tcp_wmem="4096 87380 16777216" 2>/dev/null if modprobe -q tcp_bbr \ && printf '%s\n%s' "4.20" "$(uname -r)" | sort -C -V; then $syt net.ipv4.tcp_congestion_control=bbr 2>/dev/null