Google BBR就是谷歌公司提出的一个开源TCP拥塞控制的算法。在最新的linux 4.9及以上的内核版本中已被采用。
第一步:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
$ cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) $ uname -r 3.10.0-957.1.3.el7.x86_64 $ sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org $ sudo rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm $ rpm -qa | grep kernel kernel-tools-3.10.0-957.1.3.el7.x86_64 kernel-3.10.0-957.1.3.el7.x86_64 kernel-3.10.0-957.el7.x86_64 kernel-headers-3.10.0-957.1.3.el7.x86_64 kernel-tools-libs-3.10.0-957.1.3.el7.x86_64 kernel-ml-4.20.0-1.el7.elrepo.x86_64 $ sudo egrep ^menuentry /etc/grub2.cfg | cut -f 2 -d \' CentOS Linux 7 Rescue c51a67211d3c49fbb918a9b014f4423c (4.20.0-1.el7.elrepo.x86_64) CentOS Linux (4.20.0-1.el7.elrepo.x86_64) 7 (Core) CentOS Linux (3.10.0-957.1.3.el7.x86_64) 7 (Core) CentOS Linux (3.10.0-957.el7.x86_64) 7 (Core) CentOS Linux (0-rescue-84d6e1c3c43d427ab345edad898ac223) 7 (Core) $ sudo grub2-set-default 0 $ sudo shutdown -r now |
第二步:
0 1 2 3 4 5 |
$ echo 'net.core.default_qdisc=fq' | sudo tee -a /etc/sysctl.conf $ echo 'net.ipv4.tcp_congestion_control=bbr' | sudo tee -a /etc/sysctl.conf $ sudo sysctl -p $ sudo sysctl net.ipv4.tcp_available_congestion_control #net.ipv4.tcp_available_congestion_control = bbr cubic reno $ sudo sysctl -n net.ipv4.tcp_congestion_control #bbr $ lsmod | grep bbr #tcp_bbr 20480 3 |
申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!