Skip to content

Commit

Permalink
Optimize TCP buffers
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
hwdsl2 committed Sep 8, 2022
1 parent 47047d7 commit eddd688
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eddd688

Please sign in to comment.