小内存服务器暴力锐速BBR优化方案

此教程以Debian为例:

第一步,重装非商家由民间提供的纯净系统

先在Virmach控制面板,重装Debian 7/8,如果是则不用装,为下面重装民间纯净系统做准备。
参考:https://moeclub.org/2018/04/03/603/
下载脚本
wget --no-check-certificate -qO InstallNET.sh 'https://moeclub.org/attachment/LinuxShell/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默认密码为:Vicer

说明下,这个装完的系统,会自动添加物理内存两倍的swap虚拟内存,128x2=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 https://github.com/tcp-nanqinlang/general/releases/download/3.4.2.1/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 https://raw.githubusercontent.com/0oVicero0/serverSpeeder_Install/master/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

9 条评论

Stevtafe Stevtafe

Deltasone Side Effects Viagra Vente Quebec cialis 5 mg Viagra 100 Mg Einnehmen Keflex Causing Fatigue Priligy Disfuncion Erectil

回复
Lesinhaws Lesinhaws

5 Mg Cialis Doxycycline 100mg Where To Buy It Cialis Y De zoloft without prescriptiom Nurse Responsibility In Giving Amoxicillin Macrobid Free Doctor Consultation

回复
RandSmele RandSmele

Pharmacology Of Cephalexin When Will Dapoxetine Sera Disponible? viagra vs cialis Buy Viagra In Brisbane 58 Online Pharmacy Using Paypal

回复
Stevtafe Stevtafe

Propecia Once A Week levitra mercado libre Online Secure Bentyl Free Consultation Zithromax Fatigue Side Effect Buy Vigora 100

回复
RandSmele RandSmele

Order Tadacip Online Farmacias Viagra Propecia Cialis Generico Farmacia Europea Priligy Acquisto Sicuro What Does Cialis Taste Like

回复

发表评论

电子邮件地址不会被公开。 必填项已用*标注