{"id":266,"date":"2018-03-04T00:00:57","date_gmt":"2018-03-03T16:00:57","guid":{"rendered":"https:\/\/cloudbool.com\/archive\/?p=266"},"modified":"2018-03-04T00:00:57","modified_gmt":"2018-03-03T16:00:57","slug":"centos-7-enable-google-bbr","status":"publish","type":"post","link":"https:\/\/cloudbool.com\/archive\/centos-7-enable-google-bbr.html","title":{"rendered":"CentOS 7 \u7cfb\u7edf\u542f\u7528Google BBR"},"content":{"rendered":"<p>\u6211\u4e2a\u4eba\u5728<a href=\"https:\/\/cloudbool.com\/archive\/go\/digitalocean\">DigitalOcean<\/a>\u3001<a href=\"https:\/\/cloudbool.com\/archive\/go\/vultr\">Vultr<\/a>\u90fd\u6709\u670d\u52a1\u5668\u5728\u8fd0\u884c\uff0c\u6709\u65f6\u5019\u9700\u8981\u5f53\u4f5c\u6d4b\u8bd5\u670d\u52a1\u5668\u6d4b\u8bd5\u3001\u8c03\u6574\u67d0\u4e9b\u670d\u52a1\u7684\u914d\u7f6e\u65f6\uff0c<a href=\"https:\/\/cloudbool.com\/archive\/go\/digitalocean\">DigitalOcean<\/a>\u3001<a href=\"https:\/\/cloudbool.com\/archive\/go\/vultr\">Vultr<\/a>\u8fd9\u79cd\u6309\u91cf\u4ed8\u8d39\uff0c\u5373\u5f00\u5373\u5220\u7684\u670d\u52a1\u975e\u5e38\u5b9e\u7528\uff0c\u6211\u9700\u8981\u6d4b\u8bd5\u7684\u65f6\u5019\uff0c\u53ea\u9700\u8981\u5728\u540e\u53f0\u65b0\u5efa\u4e00\u53f0\uff0c\u9009\u62e9\u7cfb\u7edf\uff0c\u9009\u62e9Region\uff0c\u518d\u8f93\u5165\u4e00\u4e2ahostname\uff0c\u70b9\u51fb\u521b\u5efa\uff0c\u7b49\u4e2a\u4e00\u5206\u949f\u5c31\u80fd\u5efa\u597d\uff0c\u5bf9\u6bd4\u56fd\u5185\u7684\u670d\u52a1\uff0c\u4f53\u9a8c\u7b80\u76f4\u975e\u5e38\u597d\u3002\u4f46\u662f\uff0c\u4e0d\u7ba1\u600e\u4e48\u8bf4\uff0c\u670d\u52a1\u5668\u90fd\u5728\u56fd\u5916\uff0c\u4e0d\u80fd\u8ddf\u56fd\u5185\u7684\u6bd4\uff0c\u518d\u52a0\u4e0a\u7f51\u8def\u98a0\u7c38\uff0c\u901f\u5ea6\u53ef\u80fd\u4e0a\u4e0d\u53bb\uff0c\u5bf9\u6bd4\u9510\u901f\uff0c\u6211\u66f4\u76f8\u4fe1\u51fa\u81eaGoogle\u7684BBR\u3002<br \/>\n<!--more--><br \/>\n\u8bb0\u5f55\u914d\u7f6e\u4e4b\u524d\uff0c\u6211\u5148\u8bf4\u4e00\u53e5\uff0c\u8fd9\u4e9b\u914d\u7f6e\u6211\u53ea\u5728\u6d4b\u8bd5\u670d\u52a1\u5668\u4e0a\u64cd\u4f5c\uff0c\u53c2\u8003\u6211\u8fd9\u4e9b\u6b65\u9aa4\u7684\uff0c\u8bf7\u4e0d\u8981\u5728\u6b63\u5f0f\u73af\u5883\u64cd\u4f5c\uff0c\u6bd5\u7adf\u9009\u62e9CentOS\uff0c\u5f88\u5927\u4e00\u90e8\u5206\u539f\u56e0\u5c31\u662f\u770b\u4e2dCentOS\u7684\u7a33\u5b9a\uff0c\u542f\u7528BBR\u6d89\u53ca\u5230\u66f4\u6362\u5185\u6838\uff0c\u65e2\u7136\u8fde\u5185\u6838\u90fd\u66f4\u6362\u4e86\uff0c\u5bf9\u4e8e\u751f\u4ea7\u670d\u52a1\u5668\u6765\u8bf4\uff0c\u5bf9\u7a33\u5b9a\u6027\u6216\u591a\u6216\u5c11\u90fd\u6709\u5f71\u54cd\u3002<br \/>\n\u67e5\u770b\u5f53\u524d\u5185\u6838\u4fe1\u606f\uff1a<\/p>\n<pre><code>[root@DOAMS3 ~]# uname -r\n3.10.0-693.el7.x86_64\n<\/code><\/pre>\n<p>\u53ef\u4ee5\u770b\u51fa\uff0cCentOS7\u9ed8\u8ba4\u81ea\u5e26\u7684\u5185\u6838\u90fd\u662f3.10.x\uff0c\u8981\u542f\u7528BBR\uff0c\u6211\u4eec\u8981\u66f4\u6362\u62104.9+\u5185\u6838\u7248\u672c\uff0c\u4e0b\u9762\u5f00\u59cb\uff0c\u66f4\u6362\u5185\u6838\u3002<br \/>\n\u542f\u7528<strong><em>elrepo<\/em><\/strong>\u6e90\uff1a<\/p>\n<pre><code>rpm --import https:\/\/www.elrepo.org\/RPM-GPG-KEY-elrepo.org\nrpm -Uvh http:\/\/www.elrepo.org\/elrepo-release-7.0-3.el7.elrepo.noarch.rpm\n<\/code><\/pre>\n<p>\u5b89\u88c5Linux\u4e3b\u7ebf\u7248\u672c\u5185\u6838\uff1a<\/p>\n<pre><code>yum --enablerepo=elrepo-kernel install kernel-ml -y\n<\/code><\/pre>\n<p>\u5b89\u88c5\u4e4b\u540e\uff0c\u67e5\u770b\u5185\u6838\u5217\u8868\uff1a<\/p>\n<blockquote><p>\n  rpm -qa | grep kernel\n<\/p><\/blockquote>\n<p>\u67e5\u770b\u662f\u5426\u67094.9+\u7684\u8f93\u51fa\uff0c\u5982\u679c\u6709\uff0c\u5219\u8bc1\u660e\u5b89\u88c5\u6210\u529f\u4e86\uff1a<\/p>\n<pre><code>[root@DOAMS3 ~]# rpm -qa | grep kernel\nkernel-3.10.0-693.el7.x86_64\nkernel-tools-libs-3.10.0-693.5.2.el7.x86_64\nkernel-3.10.0-693.5.2.el7.x86_64\nkernel-tools-3.10.0-693.5.2.el7.x86_64\nkernel-ml-4.13.11-1.el7.elrepo.x86_64\n<\/code><\/pre>\n<p>\u6211\u8fd9\u91cc\u662f\u6700\u540e\u4ee5\u540e\u5c31\u662f\u521a\u5b89\u88c5\u7684\u65b0\u5185\u6838\u3002<br \/>\n\u67e5\u770b\u6240\u6709\u53ef\u5f15\u5bfc\u7684\u5185\u6838\u5217\u8868\uff1a<\/p>\n<pre><code>[root@DOAMS3 ~]# egrep ^menuentry \/etc\/grub2.cfg | cut -f 2 -d \\'\nCentOS Linux (4.13.11-1.el7.elrepo.x86_64) 7 (Core)\nCentOS Linux 7 Rescue 6546b7b4c5c34716a6344417a6bffac6 (3.10.0-693.5.2.el7.x86_64)\nCentOS Linux (3.10.0-693.5.2.el7.x86_64) 7 (Core)\nCentOS Linux (3.10.0-693.el7.x86_64) 7 (Core)\nCentOS Linux (0-rescue-d1f142097d497f24c021d7de9b81cab4) 7 (Core)\n<\/code><\/pre>\n<p>\u770b\u8f93\u51fa\u7ed3\u679c\uff0c\u7b2c\u4e00\u4e2a\u5c31\u662f\u521a\u5b89\u88c5\u7684\uff0c\u5c06\u5176\u8bbe\u7f6e\u4e3a\u9ed8\u8ba4\u542f\u52a8\u5185\u6838\u5c31\u597d\u4e86\uff1a<\/p>\n<blockquote><p>\n  grub2-set-default 0\n<\/p><\/blockquote>\n<p>\u6ce8\u610f\uff0c\u4e0a\u9762\u6700\u540e\u4e00\u4e2a0\u662f4.9+\u5185\u6838\u6240\u5728\u7684\u4f4d\u7f6e\uff0c\u4ece0\u5f00\u59cb\u6570\uff0c\u7b2c\u4e00\u4e2a\u5c31\u662f0\uff0c\u7b2c\u4e8c\u4e2a\u662f1\uff0c\u4ee5\u6b64\u7c7b\u63a8\u5c31\u597d\u4e86\u3002<br \/>\n\u8bbe\u7f6e\u5b8c\u4e4b\u540e\uff0c\u91cd\u542f\u7cfb\u7edf\uff1a<\/p>\n<blockquote><p>\n  reboot\n<\/p><\/blockquote>\n<p>\u91cd\u65b0\u767b\u9646\u670d\u52a1\u5668\uff0c\u67e5\u770b\u5f53\u524d\u4f7f\u7528\u7684\u5185\u6838\u4fe1\u606f\uff1a<\/p>\n<pre><code>[root@doams3 ~]# uname -r\n4.13.11-1.el7.elrepo.x86_64\n<\/code><\/pre>\n<p>\u53ef\u4ee5\u770b\u51fa\uff0c\u5df2\u7ecf\u662f4.13.x\u5185\u6838\u4e86\uff0c\u7b26\u5408\u542f\u7528BBR\u7684\u8981\u6c42\uff0c\u63a5\u4e0b\u6765\u5c31\u662f\u542f\u7528BBR\u4e86\u3002<br \/>\n\u8f93\u5165\u4ee5\u4e0b\u51e0\u884c\u547d\u4ee4\uff0c\u8ba9BBR\u751f\u6548\uff1a<\/p>\n<pre><code>echo \"net.core.default_qdisc=fq\" &gt;&gt; \/etc\/sysctl.conf\necho \"net.ipv4.tcp_congestion_control=bbr\" &gt;&gt; \/etc\/sysctl.conf\nsysctl -p\n<\/code><\/pre>\n<p>\u67e5\u770b\u7ed3\u679c\uff1a<\/p>\n<pre><code>sysctl -n net.ipv4.tcp_congestion_control\nlsmod | grep bbr\n<\/code><\/pre>\n<p>\u5982\u679c\u4e24\u884c\u547d\u4ee4\u90fd\u6709BBR\u5b57\u6837\u8f93\u51fa\uff0c\u5219\u4ee3\u8868BBR\u542f\u7528\u6210\u529f\u3002\u53ef\u4ee5\u7528Nginx\u4e0b\u8f7d\u4e2a\u6587\u4ef6\u4f53\u9a8c\u4e00\u4e0bBBR\u5e26\u6765\u7684\u52a0\u901f\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u4e2a\u4eba\u5728DigitalOcean\u3001Vultr\u90fd\u6709\u670d\u52a1\u5668\u5728\u8fd0\u884c\uff0c\u6709\u65f6\u5019\u9700\u8981\u5f53\u4f5c\u6d4b\u8bd5\u670d\u52a1\u5668\u6d4b\u8bd5\u3001\u8c03\u6574\u67d0\u4e9b\u670d\u52a1\u7684\u914d\u7f6e &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/cloudbool.com\/archive\/centos-7-enable-google-bbr.html\"> <span class=\"screen-reader-text\">CentOS 7 \u7cfb\u7edf\u542f\u7528Google BBR<\/span> \u67e5\u770b\u5168\u6587 &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"footnotes":""},"categories":[182],"tags":[143,17],"class_list":["post-266","post","type-post","status-publish","format-standard","hentry","category-linux","tag-bbr","tag-centos"],"_links":{"self":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/posts\/266","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/comments?post=266"}],"version-history":[{"count":0,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/posts\/266\/revisions"}],"wp:attachment":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/media?parent=266"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/categories?post=266"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/tags?post=266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}