{"id":118,"date":"2019-10-31T17:38:32","date_gmt":"2019-10-31T09:38:32","guid":{"rendered":"http:\/\/blog.kingsbestone.com\/?p=118"},"modified":"2020-03-30T12:27:09","modified_gmt":"2020-03-30T04:27:09","slug":"%e5%ae%89%e8%a3%85tcp_bbr%e5%8a%a0%e9%80%9f%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%bd%91%e7%bb%9c%ef%bc%81","status":"publish","type":"post","link":"https:\/\/blog.kingsbestone.com\/?p=118","title":{"rendered":"\u5b89\u88c5\u52a0\u901f\u5668TCP_BBR"},"content":{"rendered":"<h2><span style=\"font-family: 'comic sans ms', sans-serif;\">\u524d\u8a00\uff1a<\/span><\/h2>\n<p><span style=\"font-family: 'comic sans ms', sans-serif;\">\u5b89\u88c5TCP_BBR\u670d\u52a1\u53ef\u4ee5\u6539\u5584\u670d\u52a1\u5668\u7f51\u901f\uff0c\u7279\u522b\u662f\u8d2d\u4e70\u4e86\u6d77\u5916\u670d\u52a1\u5668\u540e\uff0c\u6211\u662f\u5efa\u8bae\u90fd\u88c5\u4e00\u4e2a\uff0c\u66b4\u529b\u52a0\u901f\u8f6f\u4ef6\uff0c\u57fa\u672c\u4e0a\u56fd\u4eba\u7559\u5b66\u5fc5\u5907\u5440\uff01\u9274\u5b9a\u4e8e\u80fd\u529b\u7684\u4e0d\u540c\uff0c\u6211\u5199\u4fe9\u4e2a\u5b89\u88c5\u65b9\u6cd5\u5427\uff0c\u539f\u7406\u4e0a\u90fd\u4e00\u6837\uff0c\u53ea\u662f\u4e00\u4e2a\u66f4\u4e3a\u50bb\u74dc\u5316\uff0c\u7b80\u5355\u5316\uff0c\u79f0\u4e4b\u4e3a\u4e00\u952e\u811a\u672c\uff01\u53e6\u4e00\u79cd\u4e3a\u624b\u52a8\u5b89\u88c5\uff01<\/span><\/p>\n<h2><span style=\"font-family: 'comic sans ms', sans-serif;\">\u6b63\u6587\uff1a<\/span><\/h2>\n<p><span style=\"font-family: 'comic sans ms', sans-serif;\">\u652f\u6301\u7cfb\u7edf\uff1aLinux\u00a0 Centos6\u00a0 \/\u00a0 Centos7<\/span><\/p>\n<p><span style=\"font-family: 'comic sans ms', sans-serif;\">\u5176\u4ed6\u7cfb\u7edf\u5747\u672a\u6d4b\u8bd5\uff01\u8bf7\u81ea\u884c\u63a2\u7d22\u4e8e\u5b9e\u9a8c\uff01<\/span><\/p>\n<h3><span style=\"font-family: 'comic sans ms', sans-serif;\">\u4e00\u952e\u811a\u672c\u5b89\u88c5\u547d\u4ee4\uff1a<\/span><\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">wget -N --no-check-certificate https:\/\/github.com\/teddysun\/across\/raw\/master\/bbr.sh &amp;&amp; chmod +x bbr.sh &amp;&amp; bash bbr.sh<\/span><\/pre>\n<p><span style=\"font-family: 'comic sans ms', sans-serif;\">\u67e5\u770b\u662f\u5426\u5f00\u542fBBR\u547d\u4ee4\uff1a<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">lsmod | grep bbr<\/span><\/pre>\n<p><span style=\"color: #ff0000; font-family: 'comic sans ms', sans-serif;\">Tip\uff1a\u5982\u679c\u6709\u8fd4\u56de\u503c\u663e\u793abbr\u7b49\u5b57\u6837\u65f6\uff0c\u8bf4\u660e\u5f00\u542f\u6210\u529f\uff01<\/span><\/p>\n<h3><span style=\"font-family: 'comic sans ms', sans-serif;\">\u624b\u52a8\u5b89\u88c5TCP_BBR:<\/span><\/h3>\n<p><span style=\"font-family: 'comic sans ms', sans-serif;\">\u5728\u5b89\u88c5BBR\u524d\u9700\u8981\u624b\u52a8\u5347\u7ea7Centos\u7684\u5185\u6838\uff01<\/span><\/p>\n<h4><span style=\"font-family: 'comic sans ms', sans-serif;\">\u5347\u7ea7Centos\u5185\u6838\u547d\u4ee4\uff1a<\/span><\/h4>\n<p><span style=\"font-family: 'comic sans ms', sans-serif;\">\u67e5\u770bCentos\u5185\u6838\u7248\u672c\u547d\u4ee4\uff1a<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">lsmod | grep bbr<\/span><\/pre>\n<p><span style=\"font-family: 'comic sans ms', sans-serif;\">\u83b7\u53d6\u5185\u6838\u6e90\u6587\u4ef6\u5e76\u5b89\u88c5\u547d\u4ee4\u96c6\uff1a<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">rpm --import https:\/\/www.elrepo.org\/RPM-GPG-KEY-elrepo.org\r\nrpm -Uvh http:\/\/www.elrepo.org\/elrepo-release-7.0-2.el7.elrepo.noarch.rpm\r\nyum --disablerepo=\"*\" --enablerepo=\"elrepo-kernel\" list available\r\nyum --enablerepo=elrepo-kernel install kernel-ml<\/span><\/pre>\n<p><span style=\"font-family: 'comic sans ms', sans-serif;\">\u8bbe\u7f6e\u91cd\u65b0\u542f\u52a8\u4e0d\u66f4\u6539\u56de\u539f\u6765\u7684\u5185\u6838\u7248\u672c\u547d\u4ee4\uff1a<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">vi \/etc\/default\/grub<\/span><\/pre>\n<table style=\"border-collapse: collapse; width: 99.4194%; height: 180px;\" border=\"1\">\n<tbody>\n<tr style=\"height: 24px;\">\n<td style=\"width: 50%; height: 24px;\"><span style=\"font-family: 'comic sans ms', sans-serif;\">\u5149\u6807\u63a7\u5236<\/span><\/td>\n<td style=\"width: 50%; height: 24px;\"><span style=\"font-family: 'comic sans ms', sans-serif;\">\u4e0a\u4e0b\u5de6\u53f3\u65b9\u5411\u952e<\/span><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 50%; height: 24px;\"><span style=\"font-family: 'comic sans ms', sans-serif;\">\u7f16\u8f91\u6a21\u5f0f<\/span><\/td>\n<td style=\"width: 50%; height: 24px;\"><span style=\"font-family: 'comic sans ms', sans-serif;\">i \u952e<\/span><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 50%; height: 24px;\"><span style=\"font-family: 'comic sans ms', sans-serif;\">\u9000\u51fa\u7f16\u8f91\u6a21\u5f0f<\/span><\/td>\n<td style=\"width: 50%; height: 24px;\"><span style=\"font-family: 'comic sans ms', sans-serif;\">ESC\u952e<\/span><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 50%; height: 24px;\"><span style=\"font-family: 'comic sans ms', sans-serif;\">\u4fdd\u5b58\u5e76\u9000\u51faVI\u754c\u9762<\/span><\/td>\n<td style=\"width: 50%; height: 24px;\"><span style=\"font-family: 'comic sans ms', sans-serif;\">:wq \u56de\u8f66\u952e\u786e\u8ba4\u9000\u51fa<\/span><\/td>\n<\/tr>\n<tr style=\"height: 10px;\">\n<td style=\"width: 50%; height: 10px;\"><span style=\"font-family: 'comic sans ms', sans-serif;\">\u6ce8\u610f\u4e8b\u9879\uff1a<\/span><\/td>\n<td style=\"width: 50%; height: 10px;\"><span style=\"font-family: 'comic sans ms', sans-serif;\">\u4e00\u5b9a\u8981\u5207\u6362\u8f93\u5165\u6cd5\u6a21\u5f0f\u4e3a\u82f1\u6587\u8f93\u5165\u6cd5\uff0c\u7136\u540e\u518d\u8fdb\u884c\u64cd\u4f5c\uff01<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-family: 'comic sans ms', sans-serif;\">\u8fdb\u5165\u754c\u9762\u663e\u793a\u5982\u4e0b\u547d\u4ee4\uff08centos7\u4e3a\u4f8b\uff09\uff1a<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">GRUB_TIMEOUT=5\r\nGRUB_TIMEOUT=5\r\nGRUB_DISTRIBUTOR=\"$(sed 's, release .*$,,g' \/etc\/system-release)\"\r\n\r\nGRUB_DEFAULT=saved                      #\u628a\u8fd9\u4e00\u884c\u547d\u4ee4\u7684\u503c\u4fee\u6539\u4e3a\uff1aGRUB_DEFAULT=0\r\n\r\nGRUB_DISABLE_SUBMENU=true\r\nGRUB_TERMINAL_OUTPUT=\"console\"\r\nGRUB_CMDLINE_LINUX=\"vconsole.keymap=us crashkernel=auto  vconsole.font=latarcyrheb-sun16 rhgb quiet\"\r\nGRUB_DISABLE_RECOVERY=\"true\"<\/span><\/pre>\n<p><span style=\"font-family: 'comic sans ms', sans-serif;\">\u7f16\u8f91\u9875\u9762\u5982\u4e0a\u6240\u793a\uff01\u8bf7\u6309\u6761\u4ef6\u7f16\u8f91\uff01<\/span><\/p>\n<p><span style=\"font-family: 'comic sans ms', sans-serif;\">\u7f16\u8f91\u5b8c\u6210\u540e\u518d\u8f93\u5165\u6b64\u547d\u4ee4\uff1a<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">grub2-mkconfig -o \/boot\/grub2\/grub.cfg<\/span><\/pre>\n<p><span style=\"font-family: 'comic sans ms', sans-serif;\">\u7136\u540e\u91cd\u65b0\u542f\u52a8VPS\u670d\u52a1\u5668\uff1a<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">reboot<\/span><\/pre>\n<p><span style=\"font-family: 'comic sans ms', sans-serif;\">\u6b64\u65f6\uff0c\u81ea\u5df1\u7684SSH\u547d\u4ee4\u7a97\u53e3\u4f1a\u65ad\u5f00\u94fe\u63a5\uff08\u522b\u4e00\u60ca\u4e00\u4e4d\u7684\uff0c\u611f\u89c9\u81ea\u5df1\u64cd\u4f5c\u6b7b\u670d\u52a1\u5668\u4e86\uff09\uff0c\u8010\u5fc3\u7b49\u5f851-5min\uff0c\u7136\u540e\u91cd\u65b0\u8fde\u63a5\u670d\u52a1\u5668\uff01<\/span><\/p>\n<p><span style=\"font-family: 'comic sans ms', sans-serif;\">\u8f93\u5165\u547d\u4ee4\u67e5\u770b\u5185\u6838\u662f\u5426\u4e3a\u6700\u65b0\u7684\u7248\u672c\uff1a<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">uname -r<\/span><\/pre>\n<p><span style=\"font-family: 'comic sans ms', sans-serif;\">\u5982\u679c\u8fd4\u56de\u503c\u4e3a\u6700\u65b0\u7248\u672c\uff0c\u5219\u8bc1\u660e\u5347\u7ea7\u6210\u529f\uff0c\u5982\u679c\u6ca1\u5347\u7ea7\u6210\u529f\uff0c\u5c31\u91cd\u65b0\u88c5\u5427\uff01<\/span><\/p>\n<h4><span style=\"font-family: 'comic sans ms', sans-serif;\">\u5b89\u88c5TCP_BBR:<\/span><\/h4>\n<p><span style=\"font-family: 'comic sans ms', sans-serif;\">\u5728\u5b89\u88c5\u4e4b\u524d\u786e\u8ba4\u4e00\u4e0b\uff0c\u670d\u52a1\u5668\u662f\u5426\u5df2\u7ecf\u5b89\u88c5\u8fc7BBR\u4e86\uff0c\u907f\u514d\u91cd\u65b0\u9020\u7089\u5b50\uff01<\/span><\/p>\n<p><span style=\"font-family: 'comic sans ms', sans-serif;\">\u67e5\u770bBBR\u72b6\u6001\uff1a<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">lsmod | grep bbr<\/span><\/pre>\n<p><span style=\"font-family: 'comic sans ms', sans-serif;\">\u5982\u679c\u8fd4\u56de\u503c\u6709bbr\u7b49\u5b57\u6837\u8bf4\u660e\u5df2\u7ecf\u5b89\u88c5\u8fc7bbr\uff0c\u5219\u65e0\u9700\u5b89\u88c5\u4e86\uff0c\u76f4\u63a5\u4f7f\u7528\u5373\u53ef\uff01\u5982\u679c\u6ca1\u6709\u5219\u53ef\u4ee5\u7ee7\u7eed\u914d\u7f6ebbr\u3002<\/span><\/p>\n<p><span style=\"font-family: 'comic sans ms', sans-serif;\">\u914d\u7f6ebbr\u547d\u4ee4\u96c6\uff1a<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">modprobe tcp_bbr\r\necho \"tcp_bbr\" &gt;&gt; \/etc\/modules-load.d\/modules.conf\r\necho \"net.core.default_qdisc=fq\" &gt;&gt; \/etc\/sysctl.conf\r\necho \"net.ipv4.tcp_congestion_control=bbr\" &gt;&gt; \/etc\/sysctl.conf\r\nsysctl -p<\/span><\/pre>\n<p><span style=\"font-family: 'comic sans ms', sans-serif;\">\u7136\u540e\u518d\u8fd0\u884c\u5982\u4e0b\u547d\u4ee4\u8fdb\u884c\u67e5\u770b\uff1a<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">sysctl net.ipv4.tcp_available_congestion_control<\/span><\/pre>\n<p><span style=\"font-family: 'comic sans ms', sans-serif;\">\u5982\u679c\u8fd4\u56de\u503c\u6709bbr\u7b49\u5b57\u6837\u8bf4\u660e\u6b63\u5e38\uff01<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">sysctl net.ipv4.tcp_congestion_control<\/span><\/pre>\n<p><span style=\"font-family: 'comic sans ms', sans-serif;\">\u5982\u679c\u8fd4\u56de\u503c\u6709bbr\u7b49\u5b57\u6837\u8bf4\u660e\u6b63\u5e38\uff01<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">lsmod | grep bbr<\/span><\/pre>\n<p><span style=\"font-family: 'comic sans ms', sans-serif;\">\u5982\u679c\u8fd4\u56de\u503c\u6709bbr\u7b49\u5b57\u6837\u8bf4\u660e\u6b63\u5e38\uff01<\/span><\/p>\n<p><span style=\"font-family: 'comic sans ms', sans-serif;\">\u6b64\u65f6\u624b\u52a8\u5b89\u88c5BBR\u5df2\u7ecf\u5b8c\u6210\uff01<\/span><\/p>\n<h1 style=\"text-align: center;\"><span style=\"font-family: 'comic sans ms', sans-serif;\">\u539f\u521b\u6587\u7ae0<\/span><\/h1>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00\uff1a \u5b89\u88c5TCP_BBR\u670d\u52a1\u53ef\u4ee5\u6539\u5584\u670d\u52a1\u5668\u7f51\u901f\uff0c\u7279\u522b\u662f\u8d2d\u4e70\u4e86\u6d77\u5916\u670d\u52a1\u5668\u540e\uff0c\u6211\u662f\u5efa\u8bae\u90fd\u88c5\u4e00\u4e2a\uff0c\u66b4\u529b\u52a0\u901f\u8f6f\u4ef6\uff0c\u57fa\u672c\u4e0a\u56fd\u4eba\u7559\u5b66\u5fc5\u5907\u5440\uff01\u9274\u5b9a\u4e8e\u80fd\u529b\u7684\u4e0d\u540c\uff0c\u6211\u5199\u4fe9\u4e2a\u5b89\u88c5\u65b9\u6cd5\u5427\uff0c\u539f\u7406\u4e0a\u90fd\u4e00\u6837\uff0c\u53ea\u662f\u4e00\u4e2a\u66f4\u4e3a\u50bb\u74dc\u5316\uff0c\u7b80\u5355\u5316\uff0c\u79f0\u4e4b\u4e3a\u4e00\u952e\u811a\u672c\uff01\u53e6\u4e00\u79cd\u4e3a\u624b\u52a8\u5b89\u88c5\uff01 \u6b63\u6587\uff1a \u652f\u6301\u7cfb\u7edf\uff1aLinux\u00a0 Centos6\u00a0 \/\u00a0 Centos7 \u5176 &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"\u5b89\u88c5\u52a0\u901f\u5668TCP_BBR\" class=\"read-more button\" href=\"https:\/\/blog.kingsbestone.com\/?p=118#more-118\" aria-label=\"\u66f4\u591a \u5b89\u88c5\u52a0\u901f\u5668TCP_BBR\">\u67e5\u770b\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":212,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5,4],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.kingsbestone.com\/index.php?rest_route=\/wp\/v2\/posts\/118"}],"collection":[{"href":"https:\/\/blog.kingsbestone.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.kingsbestone.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.kingsbestone.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.kingsbestone.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=118"}],"version-history":[{"count":32,"href":"https:\/\/blog.kingsbestone.com\/index.php?rest_route=\/wp\/v2\/posts\/118\/revisions"}],"predecessor-version":[{"id":600,"href":"https:\/\/blog.kingsbestone.com\/index.php?rest_route=\/wp\/v2\/posts\/118\/revisions\/600"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.kingsbestone.com\/index.php?rest_route=\/wp\/v2\/media\/212"}],"wp:attachment":[{"href":"https:\/\/blog.kingsbestone.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.kingsbestone.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.kingsbestone.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}