Linux安装bbr并进行调优(调整优化)

编辑/etc/security/limits.conf,添加

soft nofile 51200

hard nofile 51200

编辑/etc/profile,添加

 ulimit -SHn 51200

接着修改配置文件/etc/sysctl.d/local.conf或者/etc/sysctl.conf,添加

# max open files

fs.file-max = 1024000

# max read buffer

net.core.rmem_max = 67108864

# max write buffer

net.core.wmem_max = 67108864

# default read buffer

net.core.rmem_default = 65536

# default write buffer

net.core.wmem_default = 65536

# max processor input queue

net.core.netdev_max_backlog = 4096

# max backlog

net.core.somaxconn = 4096

# resist SYN flood attacks

net.ipv4.tcp_syncookies = 1

# reuse timewait sockets when safe

net.ipv4.tcp_tw_reuse = 1

# turn off fast timewait sockets recycling

net.ipv4.tcp_tw_recycle = 0

# short FIN timeout

net.ipv4.tcp_fin_timeout = 30

# short keepalive time

net.ipv4.tcp_keepalive_time = 1200

# outbound port range

net.ipv4.ip_local_port_range = 10000 65000

# max SYN backlog

net.ipv4.tcp_max_syn_backlog = 4096

# max timewait sockets held by system simultaneously

net.ipv4.tcp_max_tw_buckets = 5000

# TCP receive buffer

net.ipv4.tcp_rmem = 4096 87380 67108864

# TCP write buffer

net.ipv4.tcp_wmem = 4096 65536 67108864

# turn on path MTU discovery

net.ipv4.tcp_mtu_probing = 1

# for high-latency network

net.ipv4.tcp_congestion_control = hybla

# for no NAT network

net.ipv4.tcp_fastopen = 3

# other

vm.min_free_kbytes = 5120

vm.overcommit_memory = 1

vm.panic_on_oom = 1

vm.swappiness = 80

vm.vfs_cache_pressure = 200

保存配置

sysctl -p

检查是否开启了hybla

sysctl net.ipv4.tcp_available_congestion_control

如果没有hybla,开启hybla

modprobe tcp_hybla

安装bbr,

Debian 7以上执行

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

CentOS 6以上执行

wget https://raw.githubusercontent.com/tcp-nanqinlang/general/master/General/CentOS/bash/tcp_nanqinlang-1.3.2.sh

bash tcp_nanqinlang-1.3.2.sh

,根据提示执行1,在执行2,接着重启即可

评论

Popular Posts

高硼硅玻璃水杯

《小狗钱钱》[德] 博多·舍费尔

《怦然心动的人生整理魔法》近藤麻理惠

CuteHttpFileServer/chfs 文件服务器,支持http,webdav,多平台

新概念英语PDF扫描版

5个免费的在线笔记本服务

《睡美人》(美人的色迷/陪睡美人/色迷睡美人) - 澳大利亚剧情大片

《无条件信任的力量》作者:朴钟夏