{"id":15,"date":"2023-12-25T13:46:36","date_gmt":"2023-12-25T05:46:36","guid":{"rendered":"https:\/\/bk.gpt4kkk.com\/?p=15"},"modified":"2023-12-25T19:55:05","modified_gmt":"2023-12-25T11:55:05","slug":"15","status":"publish","type":"post","link":"https:\/\/bk.150831.xyz\/?p=15","title":{"rendered":"\u670d\u52a1\u5668\u5f00\u542fBBR"},"content":{"rendered":"\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>\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>\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\n\n\n<h2 class=\"wp-block-heading\">\u672c\u811a\u672c\u9002\u7528\u73af\u5883<\/h2>\n\n\n\n<p>\u7cfb\u7edf\u652f\u6301\uff1aCentOS 6+\uff0cDebian 8+\uff0cUbuntu 16+<br>\u865a\u62df\u6280\u672f\uff1aOpenVZ \u4ee5\u5916\u7684\uff0c\u6bd4\u5982 KVM\u3001Xen\u3001VMware<br>\u5185\u5b58\u8981\u6c42\uff1a\u2265128M<br>\u65e5\u671f\u3000\u3000\uff1a2022 \u5e74 5 \u6708 11 \u65e5<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5173\u4e8e\u672c\u811a\u672c<\/h3>\n\n\n\n<p>1\u3001\u672c\u811a\u672c\u5df2\u5728&nbsp;<a href=\"https:\/\/qiu.sh\/vultr\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Vultr<\/strong><\/a>&nbsp;\u4e0a\u7684 VPS \u5168\u90e8\u6d4b\u8bd5\u901a\u8fc7\u3002<br>2\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>3\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>4\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\n\n\n<h3 class=\"wp-block-heading\">\u4f7f\u7528\u65b9\u6cd5<\/h3>\n\n\n\n<p>\u4f7f\u7528root\u7528\u6237\u767b\u5f55\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>wget --no-check-certificate -O \/opt\/bbr.sh https:\/\/github.com\/teddysun\/across\/raw\/master\/bbr.sh <\/code><\/code><\/pre>\n\n\n\n<p><code>chmod 755 \/opt\/bbr.sh <\/code><\/p>\n\n\n\n<p><code>\/opt\/bbr.sh<\/code><\/p>\n\n\n\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>\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\u68c0\u67e5\uff1a<br>No.1<\/p>\n\n\n\n<p><code>uname -r<\/code><\/p>\n\n\n\n<p>\u67e5\u770b\u5185\u6838\u7248\u672c\uff0c\u663e\u793a\u4e3a\u65b0\u7248\u5185\u6838\u5c31\u8868\u793a OK \u4e86\u3002<br>No.2<\/p>\n\n\n\n<p><code>sysctl net.ipv4.tcp_available_congestion_control<\/code><\/p>\n\n\n\n<p>\u8fd4\u56de\u503c\u4e00\u822c\u4e3a\uff1a<\/p>\n\n\n\n<p><code>net.ipv4.tcp_available_congestion_control = bbr cubic reno<\/code><\/p>\n\n\n\n<p>\u6216\u8005\uff1a<\/p>\n\n\n\n<p><code>net.ipv4.tcp_available_congestion_control = reno cubic bbr<\/code><\/p>\n\n\n\n<p>No.3<\/p>\n\n\n\n<p><code>sysctl net.ipv4.tcp_congestion_control<\/code><\/p>\n\n\n\n<p>\u8fd4\u56de\u503c\u4e00\u822c\u4e3a\uff1a<code>net.ipv4.tcp_congestion_control = bbr<\/code><\/p>\n\n\n\n<p>No.4<\/p>\n\n\n\n<p><code>sysctl net.core.default_qdisc<\/code><\/p>\n\n\n\n<p>\u8fd4\u56de\u503c\u4e00\u822c\u4e3a\uff1a<code>net.core.default_qdisc = fq<\/code><\/p>\n\n\n\n<p>No.5<\/p>\n\n\n\n<p><code>lsmod | grep bbr<\/code><\/p>\n\n\n\n<p>\u8fd4\u56de\u503c\u6709 tcp_bbr \u6a21\u5757\u5373\u8bf4\u660e bbr \u5df2\u542f\u52a8\u3002\u6bd4\u5982\uff1atcp_bbr 20480 3<\/p>\n\n\n\n<p>\u6ce8\u610f\uff1a\u5e76\u4e0d\u662f\u6240\u6709\u7684 VPS \u90fd\u4f1a\u6709\u6b64\u8fd4\u56de\u503c\uff0c\u82e5\u6ca1\u6709\u4e5f\u5c5e\u6b63\u5e38\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7279\u522b\u8bf4\u660e<\/h3>\n\n\n\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\uff1amount -o remount rw \/<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u66f4\u65b0\u65e5\u5fd7\uff1a<\/h3>\n\n\n\n<p>2021 \u5e74 5 \u6708 11 \u65e5\uff1a<br>1\u3001\u5728 CentOS 7 \u4e0b\u66f4\u6539\u4e3a\u5b89\u88c5 5.15.38 \u7248\u672c\u5185\u6838\uff1b<br>2\u3001\u7cbe\u7b80\u5728 Debian \u548c Ubuntu \u4e0b\u7684\u53ef\u9009\u5185\u6838\u7248\u672c\uff0c\u4ece 5.15 \u8d77\u59cb\u5230\u5f53\u524d\u6700\u65b0\u7248\u7ed3\u675f\u3002<\/p>\n\n\n\n<p>2021 \u5e74 1 \u6708 3 \u65e5\uff1a<br>1\u3001\u4e3a\u4e86\u7a33\u5b9a\u6027\uff0c\u5728 CentOS 7 \u4e0b\u66f4\u6539 elrepo-kernel \u4e3a centos-release-xen-48\uff0c\u5e76\u5347\u7ea7\u5b89\u88c5 4.9 \u7248\u7a33\u5b9a\u5185\u6838\uff1b<br>2\u3001\u5728 CentOS 6 \u548c CentOS 8 \u4e0b\u4e0d\u518d\u5b89\u88c5 elrepo-kernel\u3002\u539f\u56e0\uff1aCentOS 6 \u662f\u901a\u8fc7 rpm \u5b89\u88c5 4.18.20\uff1bCentOS 8 \u5219\u65e0\u9700\u5347\u7ea7\u5185\u6838\u5373\u53ef\u5f00\u542f BBR\u3002<br>3\u3001\u7cbe\u7b80\u5728 Debian \u548c Ubuntu \u4e0b\u7684\u53ef\u9009\u5185\u6838\u7248\u672c\uff0c\u4ece 5.9 \u8d77\u59cb\u5230\u5f53\u524d\u6700\u65b0\u7248\u7ed3\u675f\u3002<\/p>\n\n\n\n<p>2020 \u5e74 6 \u6708 23 \u65e5\uff1a<br>1\u3001\u91cd\u6784\u4e86\u4ee3\u7801\uff0c\u53bb\u9664\u4e00\u4e9b\u4e0d\u5fc5\u8981\u7684\u5904\u7406\uff1b<br>2\u3001\u7cbe\u7b80\u5728 Debian \u548c Ubuntu \u4e0b\u7684\u53ef\u9009\u5185\u6838\u7248\u672c\uff0c\u4ece 5.6 \u8d77\u59cb\u5230\u5f53\u524d\u6700\u65b0\u7248\u7ed3\u675f\u3002<\/p>\n\n\n\n<p>2018 \u5e74 12 \u6708 14 \u65e5\uff1a<br>1\u3001\u4fee\u6b63\uff1a\u5728 CentOS 6 \u7cfb\u7edf\u4e0b kernel-ml \u53ca kernel-ml-devel \u65e0\u6cd5\u5b89\u88c5\u7684\u95ee\u9898\u3002\u539f\u56e0\u662f elrepo \u5b98\u65b9\u6700\u8fd1\u53d6\u6d88\u4e86 kernel-ml \u53ca kernel-ml-devel \u7684 rpm \u8d44\u6e90\u3002\u811a\u672c\u5df2\u6539\u4e3a\u4e0b\u8f7d rpm \u6765\u5b89\u88c5\u7684\u65b9\u5f0f\u3002\u7248\u672c 4.18.20 \u5c06\u4f1a\u662f CentOS 6 \u4e0b\u6700\u65b0\u7684\u5185\u6838\uff0c\u76ee\u6d4b\u4ee5\u540e\u4e5f\u4e0d\u4f1a\u518d\u6709\u5347\u7ea7\u4e86\uff0c\u8bf7\u5c3d\u5feb\u8fc1\u79fb\u5230 CentOS 7 \u7cfb\u7edf\u3002<\/p>\n\n\n\n<p>2018 \u5e74 06 \u6708 09 \u65e5\uff1a<br>1\u3001\u4fee\u6b63\uff1a\u5728 CentOS \u7cfb\u7edf\u4e0b\u5c06 elrepo-kernel \u9ed8\u8ba4\u542f\u7528\uff0c\u4ee5\u89e3\u51b3\u5728\u5b89\u88c5\u65b0\u5185\u6838\u540e\u6267\u884c yum update \u518d\u6b21\u5b89\u88c5\u65e7\u5185\u6838\u7684\u95ee\u9898\u3002<\/p>\n\n\n\n<p>2018 \u5e74 05 \u6708 12 \u65e5\uff1a<br>1\u3001\u4fee\u6b63\uff1a\u5728 Ubuntu \u6216 Debian \u7cfb\u7edf\u4e2d\u67d0\u4e9b\u60c5\u51b5\u4e0b\u83b7\u53d6\u4e0d\u5230\u67d0\u4e2a\u7f16\u8bd1\u5931\u8d25\u7684\u5b89\u88c5\u5305\u5bfc\u81f4\u9000\u51fa\u5b89\u88c5\u7684\u95ee\u9898\u3002\u5e76\u4e14\u73b0\u5728\u53ef\u4ee5\u624b\u52a8\u9009\u62e9\u5b89\u88c5\u4ece 4.14 \u5230\u6700\u65b0\u7248\u672c\u7684\u5185\u6838\u3002<\/p>\n\n\n\n<p>2018 \u5e74 02 \u6708 24 \u65e5\uff1a<br>1\u3001\u65b0\u589e\uff1a\u624b\u52a8\u5b89\u88c5\u6700\u65b0\u7248\u5185\u6838 headers \u7684\u6559\u7a0b\u3002<\/p>\n\n\n\n<p>2017 \u5e74 10 \u6708 28 \u65e5\uff1a<br>1\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>2\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\n\n\n<p>2017 \u5e74 02 \u6708 22 \u65e5\uff1a<br>1\u3001\u66f4\u65b0\uff1a\u81ea\u52a8\u83b7\u53d6\u6700\u65b0\u7248 4.10 \u5185\u6838\u3002<\/p>\n\n\n\n<p>2017 \u5e74 01 \u6708 20 \u65e5\uff1a<br>1\u3001\u65b0\u589e\uff1a\u81ea\u52a8\u83b7\u53d6\u5e76\u4e0b\u8f7d\u5b89\u88c5\u6700\u65b0\u7248\u5185\u6838\u7684\u529f\u80fd\u3002<\/p>\n\n\n\n<p>2017 \u5e74 01 \u6708 13 \u65e5\uff1a<br>1\u3001\u66f4\u65b0\uff1a\u5185\u6838\u5230 4.9.3\u3002<\/p>\n\n\n\n<p>2017 \u5e74 01 \u6708 09 \u65e5\uff1a<br>1\u3001\u66f4\u65b0\uff1a\u5185\u6838\u5230 4.9.1\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u53c2\u8003\u94fe\u63a5\uff1a<\/h3>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/github.com\/google\/bbr\/blob\/master\/Documentation\/bbr-quick-start.mdhttp:\/\/elrepo.org\/tiki\/tiki-index.phphttp:\/\/kernel.ubuntu.com\/~kernel-ppa\/mainline\/\n<\/div><\/figure>\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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-15","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/bk.150831.xyz\/index.php?rest_route=\/wp\/v2\/posts\/15","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bk.150831.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bk.150831.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bk.150831.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bk.150831.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=15"}],"version-history":[{"count":4,"href":"https:\/\/bk.150831.xyz\/index.php?rest_route=\/wp\/v2\/posts\/15\/revisions"}],"predecessor-version":[{"id":34,"href":"https:\/\/bk.150831.xyz\/index.php?rest_route=\/wp\/v2\/posts\/15\/revisions\/34"}],"wp:attachment":[{"href":"https:\/\/bk.150831.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=15"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bk.150831.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=15"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bk.150831.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=15"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}