俺的洛杉矶的 Vultr 这么优化 苏州电信这可以看 4K
1.安装锐速:
wget -N --no-check-certificate
https://raw.githubusercontent.com/91yun/serverspeeder/master/serverspeeder-all.sh && bash
serverspeeder-all.sh锐速换内核:
rpm -ivh
http://buildlogs.cdn.centos.org/c7.1511.u/kernel/20161024152721/3.10.0-327.36.3.el7.x86_64/kernel-3.10.0-327.36.3.el7.x86_64.rpm --force
重启:/serverspeeder/bin/
serverSpeeder.sh restart
关闭:/serverspeeder/bin/
serverSpeeder.sh stop
启动:/serverspeeder/bin/
serverSpeeder.sh start
卸载:./
serverSpeederInstaller.sh uninstall
状态查看: service serverSpeeder status
配置文件: vim /serverspeeder/etc/config
2.提高打开文件描述符的最大数量
vim /etc/security/limits.conf
添加这两行,如果不知道添加到哪里,就添加到最上面或者最下面。
* soft nofile 51200
* hard nofile 51200
执行 ulimit -n 51200
3.调整内核参数
vim /etc/sysctl.conf
添加下面这些内容,如果不知道添加到哪里,就添加到最上面或者最下面。
fs.file-max = 51200
net.core.rmem_max = 67108864
net.core.wmem_max = 67108864
net.core.netdev_max_backlog = 250000
net.core.somaxconn = 4096
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 0
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.ip_local_port_range = 10000 65000
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.tcp_max_tw_buckets = 5000
net.ipv4.tcp_fastopen = 3
net.ipv4.tcp_mem = 25600 51200 102400
net.ipv4.tcp_rmem = 4096 87380 67108864
net.ipv4.tcp_wmem = 4096 65536 67108864
net.ipv4.tcp_mtu_probing = 1
net.ipv4.tcp_congestion_control = hybla
执行 sysctl -p
4. 重启 SS 重启锐速