{"id":3804,"date":"2020-03-30T16:17:19","date_gmt":"2020-03-30T08:17:19","guid":{"rendered":"https:\/\/www.baishitou.cn\/?p=3804"},"modified":"2020-03-30T17:18:00","modified_gmt":"2020-03-30T09:18:00","slug":"centos-7%e5%ae%89%e8%a3%85bbr%e5%8a%a0%e9%80%9f","status":"publish","type":"post","link":"https:\/\/www.baishitou.cn\/3804.html","title":{"rendered":"CentOS7\u5b89\u88c5BBR\u52a0\u901f"},"content":{"rendered":"

\"\"<\/a><\/p>\n

Google BBR \u662f\u4e00\u6b3e\u514d\u8d39\u5f00\u6e90\u7684TCP\u62e5\u585e\u63a7\u5236\u4f20\u8f93\u63a7\u5236\u534f\u8bae, \u53ef\u4ee5\u4f7f Linux \u670d\u52a1\u5668\u663e\u8457\u63d0\u9ad8\u541e\u5410\u91cf\u548c\u51cf\u5c11 TCP \u8fde\u63a5\u7684\u5ef6\u8fdf\u3002 \u9879\u76ee\u5730\u5740:https:\/\/github.com\/google\/bbr<\/a><\/p>\n

CentOS\u5f00\u542fBBR<\/strong><\/h2>\n

\u7b2c\u4e00\u6b65\uff1a<\/strong><\/h3>\n

1\u3001yum\u7cfb\u7edf\u66f4\u65b0<\/p>\n

yum update<\/span><\/pre>\n

2\u3001\u67e5\u770b\u7cfb\u7edf\u7248\u672c<\/p>\n

cat <\/span>\/<\/span>etc<\/span>\/<\/span>redhat<\/span>-<\/span>release<\/span><\/pre>\n

\u8f93\u51fa\u5982\u4e0b\u5219\u8868\u793a\u5df2\u5347\u7ea7\u52307.6<\/p>\n

CentOS<\/span> Linux<\/span> release <\/span>7.6<\/span>.<\/span>1810<\/span> (<\/span>Core<\/span>)<\/span><\/pre>\n

3\u3001\u5b89\u88c5elrepo\u5e76\u5347\u7ea7\u5185\u6838<\/p>\n

rpm <\/span>--<\/span>import<\/span> https<\/span>:<\/span>\/\/www.elrepo.org\/RPM-GPG-KEY-elrepo.org<\/span><\/pre>\n
rpm <\/span>-<\/span>Uvh<\/span> http<\/span>:<\/span>\/\/www.elrepo.org\/elrepo-release-7.0-2.el7.elrepo.noarch.rpm<\/span><\/pre>\n
yum <\/span>--<\/span>enablerepo<\/span>=<\/span>elrepo<\/span>-<\/span>kernel install kernel<\/span>-<\/span>ml <\/span>-<\/span>y<\/span><\/pre>\n

4\u3001\u5b89\u88c5\u5b8c\u6210\u540e\u4f7f\u7528\u4e0b\u9762\u547d\u4ee4\u67e5\u770b\u5f53\u524d\u5df2\u5b89\u88c5\u7684\u5185\u6838<\/p>\n

awk <\/span>-<\/span>F\\' <\/span>'$1==\"menuentry \" {print i++ \" : \" $2}'<\/span> \/<\/span>etc<\/span>\/<\/span>grub2<\/span>.<\/span>cfg<\/span><\/pre>\n

\u8fd4\u56de<\/p>\n

0<\/span> :<\/span> CentOS<\/span> Linux<\/span> (<\/span>4.19<\/span>.<\/span>0<\/span>-<\/span>1.el7.elrepo<\/span>.<\/span>x86_64<\/span>)<\/span> 7<\/span> (<\/span>Core<\/span>)<\/span>\r\n1<\/span> :<\/span> CentOS<\/span> Linux<\/span> 7<\/span> Rescue<\/span> ee7953a3b5944053a26f29daf8c71e2f <\/span>(<\/span>3.10<\/span>.<\/span>0<\/span>-<\/span>862.14<\/span>.<\/span>4.el7.x86<\/span>_64<\/span>)<\/span>\r\n2<\/span> :<\/span> CentOS<\/span> Linux<\/span> (<\/span>3.10<\/span>.<\/span>0<\/span>-<\/span>862.14<\/span>.<\/span>4.el7.x86<\/span>_64<\/span>)<\/span> 7<\/span> (<\/span>Core<\/span>)<\/span>\r\n3<\/span> :<\/span> CentOS<\/span> Linux<\/span> (<\/span>3.10<\/span>.<\/span>0<\/span>-<\/span>862.3<\/span>.<\/span>2.el7.x86<\/span>_64<\/span>)<\/span> 7<\/span> (<\/span>Core<\/span>)<\/span>\r\n4<\/span> :<\/span> CentOS<\/span> Linux<\/span> (<\/span>3.10<\/span>.<\/span>0<\/span>-<\/span>862.el7.x86<\/span>_64<\/span>)<\/span> 7<\/span> (<\/span>Core<\/span>)<\/span>\r\n5<\/span> :<\/span> CentOS<\/span> Linux<\/span> (<\/span>0<\/span>-<\/span>rescue<\/span>-<\/span>4bbda2095d924b72b05507b68bd509f0<\/span>)<\/span> 7<\/span> (<\/span>Core<\/span>)<\/span><\/pre>\n

5\u3001\u628aCentOS Linux (4.19.0-1.el7.elrepo.x86_64) 7 (Core)\u5185\u6838\u8bbe\u7f6e\u4e3a\u9ed8\u8ba4<\/p>\n

grub2<\/span>-<\/span>set<\/span>-<\/span>default<\/span> 0<\/span><\/pre>\n

6\u3001\u91cd\u542f\u670d\u52a1\u5668<\/p>\n

reboot<\/span><\/pre>\n

\u7b2c\u4e8c\u6b65\uff1a<\/strong>\u00a0\u8bbe\u7f6eBBR<\/strong><\/h3>\n

1\u3001\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6<\/p>\n

vi <\/span>\/<\/span>etc<\/span>\/<\/span>sysctl<\/span>.<\/span>conf<\/span><\/pre>\n

2\u3001\u6dfb\u52a0\u5982\u4e0b\u5185\u5bb9<\/p>\n

net<\/span>.<\/span>core<\/span>.<\/span>default_qdisc <\/span>=<\/span> fq\r\nnet<\/span>.<\/span>ipv4<\/span>.<\/span>tcp_congestion_control <\/span>=<\/span> bbr<\/span><\/pre>\n

3\u3001\u52a0\u8f7d\u7cfb\u7edf\u53c2\u6570\uff08\u6b63\u5e38\u60c5\u51b5\u4e0b\u4f1a\u8f93\u51fa\u6211\u4eec\u4e4b\u524d\u52a0\u5165\u7684\u5185\u5bb9\uff09<\/p>\n

sysctl <\/span>-<\/span>p <\/span><\/pre>\n

\u7b2c\u4e09\u6b65\uff1a\u9a8c\u8bc1bbr\u662f\u5426\u5df2\u7ecf\u5f00\u542f<\/strong><\/h3>\n

1\u3001\u8f93\u5165<\/p>\n

sysctl net<\/span>.<\/span>ipv4<\/span>.<\/span>tcp_available_congestion_control<\/span><\/pre>\n

\u5982\u679c\u8fd4\u56de<\/p>\n

net<\/span>.<\/span>ipv4<\/span>.<\/span>tcp_available_congestion_control <\/span>=<\/span> reno cubic bbr<\/span><\/pre>\n

\u5219\u5b89\u88c5\u00a0\u6210\u529f<\/p>\n

2\u3001\u8f93\u5165<\/p>\n

lsmod <\/span>|<\/span> grep bbr<\/span><\/pre>\n

\u5982\u679c\u8fd4\u56de<\/p>\n

tcp_bbr                <\/span>20480<\/span>  2<\/span><\/pre>\n

\u5219\u5b89\u88c5\u6210\u529f<\/p>\n","protected":false},"excerpt":{"rendered":"

Google BBR \u662f\u4e00\u6b3e\u514d\u8d39\u5f00\u6e90\u7684TCP\u62e5\u585e\u63a7\u5236\u4f20\u8f93\u63a7\u5236\u534f\u8bae, \u53ef\u4ee5\u4f7f Linux \u670d\u52a1\u5668\u663e\u8457\u63d0\u9ad8\u541e\u5410\u91cf\u548c […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,9],"tags":[1211,1210],"class_list":["post-3804","post","type-post","status-publish","format-standard","hentry","category-vultrvps","category-jiaocheng","tag-bbr","tag-centos-7"],"_links":{"self":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/3804","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/comments?post=3804"}],"version-history":[{"count":0,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/3804\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/media?parent=3804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/categories?post=3804"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/tags?post=3804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}