diff --git a/CHANGELOG.md b/CHANGELOG.md index a31c2c2..0126427 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## v1.15 + +### Changed +* Updated kernel tuning parameters + ## v1.14 ## v1.13 diff --git a/tunnel/funcs.go b/tunnel/funcs.go index 64c9c59..dabc995 100644 --- a/tunnel/funcs.go +++ b/tunnel/funcs.go @@ -253,8 +253,8 @@ func (t *Tunnel) Init(mode, main_network_interface string, dynamic_ip_updater_ap } } - utils.Cmd("tc qdisc replace dev "+t.TunnelInterfaceName+" root fq_codel limit 999999", true, true) - utils.Cmd("ip link set "+t.TunnelInterfaceName+" txqueuelen 999999", true, true) + utils.Cmd("tc qdisc replace dev "+t.TunnelInterfaceName+" root fq limit 99999 flow_limit 99999", true, true) + utils.Cmd("ip link set "+t.TunnelInterfaceName+" txqueuelen 99999", true, true) t.IsInitialised = true diff --git a/utils/tuning.go b/utils/tuning.go index 169a9c4..410aa25 100644 --- a/utils/tuning.go +++ b/utils/tuning.go @@ -31,24 +31,23 @@ func SysTuning(shouldEnableIPIPmod, shouldEnableGREmod, shouldEnableWGmod bool, Cmd("sysctl -w fs.aio-max-nr=2097152", true, true) Cmd("sysctl -w net.ipv4.tcp_syncookies=1", true, true) Cmd("sysctl -w net.core.somaxconn=65535", true, true) - Cmd("sysctl -w net.ipv4.tcp_max_syn_backlog=4096", true, true) - Cmd("sysctl -w net.core.netdev_max_backlog=999999", true, true) - Cmd("sysctl -w net.core.dev_weight=128", true, true) + Cmd("sysctl -w net.ipv4.tcp_max_syn_backlog=65535", true, true) + Cmd("sysctl -w net.core.netdev_max_backlog=99999", true, true) Cmd("sysctl -w net.ipv4.ip_local_port_range=\"16384 65535\"", true, true) Cmd("sysctl -w net.nf_conntrack_max=1000000", true, true) Cmd("sysctl -w net.netfilter.nf_conntrack_max=1000000", true, true) Cmd("sysctl -w net.ipv4.tcp_max_tw_buckets=1440000", true, true) - Cmd("sysctl -w net.ipv4.tcp_congestion_control=cubic", true, true) - Cmd("sysctl -w net.core.default_qdisc=fq_codel", true, true) + Cmd("sysctl -w net.ipv4.tcp_congestion_control=bbr", true, true) + Cmd("sysctl -w net.core.default_qdisc=fq", true, true) Cmd("sysctl -w net.ipv4.tcp_mtu_probing=1", true, true) Cmd("sysctl -w net.ipv4.route.flush=1", true, true) Cmd("sysctl -w net.ipv6.route.flush=1", true, true) - Cmd("modprobe tcp_cubic", true, true) - Cmd("tc qdisc replace dev "+mainNetworkInterface+" root fq_codel limit 999999", true, true) - Cmd("ip link set "+mainNetworkInterface+" txqueuelen 999999", true, true) + Cmd("modprobe tcp_bbr", true, true) + Cmd("tc qdisc replace dev "+mainNetworkInterface+" root fq limit 99999 flow_limit 99999", true, true) + Cmd("ip link set "+mainNetworkInterface+" txqueuelen 99999", true, true) } Cmd("iptables-nft -F", true, true) diff --git a/vars/vars.go b/vars/vars.go index 9855ea0..f292e75 100644 --- a/vars/vars.go +++ b/vars/vars.go @@ -1,6 +1,6 @@ package vars var ConfigFilePath string = "" -var Version string = "1.14" +var Version string = "1.15" var IsRouteAllTrafficThroughTunnelEnabled bool = false