====== Optimizations ======
==== Install TCP optimization Kernal ====
wget -N "https://github.000060000.xyz/tcpx.sh" && chmod +x tcpx.sh && ./tcpx.sh
Select 3 to install lotServer Kernal
List all installed Kernals
dpkg -l|grep linux-image
Just keep "linux-image-4.9.0-4-amd64" and remove others:
apt purge linux-image-4.9.0-7-amd64
Update boots and restart
update-grub
reboot
Select 14 to install lotServer module.
Check
/appex/bin/lotServer.sh status
If lotServer is not installed for your interface, then modify "startlotserver" part in the tcpx.sh:
Replace
https://github.com/xidcn/LotServer_Vicer/raw/master/Install.sh
with
https://github.com/maxduke/LotServer_Vicer/raw/master/Install.sh
Config lotServer:
https://www.gigsgigscloud.com/cn/tutorials/article/serverspeederlotserver-peizhi/
==== sysctl.conf ====
# TCP Fast Open
net.ipv4.tcp_fastopen=3
# Disable ipv6
net.ipv6.conf.all.disable_ipv6 = 1
# forward ipv4
net.ipv4.ip_forward=1
# TCP method
net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr
# others
fs.file-max = 2097152
vm.swappiness = 10
#net.core.rmem_max = 67108864
#net.core.wmem_max = 67108864
#net.core.rmem_default = 65536
#net.core.wmem_default = 65536
#net.core.netdev_max_backlog = 4096
net.core.somaxconn = 32768
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 0
sysctl -p
==== Prefer IPv4 over ipv6 ====
echo "precedence ::ffff:0:0/96 100">>/etc/gai.conf
==== Config DNS ====
cat </etc/dhcp/dhclient-enter-hooks.d/nodnsupdate
#!/bin/sh
make_resolv_conf(){
:
}
EOF
chmod +x /etc/dhcp/dhclient-enter-hooks.d/nodnsupdate
Reboot and modify /etc/resolv.conf