{"id":153,"date":"2017-10-30T13:23:51","date_gmt":"2017-10-30T05:23:51","guid":{"rendered":"https:\/\/wp.yaanren.win\/?p=153"},"modified":"2017-10-30T13:23:51","modified_gmt":"2017-10-30T05:23:51","slug":"%e4%b8%80%e9%94%ae%e5%ae%89%e8%a3%85%e6%9c%80%e6%96%b0%e5%86%85%e6%a0%b8%e5%b9%b6%e5%bc%80%e5%90%af-bbr-%e8%84%9a%e6%9c%ac","status":"publish","type":"post","link":"https:\/\/wp.625300.xyz\/?p=153","title":{"rendered":"\u4e00\u952e\u5b89\u88c5\u6700\u65b0\u5185\u6838\u5e76\u5f00\u542f BBR \u811a\u672c"},"content":{"rendered":"<header class=\"article-header\">\n<div class=\"meta\"><\/div>\n<\/header>\n<article class=\"article-content\"><a href=\"https:\/\/teddysun.com\/489.html\"><img decoding=\"async\" class=\"aligncenter\" title=\"\u4e00\u952e\u5b89\u88c5\u6700\u65b0\u5185\u6838\u5e76\u5f00\u542f BBR \u811a\u672c\" src=\"https:\/\/teddysun.com\/wp-content\/uploads\/2016\/bbr.jpg\" \/><\/a><\/p>\n<p>\u6700\u8fd1\uff0cGoogle \u5f00\u6e90\u4e86\u5176 TCP BBR \u62e5\u585e\u63a7\u5236\u7b97\u6cd5\uff0c\u5e76\u63d0\u4ea4\u5230\u4e86 Linux \u5185\u6838\uff0c\u4ece 4.9 \u5f00\u59cb\uff0cLinux \u5185\u6838\u5df2\u7ecf\u7528\u4e0a\u4e86\u8be5\u7b97\u6cd5\u3002\u6839\u636e\u4ee5\u5f80\u7684\u4f20\u7edf\uff0cGoogle \u603b\u662f\u5148\u5728\u81ea\u5bb6\u7684\u751f\u4ea7\u73af\u5883\u4e0a\u7ebf\u8fd0\u7528\u540e\uff0c\u624d\u4f1a\u5c06\u4ee3\u7801\u5f00\u6e90\uff0c\u6b64\u6b21\u4e5f\u4e0d\u4f8b\u5916\u3002<br \/>\n\u6839\u636e\u5b9e\u5730\u6d4b\u8bd5\uff0c\u5728\u90e8\u7f72\u4e86\u6700\u65b0\u7248\u5185\u6838\u5e76\u5f00\u542f\u4e86 TCP BBR \u7684\u673a\u5668\u4e0a\uff0c\u7f51\u901f\u751a\u81f3\u53ef\u4ee5\u63d0\u5347\u597d\u51e0\u4e2a\u6570\u91cf\u7ea7\u3002<br \/>\n\u4e8e\u662f\u6211\u6839\u636e\u76ee\u524d\u4e09\u5927\u53d1\u884c\u7248\u7684\u6700\u65b0\u5185\u6838\uff0c\u5f00\u53d1\u4e86\u4e00\u952e\u5b89\u88c5\u6700\u65b0\u5185\u6838\u5e76\u5f00\u542f TCP BBR \u811a\u672c\u3002<\/p>\n<h2>\u672c\u811a\u672c\u9002\u7528\u73af\u5883<\/h2>\n<p>\u7cfb\u7edf\u652f\u6301\uff1aCentOS 6+\uff0cDebian 7+\uff0cUbuntu 12+<br \/>\n\u865a\u62df\u6280\u672f\uff1aOpenVZ \u4ee5\u5916\u7684\uff0c\u6bd4\u5982 KVM\u3001Xen\u3001VMware \u7b49<br \/>\n\u5185\u5b58\u8981\u6c42\uff1a\u2265128M<br \/>\n\u65e5\u671f\u3000\u3000\uff1a2017 \u5e74 10 \u6708 28 \u65e5<\/p>\n<h3>\u5173\u4e8e\u672c\u811a\u672c<\/h3>\n<p>1\u3001\u672c\u811a\u672c\u5df2\u5728\u00a0<a href=\"https:\/\/teddysun.com\/t\/vultr\" target=\"_blank\" rel=\"noopener\"><b>Vultr<\/b><\/a>\u00a0\u4e0a\u7684 VPS \u5168\u90e8\u6d4b\u8bd5\u901a\u8fc7\u3002<br \/>\n2\u3001\u5f53\u811a\u672c\u68c0\u6d4b\u5230 VPS \u7684\u865a\u62df\u65b9\u5f0f\u4e3a OpenVZ \u65f6\uff0c\u4f1a\u63d0\u793a\u9519\u8bef\uff0c\u5e76\u81ea\u52a8\u9000\u51fa\u5b89\u88c5\u3002<br \/>\n3\u3001\u811a\u672c\u8fd0\u884c\u5b8c\u91cd\u542f\u53d1\u73b0\u5f00\u4e0d\u4e86\u673a\u7684\uff0c\u6253\u5f00 VPS \u540e\u53f0\u63a7\u5236\u9762\u677f\u7684 VNC, \u5f00\u673a\u5361\u5728 grub \u5f15\u5bfc, \u624b\u52a8\u9009\u62e9\u5185\u6838\u5373\u53ef\u3002<br \/>\n4\u3001\u7531\u4e8e\u662f\u4f7f\u7528\u6700\u65b0\u7248\u7cfb\u7edf\u5185\u6838\uff0c\u6700\u597d\u8bf7\u52ff\u5728\u751f\u4ea7\u73af\u5883\u5b89\u88c5\uff0c\u4ee5\u514d\u4ea7\u751f\u4e0d\u53ef\u9884\u6d4b\u4e4b\u540e\u679c\u3002<\/p>\n<h3>\u4f7f\u7528\u65b9\u6cd5<\/h3>\n<p>\u4f7f\u7528root\u7528\u6237\u767b\u5f55\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre class=\"prettyprint lang-bsh\">wget --no-check-certificate https:\/\/github.com\/teddysun\/across\/raw\/master\/bbr.sh\nchmod +x bbr.sh\n.\/bbr.sh<\/pre>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u811a\u672c\u4f1a\u63d0\u793a\u9700\u8981\u91cd\u542f VPS\uff0c\u8f93\u5165 y \u5e76\u56de\u8f66\u540e\u91cd\u542f\u3002<br \/>\n\u91cd\u542f\u5b8c\u6210\u540e\uff0c\u8fdb\u5165 VPS\uff0c\u9a8c\u8bc1\u4e00\u4e0b\u662f\u5426\u6210\u529f\u5b89\u88c5\u6700\u65b0\u5185\u6838\u5e76\u5f00\u542f TCP BBR\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre class=\"prettyprint lang-bsh\">uname -r<\/pre>\n<p>\u67e5\u770b\u5185\u6838\u7248\u672c\uff0c\u542b\u6709 4.13 \u5c31\u8868\u793a OK \u4e86<\/p>\n<pre class=\"prettyprint lang-bsh\">sysctl net.ipv4.tcp_available_congestion_control<\/pre>\n<p>\u8fd4\u56de\u503c\u4e00\u822c\u4e3a\uff1a<br \/>\nnet.ipv4.tcp_available_congestion_control = bbr cubic reno<\/p>\n<pre class=\"prettyprint lang-bsh\">sysctl net.ipv4.tcp_congestion_control<\/pre>\n<p>\u8fd4\u56de\u503c\u4e00\u822c\u4e3a\uff1a<br \/>\nnet.ipv4.tcp_congestion_control = bbr<\/p>\n<pre class=\"prettyprint lang-bsh\">sysctl net.core.default_qdisc<\/pre>\n<p>\u8fd4\u56de\u503c\u4e00\u822c\u4e3a\uff1a<br \/>\nnet.core.default_qdisc = fq<\/p>\n<pre class=\"prettyprint lang-bsh\">lsmod | grep bbr<\/pre>\n<p>\u8fd4\u56de\u503c\u6709 tcp_bbr \u6a21\u5757\u5373\u8bf4\u660ebbr\u5df2\u542f\u52a8\u3002<\/p>\n<h3>\u5185\u6838\u5347\u7ea7\u65b9\u6cd5<\/h3>\n<p>\u5982\u679c\u662f CentOS \u7cfb\u7edf\uff0c\u6267\u884c\u5982\u4e0b\u547d\u4ee4\u5373\u53ef\u5347\u7ea7\u5185\u6838\uff1a<\/p>\n<pre class=\"prettyprint lang-bsh\">yum --enablerepo=elrepo-kernel -y install kernel-ml kernel-ml-devel<\/pre>\n<p>CentOS 6 \u7684\u8bdd\uff0c\u6267\u884c\u547d\u4ee4\uff1a<\/p>\n<pre class=\"prettyprint lang-bsh\">sed -i 's\/^default=.*\/default=0\/g' \/boot\/grub\/grub.conf<\/pre>\n<p>CentOS 7 \u7684\u8bdd\uff0c\u6267\u884c\u547d\u4ee4\uff1a<\/p>\n<pre class=\"prettyprint lang-bsh\">grub2-set-default 0<\/pre>\n<p>\u5982\u679c\u662f Debian\/Ubuntu \u7cfb\u7edf\uff0c\u5219\u9700\u8981\u624b\u52a8\u4e0b\u8f7d\u6700\u65b0\u7248\u5185\u6838\u6765\u5b89\u88c5\u5347\u7ea7\u3002<br \/>\n\u53bb<a href=\"http:\/\/kernel.ubuntu.com\/~kernel-ppa\/mainline\/\" target=\"_blank\" rel=\"noopener\">\u8fd9\u91cc<\/a>\u4e0b\u8f7d\u6700\u65b0\u7248\u7684\u5185\u6838 deb \u5b89\u88c5\u5305\u3002<br \/>\n\u5982\u679c\u7cfb\u7edf\u662f 64 \u4f4d\uff0c\u5219\u4e0b\u8f7d amd64 \u7684 linux-image \u4e2d\u542b\u6709 generic \u8fd9\u4e2a deb \u5305\uff1b<br \/>\n\u5982\u679c\u7cfb\u7edf\u662f 32 \u4f4d\uff0c\u5219\u4e0b\u8f7d i386 \u7684 linux-image \u4e2d\u542b\u6709 generic \u8fd9\u4e2a deb \u5305\uff1b<br \/>\n\u5b89\u88c5\u7684\u547d\u4ee4\u5982\u4e0b\uff08\u4ee5\u6700\u65b0\u7248\u7684 64 \u4f4d 4.12.4 \u4e3e\u4f8b\u800c\u5df2\uff0c\u8bf7\u66ff\u6362\u4e3a\u4e0b\u8f7d\u597d\u7684 deb \u5305\uff09\uff1a<\/p>\n<pre class=\"prettyprint lang-bsh\">dpkg -i linux-image-4.12.4-041204-generic_4.12.4-041204.201707271932_amd64.deb<\/pre>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u518d\u6267\u884c\u547d\u4ee4\uff1a<\/p>\n<pre class=\"prettyprint lang-bsh\">\/usr\/sbin\/update-grub<\/pre>\n<p>\u6700\u540e\uff0c\u91cd\u542f VPS \u5373\u53ef\u3002<\/p>\n<h3>\u7279\u522b\u8bf4\u660e<\/h3>\n<p>\u5982\u679c\u4f60\u4f7f\u7528\u7684\u662f Google Cloud Platform \uff08GCP\uff09\u66f4\u6362\u5185\u6838\uff0c\u6709\u65f6\u4f1a\u9047\u5230\u91cd\u542f\u540e\uff0c\u6574\u4e2a\u78c1\u76d8\u53d8\u4e3a\u53ea\u8bfb\u7684\u60c5\u51b5\u3002\u53ea\u9700\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u5373\u53ef\u6062\u590d\uff1a<\/p>\n<pre class=\"prettyprint lang-bsh\">mount -o remount rw \/<\/pre>\n<h3>\u66f4\u65b0\u65e5\u5fd7\uff1a<\/h3>\n<p>2017 \u5e74 10 \u6708 28 \u65e5\uff1a<br \/>\n1\u3001\u66f4\u65b0\uff1a\u81ea\u52a8\u5224\u65ad\u5185\u6838\u7248\u672c\u3002\u5982\u679c\u5185\u6838\u7248\u672c\u5df2\u7ecf\u5927\u4e8e\u6216\u7b49\u4e8e 4.9 \u4e14\u6ca1\u6709\u5f00\u542f BBR\uff0c\u811a\u672c\u4f1a\u76f4\u63a5\u8bbe\u7f6e\u597d BBR\uff1b<br \/>\n2\u3001\u65b0\u589e\uff1a\u811a\u672c\u6267\u884c\u65f6\u4f1a\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u521b\u5efa\u65e5\u5fd7\uff08install_bbr.log\uff09\uff0c\u65b9\u4fbf\u67e5\u770b\u53ca\u6392\u9519\u3002<\/p>\n<p>2017 \u5e74 02 \u6708 22 \u65e5\uff1a<br \/>\n1\u3001\u66f4\u65b0\uff1a\u81ea\u52a8\u83b7\u53d6\u6700\u65b0\u7248 4.10 \u5185\u6838\u3002<\/p>\n<p>2017 \u5e74 01 \u6708 20 \u65e5\uff1a<br \/>\n1\u3001\u65b0\u589e\uff1a\u81ea\u52a8\u83b7\u53d6\u5e76\u4e0b\u8f7d\u5b89\u88c5\u6700\u65b0\u7248\u5185\u6838\u7684\u529f\u80fd\u3002<\/p>\n<p>2017 \u5e74 01 \u6708 13 \u65e5\uff1a<br \/>\n1\u3001\u66f4\u65b0\uff1a\u5185\u6838\u5230 4.9.3\u3002<\/p>\n<p>2017 \u5e74 01 \u6708 09 \u65e5\uff1a<br \/>\n1\u3001\u66f4\u65b0\uff1a\u5185\u6838\u5230 4.9.1\u3002<\/p>\n<h3>\u53c2\u8003\u94fe\u63a5\uff1a<\/h3>\n<p><a href=\"https:\/\/github.com\/google\/bbr\/blob\/master\/Documentation\/bbr-quick-start.md\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/google\/bbr\/blob\/master\/Documentation\/bbr-quick-start.md<\/a><br \/>\n<a href=\"http:\/\/elrepo.org\/tiki\/tiki-index.php\" target=\"_blank\" rel=\"noopener\">http:\/\/elrepo.org\/tiki\/tiki-index.php<\/a><br \/>\n<a href=\"http:\/\/kernel.ubuntu.com\/~kernel-ppa\/mainline\/\" target=\"_blank\" rel=\"noopener\">http:\/\/kernel.ubuntu.com\/~kernel-ppa\/mainline\/<\/a><\/p>\n<p>\u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1a<a href=\"https:\/\/teddysun.com\/\">\u79cb\u6c34\u9038\u51b0<\/a>\u00a0\u00bb\u00a0<a href=\"https:\/\/teddysun.com\/489.html\">\u4e00\u952e\u5b89\u88c5\u6700\u65b0\u5185\u6838\u5e76\u5f00\u542f BBR \u811a\u672c<\/a><\/p>\n<\/article>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\uff0cGoogle \u5f00\u6e90\u4e86\u5176 TCP BBR \u62e5\u585e\u63a7\u5236\u7b97\u6cd5\uff0c\u5e76\u63d0\u4ea4\u5230\u4e86 Linux \u5185\u6838\uff0c\u4ece 4.9 \u5f00\u59cb\uff0cL&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[],"class_list":["post-153","post","type-post","status-publish","format-standard","hentry","category-32"],"_links":{"self":[{"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=\/wp\/v2\/posts\/153","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=153"}],"version-history":[{"count":0,"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=\/wp\/v2\/posts\/153\/revisions"}],"wp:attachment":[{"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=153"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}