<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TCP加速 &#8211; 科技改变生活-雨落星辰</title>
	<atom:link href="https://p1e.cn/collection/bbr/feed" rel="self" type="application/rss+xml" />
	<link>https://p1e.cn</link>
	<description>所有的伟大,都源于一个勇敢的开始</description>
	<lastBuildDate>Sun, 29 Jan 2023 06:57:01 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
	<item>
		<title>TCP单边加速疑问解答</title>
		<link>https://p1e.cn/html/2211.html</link>
					<comments>https://p1e.cn/html/2211.html#respond</comments>
		
		<dc:creator><![CDATA[Naoki]]></dc:creator>
		<pubDate>Thu, 30 Apr 2020 12:18:45 +0000</pubDate>
				<category><![CDATA[运维笔记]]></category>
		<guid isPermaLink="false">https://www.815494.com/?p=2211</guid>

					<description><![CDATA[1. 可以不安装BBR吗？ 可以不开启，但是大多数情况下建议开启。针对国内腾讯云/阿里云等1Mbps小宽带则可以不开启。 2. 国内的服务器有必要开启BBR吗？ 绝大多数情况不需要，实测腾讯云5M固定宽带开启BBR后通过HTTPS下载文件最高速度无法达到带宽的理论最大值，关闭后则可以达到理论最大值（512kb/s）。 3. BBR对UDP协议是否有用？ 无用。BBR只针对TCP进行加速，对UDP不奏效。但是即将面世的基于UDP的HTTP3会采用BBR算法。 4. BBR是否需要用户端的支持？ 否，BBR是单边加速算]]></description>
										<content:encoded><![CDATA[<h3>1. 可以不安装BBR吗？</h3>
<blockquote><p>可以不开启，但是大多数情况下建议开启。针对国内腾讯云/阿里云等1Mbps小宽带则可以不开启。</p></blockquote>
<h3>2. 国内的服务器有必要开启BBR吗？</h3>
<blockquote><p>绝大多数情况不需要，实测腾讯云5M固定宽带开启BBR后通过HTTPS下载文件最高速度无法达到带宽的理论最大值，关闭后则可以达到理论最大值（512kb/s）。</p></blockquote>
<h3>3. BBR对UDP协议是否有用？</h3>
<blockquote><p>无用。BBR只针对TCP进行加速，对UDP不奏效。但是即将面世的基于UDP的HTTP3会采用BBR算法。</p></blockquote>
<h3>4. BBR是否需要用户端的支持？</h3>
<blockquote><p>否，BBR是单边加速算法，仅在服务器端安装即可成功加速。</p></blockquote>
<h3>5. 开启了BBR还是很慢怎么办？</h3>
<blockquote><p>首先检查BBR是否开启。</p>
<p>若已经开启，那说明：①你的服务器带宽质量真的很差，或者②你自己的带宽质量差，或者③网络极度拥堵。建议进行控制变量法排除问题。</p></blockquote>
<h3>6. OpenVZ可以开启BBR么？</h3>
<blockquote><p>首先，类似于KVM、HyperV及VMWare的那种可以自定义内核的虚拟机才可以开启BBR，如果你的VPS是基于OpenVZ架构的，可能无法直接开启BBR，需要通过别的方法才能启动BBR；如果是基于XEN架构的VPS，请先确定是否可以自定义内核，因为有些Xen架构的VPS是不允许自定义内核的，通过这个命令可以看到内核版本：<code>uname -r</code>，若小于4.9，则无法开启。</p></blockquote>
<h3>7. 如何停止/关闭/暂停/卸载/删除BBR？</h3>
<blockquote><p>配置了BBR之后，如果不想要了需要卸载的话，可以删除<strong>/etc/sysctl.conf</strong>上面添加的<code class=" language-bash">net.core.default_qdisc=fq</code>和<code class=" language-bash">net.ipv4.tcp_congestion_control=bbr</code>，然后重启。<br />
具体操作大体如下：<br />
<code>vim /etc/sysctl.conf</code><br />
让光标移到对应的行，按<code>dd</code>（dd即为vim命令的删除整行）<br />
再按<code>:wq</code>（别漏了冒号，这个是vim的保存命令）</p></blockquote>
<h3 id="title-11">8. BBR是否会多消耗服务器流量？</h3>
<blockquote><p>会，但是消耗的流量微乎其微，大约占到正常流量的5%左右。</p></blockquote>
<h3>9. 还有别的方法可以再加速吗？</h3>
<blockquote><p>有，还可以在开启BBR的同时启动TCP Fast Open：</p>
<pre class=" language-bash"><code class=" language-bash">echo "net.ipv4.tcp_fastopen=3" &gt;&gt; /etc/sysctl.conf &amp;&amp; sysctl -p</code></pre>
<p>其中参数<code>3</code>的含义：1 开启客户端，2 开启服务端，3 都开启。</p></blockquote>
<h3>10. IPv6怎么开启BBR？</h3>
<blockquote><p>BBR默认同时开启IPv4和IPv6的算法，无需另外开启IPv6。</p></blockquote>
<div></div>]]></content:encoded>
					
					<wfw:commentRss>https://p1e.cn/html/2211.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>BBR魔改/BBRPLUS/Lotsever/锐速四合一脚本 Centos/Debian/Ubuntu</title>
		<link>https://p1e.cn/html/144.html</link>
					<comments>https://p1e.cn/html/144.html#respond</comments>
		
		<dc:creator><![CDATA[Naoki]]></dc:creator>
		<pubDate>Tue, 03 Dec 2019 21:36:48 +0000</pubDate>
				<category><![CDATA[运维笔记]]></category>
		<category><![CDATA[BBR]]></category>
		<category><![CDATA[BBRPLUS]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[Lotsever]]></category>
		<guid isPermaLink="false">https://815494.com/?p=144</guid>

					<description><![CDATA[对于CentOS系统的BBR魔改之前搬运过nanqinlang大佬的脚本，无奈出现了BUG，导致CentOS安装还存在着问题，前几天友链博主千影，也写出了一个魔改BBR脚本，脚本包含BBR+BBR魔改版+Lotsever(锐速)，同时支持Centos、Debian、Ubuntu系统，很方便，也很强大。  安装 支持系统：Centos 6+/Debian 8+/Ubuntu 14+，BBR魔改版不支持Debian 8。 注意：该脚本在Vultr各个系统均测试通过，如果期间有出现任何问题，可向原作者反映帮助改善。 运行]]></description>
										<content:encoded><![CDATA[<p>对于CentOS系统的BBR魔改之前搬运过nanqinlang大佬的脚本，无奈出现了BUG，导致CentOS安装还存在着问题，前几天友链博主千影，也写出了一个魔改BBR脚本，脚本包含BBR+BBR魔改版+Lotsever(锐速)，同时支持Centos、Debian、Ubuntu系统，很方便，也很强大。</p>
<h2 data-unique="安装"> 安装</h2>
<p><strong>支持系统：</strong>Centos 6+/Debian 8+/Ubuntu 14+，BBR魔改版不支持Debian 8。</p>
<p><strong>注意：</strong>该脚本在Vultr各个系统均测试通过，如果期间有出现任何问题，可向原作者反映帮助改善。</p>
<p>运行以下命令：</p>
<pre>wget -N --no-check-certificate "http://www.815494.com/html/shell/BBR/4for1tcp.sh" &amp;&amp; chmod +x 4for1tcp.sh &amp;&amp; ./4for1tcp.sh</pre>
<p>提示证书错误的话</p>
<p>debian/ubuntu运行</p>
<pre>apt-get -y install ca-certificates</pre>
<p>centos运行</p>
<pre>yum -y install ca-certificates</pre>
<h2>说明</h2>
<p>使用脚本后会出现如下选项：</p>
<p><img fetchpriority="high" decoding="async" class="size-full wp-image-886 aligncenter" src="https://i.p1e.cn/2018/05/1554279316-F6XveP.png" alt="" width="432" height="456" /></p>
<div class="post-image"></div>
<h3>步骤一</h3>
<p>先在[1 – 3]切换内核（第一次显示为bbr内核也要切换一遍），重启</p>
<p>如果在删除内核环节出现这样一张图。</p>
<div class="post-image"><img decoding="async" class="aligncenter size-full wp-image-11714" src="https://i.p1e.cn/2018/05/2018012701475760.png" alt="BBR魔改/Lotsever一键脚本 Centos/Debian/Ubuntu-续笔记自媒体" width="1037" height="686" /></div>
<p>注意选择NO，然后根据提示重启系统。</p>
<h3>步骤二</h3>
<p>重启后不用再下载脚本，直接 ./4for1tcp.sh ，在[4 – 8]中选你要开的加速</p>
<p>“1. 安装 BBR/BBR魔改版内核”        对应4,5,6（原版，魔改，暴力魔改）<br />
“2. 安装 BBRplus版内核 ”                对应7（plus）<br />
“3. 安装 Lotserver(锐速)内核”        对应8（锐速）</p>
<h3>步骤三</h3>
<p>开启后再 ./4for1tcp.sh  ， 显示开启成功则启动成功，你也可以自己手动确认</p>
<p>现在你可以自由的切换你想要的加速，直到你不想折腾为止~</p>
<div></div>]]></content:encoded>
					
					<wfw:commentRss>https://p1e.cn/html/144.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>lkl-rinetd BBR一键脚本报错only support OpenVZ解决方案</title>
		<link>https://p1e.cn/html/945.html</link>
					<comments>https://p1e.cn/html/945.html#respond</comments>
		
		<dc:creator><![CDATA[Naoki]]></dc:creator>
		<pubDate>Mon, 15 Apr 2019 07:10:59 +0000</pubDate>
				<category><![CDATA[运维笔记]]></category>
		<category><![CDATA[BBR]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[openvz]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">http://www.815494.com/?p=945</guid>

					<description><![CDATA[报错信息]]></description>
										<content:encoded><![CDATA[<h4>报错信息</h4>
<p>[error] only support OpenVZ<br />
<img decoding="async" class="alignnone size-full wp-image-946" src="https://i.p1e.cn/2019/04/arrxOX.jpg" width="662" height="207" /></p>
<h4>故障原因</h4>
<p>某些主机商的OpenVZ主机使用的是LXC虚拟化。虽说主机商叫OpenVZ但是实际跟OpenVZ 已无关系。</p>
<h4>解决方案</h4>
<p>禁用脚本虚拟化检测</p>
<h4>超级懒人一键安装方案</h4>
<p>Debian or Ubuntu<br />
适用于 单网卡（单 IP） 服务器：</p>
<pre>wget --no-check-certificate http://www.815494.com/html/shell/BBR/tcp_nanqinlang-rinetd-debianorubuntu-nocheckvirt.sh</pre>
<pre>bash tcp_nanqinlang-rinetd-debianorubuntu-nocheckvirt.sh</pre>
<p>适用于 多网卡（多 IP） 服务器，会为所有网卡（所有 IP）提供加速：</p>
<pre>wget --no-check-certificate http://www.815494.com/html/shell/BBR/tcp_nanqinlang-rinetd-debianorubuntu-nocheckvirt-multiNIC.sh</pre>
<pre>bash tcp_nanqinlang-rinetd-debianorubuntu-nocheckvirt-multiNIC.sh</pre>
<p>CentOS 7<br />
和上面一样，也分 单网卡 和 多网卡 版本：</p>
<p># 单网卡</p>
<pre>wget --no-check-certificate http://www.815494.com/html/shell/BBR/tcp_nanqinlang-rinetd-centos-nocheckvirt.sh</pre>
<pre>bash tcp_nanqinlang-rinetd-centos-nocheckvirt.sh</pre>
<p># 多网卡</p>
<pre>wget --no-check-certificate http://www.815494.com/html/shell/BBR/tcp_nanqinlang-rinetd-centos-nocheckvirt-multiNIC.sh</pre>
<pre>bash tcp_nanqinlang-rinetd-centos-nocheckvirt-multiNIC.sh</pre>
<p>使用说明<br />
以下进行脚本使用说明：</p>
<p>安装 lkl-rinetd<br />
此命令用于安装 lkl-rinetd。</p>
<p>在 /home/tcp_nanqinlang 进行安装，所以安装完成后不要动这个文件夹了（除非你想修改端口）。</p>
<p>安装过程中，会提示输入端口号。多个端口号用空格隔开。不支持端口段。</p>
<p>安装完成后，会开启 lkl-rinetd。以后重启机器也会随开机自启。</p>
<p>使用前请注意自己的 iptables 相关设置。</p>
<p>检查 lkl-rinetd 运行状态<br />
此命令用于检查 lkl-rinetd 运行与否，可通过返回的提示判断。</p>
<p>卸载 lkl-rinetd<br />
运行此命令会删除 /home/tcp_nanqinlang 、移除 rc.local 对应开机自启项和清空 iptables raw 表。属于完整卸载，不会有残留。且卸载后无需重启。</p>
<pre></pre>
<div></div>]]></content:encoded>
					
					<wfw:commentRss>https://p1e.cn/html/945.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>OpenVZ 魔改 BBR &#8211; lkl-rinetd 一键脚本</title>
		<link>https://p1e.cn/html/666.html</link>
					<comments>https://p1e.cn/html/666.html#respond</comments>
		
		<dc:creator><![CDATA[Naoki]]></dc:creator>
		<pubDate>Mon, 05 Nov 2018 06:23:28 +0000</pubDate>
				<category><![CDATA[运维笔记]]></category>
		<category><![CDATA[BBR]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[openvz]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">http://www.815494.com/?p=666</guid>

					<description><![CDATA[要求以下： OpenVZ 64 bit Ram &#62;&#62; 64M 更新： 2018-03-24 新增 多网卡 适配 Debian or Ubuntu 适用于 单网卡（单 IP） 服务器： wget --no-check-certificate http://www.815494.com/html/shell/BBR/tcp_nanqinlang-rinetd-debianorubuntu.sh bash tcp_nanqinlang-rinetd-debianorubuntu.sh 适用于 多网卡（多 IP]]></description>
										<content:encoded><![CDATA[<p>要求以下：</p>
<p>OpenVZ<br />
64 bit<br />
Ram &gt;&gt; 64M<br />
更新： 2018-03-24 新增 多网卡 适配</p>
<p>Debian or Ubuntu<br />
适用于 单网卡（单 IP） 服务器：</p>
<pre>wget --no-check-certificate http://www.815494.com/html/shell/BBR/tcp_nanqinlang-rinetd-debianorubuntu.sh</pre>
<pre>bash tcp_nanqinlang-rinetd-debianorubuntu.sh</pre>
<p>适用于 多网卡（多 IP） 服务器，会为所有网卡（所有 IP）提供加速：</p>
<pre>wget --no-check-certificate http://www.815494.com/html/shell/BBR/tcp_nanqinlang-rinetd-debianorubuntu-multiNIC.sh</pre>
<pre>bash tcp_nanqinlang-rinetd-debianorubuntu-multiNIC.sh</pre>
<p>CentOS 7<br />
和上面一样，也分 单网卡 和 多网卡 版本：</p>
<p># 单网卡</p>
<pre>wget --no-check-certificate http://www.815494.com/html/shell/BBR/tcp_nanqinlang-rinetd-centos.sh</pre>
<pre>bash tcp_nanqinlang-rinetd-centos.sh</pre>
<p># 多网卡</p>
<pre>wget --no-check-certificate http://www.815494.com/html/shell/BBR/tcp_nanqinlang-rinetd-centos-multiNIC.sh</pre>
<pre>bash tcp_nanqinlang-rinetd-centos-multiNIC.sh</pre>
<p>使用说明<br />
以下进行脚本使用说明：</p>
<p>安装 lkl-rinetd<br />
此命令用于安装 lkl-rinetd。</p>
<p>在 /home/tcp_nanqinlang 进行安装，所以安装完成后不要动这个文件夹了（除非你想修改端口）。</p>
<p>安装过程中，会提示输入端口号。多个端口号用空格隔开。不支持端口段。</p>
<p>安装完成后，会开启 lkl-rinetd。以后重启机器也会随开机自启。</p>
<p>使用前请注意自己的 iptables 相关设置。</p>
<p>检查 lkl-rinetd 运行状态<br />
此命令用于检查 lkl-rinetd 运行与否，可通过返回的提示判断。</p>
<p>卸载 lkl-rinetd<br />
运行此命令会删除 /home/tcp_nanqinlang 、移除 rc.local 对应开机自启项和清空 iptables raw 表。属于完整卸载，不会有残留。且卸载后无需重启。</p>
<div></div>]]></content:encoded>
					
					<wfw:commentRss>https://p1e.cn/html/666.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>搬瓦工 OVZ 架构 VPS 一键安装 Google BBR 教程</title>
		<link>https://p1e.cn/html/490.html</link>
					<comments>https://p1e.cn/html/490.html#respond</comments>
		
		<dc:creator><![CDATA[Naoki]]></dc:creator>
		<pubDate>Sat, 15 Sep 2018 04:09:47 +0000</pubDate>
				<category><![CDATA[运维笔记]]></category>
		<category><![CDATA[BBR]]></category>
		<category><![CDATA[OVZ]]></category>
		<category><![CDATA[搬瓦工]]></category>
		<guid isPermaLink="false">https://www.815494.com/?p=490</guid>

					<description><![CDATA[我一直以来就没买过OVZ架构的VPS，因为本地网络差再加上OVZ架构的又有很多限制，不上加速软件的情况下速度非常慢。搬瓦工除开KVM架构的VPS后，就是OVZ架构的了。前段时间写过KVM架构VPS一键安装Google BBR，本次带来的就是OVZ架构VPS一键安装Google BBR教程了！（如何辨别呢？搬瓦工VPS套餐里带有KVM字样的就是KVM架构，带有VZ字样的就是OVZ架构） 一、系统要求 CentOS7 x64、Debian8 x64、Ubuntu16 x64系统！ 二、脚本命令 1、安装LKL一键包命令]]></description>
										<content:encoded><![CDATA[<p>我一直以来就没买过OVZ架构的VPS，因为本地网络差再加上OVZ架构的又有很多限制，不上加速软件的情况下速度非常慢。搬瓦工除开KVM架构的VPS后，就是OVZ架构的了。前段时间写过KVM架构VPS一键安装Google BBR，本次带来的就是OVZ架构VPS一键安装Google BBR教程了！（如何辨别呢？搬瓦工VPS套餐里带有KVM字样的就是KVM架构，带有VZ字样的就是OVZ架构）</p>
<h2>一、系统要求</h2>
<p>CentOS7 x64、Debian8 x64、Ubuntu16 x64系统！</p>
<h2>二、脚本命令</h2>
<p>1、安装LKL一键包命令</p>
<pre class="ql-syntax" spellcheck="false"><span class="hljs-attribute">wget</span>&nbsp;--<span class="hljs-literal">no</span>-check-certificate http://www.815494.com/html/shell/BBR/bwgbbrinstall.sh&nbsp;&amp;&amp;&nbsp;bash&nbsp;install.sh
</pre>
<p>2、如何判断是否安装成功</p>
<p>ping&nbsp;10.0.0.2</p>
<p>如果10.0.0.2能ping通说明成功，ping不通说明失败。</p>
<p>3、如何修改转发端口</p>
<p>1）修改/root/lkl/run.sh，查找9000-9999，改成你想要的端口段；</p>
<p>2）修改/root/lkl/haproxy.cfg查找9000-9999，改成你想要的端口段；</p>
<p>3）重启vps。</p>
<p><strong>注意：默认的端口转发只转发了9000-9999的端口，如果你不想费心修改，请把某些应用的端口设在这个范围；</strong></p>
<div></div>]]></content:encoded>
					
					<wfw:commentRss>https://p1e.cn/html/490.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Virmach 128M $$ BBR/锐速，二选一 优化方案</title>
		<link>https://p1e.cn/html/415.html</link>
					<comments>https://p1e.cn/html/415.html#respond</comments>
		
		<dc:creator><![CDATA[Naoki]]></dc:creator>
		<pubDate>Mon, 10 Sep 2018 03:58:58 +0000</pubDate>
				<category><![CDATA[运维笔记]]></category>
		<category><![CDATA[BBR]]></category>
		<category><![CDATA[Lotsever]]></category>
		<category><![CDATA[virmach]]></category>
		<category><![CDATA[锐速]]></category>
		<guid isPermaLink="false">https://www.815494.com/?p=415</guid>

					<description><![CDATA[此教程以Debian为例： 第一步，重装非商家由民间提供的纯净系统 先在Virmach控制面板，重装Debian 7/8，如果是则不用装，为下面重装民间纯净系统做准备。 参考：https://moeclub.org/2018/04/03/603/ 下载脚本 wget --no-check-certificate -qO InstallNET.sh 'http://www.815494.com/html/shell/reinstall/InstallNET.sh' &#38;&#38; chmod a+x Insta]]></description>
										<content:encoded><![CDATA[<p>此教程以Debian为例：</p>
<p><span style="color: orange;">第一步，重装非商家由民间提供的纯净系统</span></p>
<p>先在Virmach控制面板，重装Debian 7/8，如果是则不用装，为下面重装民间纯净系统做准备。</p>
<p>参考：https://moeclub.org/2018/04/03/603/</p>
<p>下载脚本</p>
<pre class="ql-syntax" spellcheck="false"><span class="hljs-attribute">wget</span> --<span class="hljs-literal">no</span>-check-certificate -qO InstallNET.sh <span class="hljs-string">'http://www.815494.com/html/shell/reinstall/InstallNET.sh'</span> &amp;&amp; chmod a+x InstallNET.sh
</pre>
<p>锐速，重装为 Debian 7 32位</p>
<pre class="ql-syntax" spellcheck="false">bash InstallNET.sh -d 7 -v 32 -a
</pre>
<p>BBR，重装为 Debian 8 64位</p>
<pre class="ql-syntax" spellcheck="false">bash InstallNET.sh -d 8 -v 64 -a
</pre>
<p>登陆SSH默认密码为：MoeClub.org</p>
<p>说明下，这个装完的系统，会自动添加物理内存两倍的swap虚拟内存，128&#215;2=256</p>
<p>256虚拟内存，足够的了。小内存VPS，还是有必要用swap!</p>
<p><span style="color: orange;">第二步，内核参数优化</span></p>
<p>1.增加系统文件描述符的最大限数</p>
<p>编辑文件 limits.conf</p>
<pre class="ql-syntax" spellcheck="false"><span class="hljs-attribute">vi</span> /etc/security/limits.conf
</pre>
<p>最后新增两行添加命令：</p>
<pre class="ql-syntax" spellcheck="false"><span class="hljs-bullet">* </span>soft nofile 51200
<span class="hljs-bullet">* </span>hard nofile 51200
</pre>
<p>如发现limits.conf文件内容已经有，请修改为上。</p>
<p>编辑文件 profile</p>
<p>最后新增一行，添加命令。</p>
<pre class="ql-syntax" spellcheck="false">vi /etc/profile
<span class="hljs-built_in">ulimit</span> -SHn 51200
</pre>
<p>修改后重启，检查是否生效命令：</p>
<pre class="ql-syntax" spellcheck="false"><span class="hljs-built_in">ulimit</span> -n
</pre>
<p>2.调整内核参数</p>
<p>修改配置文件sysctl.conf</p>
<pre class="ql-syntax" spellcheck="false"><span class="hljs-attribute">vi</span> /etc/sysctl.conf
</pre>
<p>最后新增一行添加命令：</p>
<pre class="ql-syntax" spellcheck="false">fs.file-max = 51200

net.core.rmem_max = 67108864

net.core.wmem_max = 67108864

net.core.rmem_default = 65536

net.core.wmem_default = 65536

net.core.netdev_max_backlog = 4096

net.core.somaxconn = 4096

net.ipv4.tcp_syncookies = 1

net.ipv4.tcp_tw_reuse = 1

net.ipv4.tcp_tw_recycle = 0

net.ipv4.tcp_fin_timeout = 30

net.ipv4.tcp_keepalive_time = 1200

net.ipv4.ip_local_port_range = 10000 65000

net.ipv4.tcp_max_syn_backlog = 4096

net.ipv4.tcp_max_tw_buckets = 5000

net.ipv4.tcp_fastopen = 3

net.ipv4.tcp_rmem = 4096 87380 67108864

net.ipv4.tcp_wmem = 4096 65536 67108864

net.ipv4.tcp_mtu_probing = 1

net.ipv4.tcp_congestion_control = hybla

vm.min_free_kbytes = 5120

vm.overcommit_memory = 1

vm.panic_on_oom = 1

vm.swappiness = 80

vm.vfs_cache_pressure = 200
</pre>
<p><span style="color: orange;">第三步，安装BBR或者锐速</span></p>
<p>1.暴力BBR</p>
<p>参考：https://github.com/tcp-nanqinlang/wiki/wiki/general</p>
<p>安装:</p>
<pre class="ql-syntax" spellcheck="false"><span class="hljs-attribute">wget</span> --<span class="hljs-literal">no</span>-check-certificate http://www.815494.com/html/shell/BBR/tcp_nanqinlang-fool-1.3.0.sh
bash tcp_nanqinlang-fool-<span class="hljs-number">1</span>.<span class="hljs-number">3</span>.<span class="hljs-number">0</span>.sh
</pre>
<p>2.锐速</p>
<p>参考：https://www.hostloc.com/thread-366983-1-1.html</p>
<p>安装：</p>
<pre class="ql-syntax" spellcheck="false"><span class="hljs-attribute">wget</span> --<span class="hljs-literal">no</span>-check-certificate -O appex.sh http://www.815494.com/html/shell/appex.sh &amp;&amp; chmod +x appex.sh &amp;&amp; bash appex.sh install
</pre>
<p>锐速优化参数：</p>
<p>编辑文件：</p>
<pre class="ql-syntax" spellcheck="false"><span class="hljs-attribute">vi</span> /appex/etc/config
</pre>
<p>initialCwndWan=&#8221;65&#8243;</p>
<p>shaperEnable=&#8221;0&#8243;</p>
<p>SmBurstMS=&#8221;20&#8243;</p>
<p>shortRttMS=&#8221;90&#8243;</p>
<p>数值修改为上的即可。</p>
<p>重启锐速</p>
<pre class="ql-syntax" spellcheck="false">/appex/bin/serverSpeeder.sh restart
</pre>
<p>锐速用户，一定选择，否则会爆。</p>
<p><span style="color: red;">请选择秋水牌的$$一键脚本：https://teddysun.com/358.html</span></p>
<p>Debian 或 Ubuntu 下一键安装 libev 版</p>
<p>再精简的话，那就是要卸载</p>
<pre class="ql-syntax" spellcheck="false">apt-<span class="hljs-keyword">get</span> <span class="hljs-keyword">remove</span> rsyslog&gt;
</pre>
<p>同时，一定要修改SSH端口。</p>
<p>对于小内存的VPS，我强烈建议装32位的系统。</p>
<div></div>]]></content:encoded>
					
					<wfw:commentRss>https://p1e.cn/html/415.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>一键安装最新内核并开启 BBR 脚本</title>
		<link>https://p1e.cn/html/21.html</link>
					<comments>https://p1e.cn/html/21.html#respond</comments>
		
		<dc:creator><![CDATA[Naoki]]></dc:creator>
		<pubDate>Mon, 14 May 2018 04:00:34 +0000</pubDate>
				<category><![CDATA[运维笔记]]></category>
		<category><![CDATA[BBR]]></category>
		<category><![CDATA[google]]></category>
		<guid isPermaLink="false">https://815494.com/?p=21</guid>

					<description><![CDATA[使用root用户登录，运行以下命令： wget --no-check-certificate http://www.815494.com/html/shell/BBR/bbr.sh&#38;&#38; chmod +x bbr.sh &#38;&#38; ./bbr.sh 安装完成后，脚本会提示需要重启 VPS，输入 y 并回车后重启。 重启完成后，进入 VPS，验证一下是否成功安装最新内核并开启 TCP BBR，输入以下命令： uname -r 查看内核版本，显示为最新版就表示 OK 了 sysctl net.i]]></description>
										<content:encoded><![CDATA[<p>使用root用户登录，运行以下命令：</p>
<pre>wget --no-check-certificate http://www.815494.com/html/shell/BBR/bbr.sh&amp;&amp; chmod +x bbr.sh &amp;&amp; ./bbr.sh
</pre>
<p>安装完成后，脚本会提示需要重启 VPS，输入 y 并回车后重启。</p>
<p>重启完成后，进入 VPS，验证一下是否成功安装最新内核并开启 TCP BBR，输入以下命令：</p>
<pre class="ql-syntax" spellcheck="false"><span class="hljs-attribute">uname</span> -r
</pre>
<p>查看内核版本，显示为最新版就表示 OK 了</p>
<pre class="ql-syntax" spellcheck="false">sysctl net.ipv4.tcp_available_congestion_control
</pre>
<p>返回值一般为：</p>
<p>net.ipv4.tcp_available_congestion_control = bbr cubic reno</p>
<pre class="ql-syntax" spellcheck="false">sysctl net.ipv4.tcp_congestion_control
</pre>
<p>返回值一般为：</p>
<p>net.ipv4.tcp_congestion_control = bbr</p>
<pre class="ql-syntax" spellcheck="false">sysctl net.core.default_qdisc
</pre>
<p>返回值一般为：</p>
<p>net.core.default_qdisc = fq</p>
<pre class="ql-syntax" spellcheck="false"><span class="hljs-attribute">lsmod</span> | grep bbr
</pre>
<p>返回值有 tcp_bbr 模块即说明 bbr 已启动。<span style="color: red;">注意：并不是所有的 VPS 都会有此返回值，若没有也属正常。</span></p>
<p>&nbsp;</p>
<div></div>]]></content:encoded>
					
					<wfw:commentRss>https://p1e.cn/html/21.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
