此教程以Debian为例:
第一步,重装非商家由民间提供的纯净系统
先在Virmach控制面板,重装Debian 7/8,如果是则不用装,为下面重装民间纯净系统做准备。
参考:https://moeclub.org/2018/04/03/603/
下载脚本
wget --no-check-certificate -qO InstallNET.sh 'http://www.815494.com/html/shell/reinstall/InstallNET.sh' && chmod a+x InstallNET.sh
锐速,重装为 Debian 7 32位
bash InstallNET.sh -d 7 -v 32 -a
BBR,重装为 Debian 8 64位
bash InstallNET.sh -d 8 -v 64 -a
登陆SSH默认密码为:MoeClub.org
说明下,这个装完的系统,会自动添加物理内存两倍的swap虚拟内存,128×2=256
256虚拟内存,足够的了。小内存VPS,还是有必要用swap!
第二步,内核参数优化
1.增加系统文件描述符的最大限数
编辑文件 limits.conf
vi /etc/security/limits.conf
最后新增两行添加命令:
* soft nofile 51200
* hard nofile 51200
如发现limits.conf文件内容已经有,请修改为上。
编辑文件 profile
最后新增一行,添加命令。
vi /etc/profile
ulimit -SHn 51200
修改后重启,检查是否生效命令:
ulimit -n
2.调整内核参数
修改配置文件sysctl.conf
vi /etc/sysctl.conf
最后新增一行添加命令:
fs.file-max = 51200 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 = 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 = 4096 net.ipv4.tcp_max_tw_buckets = 5000 net.ipv4.tcp_fastopen = 3 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 vm.min_free_kbytes = 5120 vm.overcommit_memory = 1 vm.panic_on_oom = 1 vm.swappiness = 80 vm.vfs_cache_pressure = 200
第三步,安装BBR或者锐速
1.暴力BBR
参考:https://github.com/tcp-nanqinlang/wiki/wiki/general
安装:
wget --no-check-certificate http://www.815494.com/html/shell/BBR/tcp_nanqinlang-fool-1.3.0.sh
bash tcp_nanqinlang-fool-1.3.0.sh
2.锐速
参考:https://www.hostloc.com/thread-366983-1-1.html
安装:
wget --no-check-certificate -O appex.sh http://www.815494.com/html/shell/appex.sh && chmod +x appex.sh && bash appex.sh install
锐速优化参数:
编辑文件:
vi /appex/etc/config
initialCwndWan=”65″
shaperEnable=”0″
SmBurstMS=”20″
shortRttMS=”90″
数值修改为上的即可。
重启锐速
/appex/bin/serverSpeeder.sh restart
锐速用户,一定选择,否则会爆。
请选择秋水牌的$$一键脚本:https://teddysun.com/358.html
Debian 或 Ubuntu 下一键安装 libev 版
再精简的话,那就是要卸载
apt-get remove rsyslog>
同时,一定要修改SSH端口。
对于小内存的VPS,我强烈建议装32位的系统。
文章标题:Virmach 128M $$ BBR/锐速,二选一 优化方案
文章链接:https://p1e.cn/html/415.html
更新时间:2021年02月26日
本站大部分内容均收集于网络!若内容若侵犯到您的权益,请发送邮件至:815494#qq.com我们将第一时间处理! 资源所需价格并非资源售卖价格,是收集、整理、编辑详情以及本站运营的适当补贴,并且本站不提供任何免费技术支持。 所有资源仅限于参考和学习,版权归原作者所有。