From c0a26cbaa2fa554b409547921ab9b5a7ad1c7044 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Thu, 14 May 2020 21:15:12 +0200 Subject: [PATCH] Changes in linux sysctl settings --- shadowsocks-libev/files/shadowsocks.conf | 25 ++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/shadowsocks-libev/files/shadowsocks.conf b/shadowsocks-libev/files/shadowsocks.conf index d6390e2c4..1c4703f5b 100644 --- a/shadowsocks-libev/files/shadowsocks.conf +++ b/shadowsocks-libev/files/shadowsocks.conf @@ -2,14 +2,14 @@ # max open files fs.file-max = 512000 # max read buffer -net.core.rmem_max = 15000000 +net.core.rmem_max = 67108864 # max write buffer -net.core.wmem_max = 7500000 -net.core.optmem_max = 7500000 +net.core.wmem_max = 67108864 +net.core.optmem_max = 33554432 # default read buffer -net.core.rmem_default = 131072 +#net.core.rmem_default = 131072 # default write buffer -net.core.wmem_default = 131072 +#net.core.wmem_default = 131072 # max processor input queue net.core.netdev_max_backlog = 4096 # max backlog @@ -34,13 +34,13 @@ net.ipv4.tcp_max_tw_buckets = 10000 # turn on TCP Fast Open on both client and server side #net.ipv4.tcp_fastopen = 3 # TCP receive buffer -net.ipv4.tcp_rmem = 4096 524288 7500000 +net.ipv4.tcp_rmem = 4096 87380 33554432 # TCP write buffer -net.ipv4.tcp_wmem = 4096 524288 7500000 +net.ipv4.tcp_wmem = 4096 65536 33554432 # TCP buffer -net.ipv4.tcp_mem = 768174 7500000 15000000 +net.ipv4.tcp_mem = 8092 131072 67108864 # UDP buffer -net.ipv4.udp_mem = 768174 75000000 150000000 +net.ipv4.udp_mem = 8092 131072 67108864 # turn off path MTU discovery net.ipv4.tcp_mtu_probing = 0 @@ -48,7 +48,8 @@ net.ipv4.tcp_mtu_probing = 0 # net.ipv4.tcp_congestion_control = balia # Default conntrack is too small -net.netfilter.nf_conntrack_max=131072 +net.netfilter.nf_conntrack_max = 131072 -net.ipv4.tcp_ecn=1 -net.ipv4.tcp_retries2=10 \ No newline at end of file +net.ipv4.tcp_ecn = 1 +net.ipv4.tcp_retries2 = 10 +#net.ipv4.tcp_sack = 0