id: f0366dca26204de6ab90edf70c7f2eae
parent_id: 
item_type: 1
item_id: 897a3cc9a32340e48069a3cadd976cea
item_updated_time: 1764345482186
title_diff: "[{\"diffs\":[[1,\"Ubuntu 18.04开启TCP网络协议BBR加速的方法（Google BBR 拥塞控制\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":45}]"
body_diff: "[{\"diffs\":[[1,\"<html>\\\r\\\n<head>\\\r\\\n  <title>Ubuntu 18.04开启TCP网络协议BBR加速的方法（Google BBR 拥塞控制算法) - Hello_BeautifulWorld - 博客园</title>\\\r\\\n  <basefont face=\\\"微软雅黑\\\" size=\\\"2\\\" />\\\r\\\n  <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;charset=utf-8\\\" />\\\r\\\n  <meta name=\\\"exporter-version\\\" content=\\\"YXBJ Windows/608924 (zh-CN, DDL); Windows/10.0.0 (Win64); EDAMVersion=V2;\\\"/>\\\r\\\n  <style>\\\r\\\n\\tbody, td {\\\r\\\n\\t  font-family: 微软雅黑;\\\r\\\n\\t  font-size: 12pt;\\\r\\\n\\t}\\\r\\\n  </style>\\\r\\\n</head>\\\r\\\n<body>\\\r\\\n<a name=\\\"18072\\\"></a>\\\r\\\n<h1>Ubuntu 18.04开启TCP网络协议BBR加速的方法（Google BBR 拥塞控制算法) - Hello_BeautifulWorld - 博客园</h1>\\\r\\\n\\\r\\\n<div><span>\\\n  <div style=\\\"--en-clipped-content:simplified\\\">\\\n<div><br/></div><div style=\\\"font-size: 16px; display:block; min-width: 100%;\\\"> <div style=\\\"background-color:transparent;font:inherit;vertical-align:baseline;\\\"><div style=\\\"background-color:transparent;font:inherit;vertical-align:baseline;font-family:&quot;PT Serif&quot;;font-size:16px;line-height:1.5em;color:rgb(31, 9, 9);text-align:left;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;z-index:200;padding-left:2em;padding-right:2em;margin-left:auto;margin-right:auto;position:relative;width:36em;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;position:relative;margin-left:-25px;margin-right:25px;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;position:relative;padding-top:0px;padding-bottom:9em;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;position:relative;margin-bottom:0px;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:0px;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:0px;\\\"><h1 style=\\\"border:0px;font:inherit;vertical-align:baseline;font-family:&quot;PT Serif&quot;;text-align:left;font-size:35px;font-weight:normal;line-height:35px;margin-bottom:20px;padding:0px;margin:0px;\\\"> Ubuntu 18.04开启TCP网络协议BBR加速的方法（Google BBR 拥塞控制算法) </h1><div style=\\\"padding:0px;border:0px;font:inherit;vertical-align:baseline;position:relative;height:1em;line-height:1;text-align:center;margin:0px;padding-top:1.5em;padding-bottom:1.5em;margin-bottom:0px;\\\"><div style=\\\"padding:0px;border:0px;font:inherit;vertical-align:baseline;position:absolute;left:-4em;top:50%;z-index:10;width:100%;padding-left:4em;padding-right:4em;height:0.1em;opacity:0.5;margin:0px;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);margin-bottom:0px;\\\"><span style=\\\"font:inherit;position:absolute;left:-4em;top:50%;z-index:10;width:100%;padding-left:4em;padding-right:4em;height:0.1em;margin:0px;opacity:0.5;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"></span></div></div></div>\\\n\\t\\t<div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">\\\n<div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">TCP BBR 是Google给出的一个改良版的tcp网络协议，相当于在已有TCP协议的基础上打了个补丁的意思，这个改良版TCP协议对拥塞控制有很好的支持，对于网络较差的环境有不错的应用场景，当然这里我们最常用的一个场景就是外网VPN上的，因为网络太差，能改进一些算一些，该协议的一些解释本文不讲，本文主要是讲一下在最新版Ubuntu18.04中如何设置bbr功能，因为在Linux4.9内核开始，bbr协议已经加入到Linux内核之中，如果所使用的Linux系统内核版本大于4.9，就可以直接启用bbr功能。</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">这里我们的场景是Ubuntu18.04，所以内核标准为4.15，所以我们这里只要开启、配置就行。</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">查看内核：</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><img src=\\\":/ee348392ad864c3e9314aa97231bc39a\\\" type=\\\"image/png\\\" data-filename=\\\"1088037-20190206124924925-18370325.png\\\" height=\\\"60\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;border-color:rgb(31, 9, 9);\\\" width=\\\"500\\\"/></p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">开启TCP BBR</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><strong style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;\\\">1、修改系统变量</strong></p>\\\n<div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">\\\n<pre style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;background-color:rgb(243, 242, 238);font-family:Inconsolata;width:auto;font-size:0.875em;line-height:1.71429em;\\\">echo &quot;net.core.default_qdisc=fq&quot; &gt;&gt; /etc/sysctl.conf\\\necho &quot;net.ipv4.tcp_congestion_control=bbr&quot; &gt;&gt; /etc/sysctl.conf</pre>\\\n</div>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><img src=\\\":/fcec8fc1df6340408641c9de85dfa4d9\\\" type=\\\"image/png\\\" data-filename=\\\"1088037-20190206125402379-1108733150.png\\\" height=\\\"28\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;border-color:rgb(31, 9, 9);\\\" width=\\\"500\\\"/></p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><strong style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;\\\">2、保存生效，配置内核</strong></p>\\\n<div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">\\\n<pre style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;background-color:rgb(243, 242, 238);font-family:Inconsolata;width:auto;font-size:0.875em;line-height:1.71429em;\\\">sysctl   -p</pre>\\\n</div>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;text-align:center;margin-top:1em;margin-bottom:1em;\\\"><img src=\\\":/5381c0a2e00c4fc3bcc70bf92d1aeca5\\\" type=\\\"image/png\\\" data-filename=\\\"1088037-20190206125621212-962562599.png\\\" height=\\\"128\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;border-color:rgb(31, 9, 9);display:block;max-width:100%;\\\" width=\\\"576\\\"/></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><strong style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;\\\">3、  查看内核是否已开启BBR</strong></p>\\\n<div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">\\\n<pre style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;background-color:rgb(243, 242, 238);font-family:Inconsolata;width:auto;font-size:0.875em;line-height:1.71429em;\\\">sysctl net.ipv4.tcp_available_congestion_control</pre>\\\n</div>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><img src=\\\":/51b3cd0560e64eaea3fbe6012c8fc0cf\\\" type=\\\"image/png\\\" data-filename=\\\"1088037-20190206125745147-1931116292.png\\\" height=\\\"34\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;border-color:rgb(31, 9, 9);\\\" width=\\\"500\\\"/></p>\\\n<div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">\\\n<pre style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;background-color:rgb(243, 242, 238);font-family:Inconsolata;width:auto;font-size:0.875em;line-height:1.71429em;\\\">sysctl net.ipv4.tcp_congestion_control</pre>\\\n</div>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><img src=\\\":/315079bff3504b8d8c8f7ad71ba28d08\\\" type=\\\"image/png\\\" data-filename=\\\"1088037-20190206130112317-1199551517.png\\\" height=\\\"39\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;border-color:rgb(31, 9, 9);\\\" width=\\\"500\\\"/></p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><strong style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;\\\">4、 验证BBR是否已经启动</strong></p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:0px;\\\"><img src=\\\":/6e03f5d874894688bc268d474f3c4f09\\\" type=\\\"image/png\\\" data-filename=\\\"1088037-20190206130244825-1093880423.png\\\" height=\\\"63\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;border-color:rgb(31, 9, 9);\\\" width=\\\"500\\\"/></p>\\\n</div>\\\n<div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:0px;\\\">本博客是博主个人学习时的一些记录，不保证是为原创，个别文章加入了转载的源地址还有个别文章是汇总网上多份资料所成，在这之中也必有疏漏未加标注者，如有侵权请与博主联系。</div>\\\n\\\n</div>\\\n\\t\\t<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:0px;\\\">\\\n\\t\\t\\tposted on \\\n2019-02-06 12:47 <a href=\\\"https://www.cnblogs.com/devilmaycry812839668/\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;color:rgb(6, 85, 136);text-decoration:none;\\\" target=\\\"_blank\\\">Hello_BeautifulWorld</a> 阅读(2282) 评论(0) <a href=\\\"https://i.cnblogs.com/EditPosts.aspx?postid=10353621\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;color:rgb(6, 85, 136);text-decoration:none;\\\" target=\\\"_blank\\\"> 编辑</a> <a href=\\\"#\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;color:rgb(6, 85, 136);text-decoration:none;\\\" target=\\\"_blank\\\">收藏</a>\\\n\\\n\\t\\t</p>\\\n\\t</div></div></div><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;position:absolute;top:-1000px;left:-1000px;\\\">Measure</div><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;position:absolute;top:-1000px;left:-1000px;line-height:1;margin-bottom:0px;\\\">Measure</div></div></div></div></div></div></div></div>\\\n</div>\\\n</span>\\\n</div></body></html>\\u0000\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":10264}]"
metadata_diff: {"new":{"id":"897a3cc9a32340e48069a3cadd976cea","parent_id":"061de1401cfc4cfaadf6e74e015970e9","latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","application_data":"","order":1764345766408,"markup_language":2,"is_shared":0,"share_id":"","conflict_original_id":"","master_key_id":"","user_data":"","deleted_time":0},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2025-11-28T16:13:00.244Z
created_time: 2025-11-28T16:13:00.244Z
type_: 13