GithubHelp home page GithubHelp logo

cbbr's Introduction

CBBR

这是一个方便开启魔改bbr&bbr的脚本。 执行两步后最后输出Finish!提示,则成功。
已更新新的推荐方式 需要锐速的内核更换,请移步https://github.com/xratzh/XRSK

暂停更新&推荐:

推荐debian和ubuntu用户使用

更方便的方式,基于https://xanmod.org 升级最新内核,开启bbr即可:

  • 安装最新的内核并重启:
echo 'deb http://deb.xanmod.org releases main' | sudo tee /etc/apt/sources.list.d/xanmod-kernel.list
wget -qO - https://dl.xanmod.org/gpg.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/xanmod-kernel.gpg add -
sudo apt update && sudo apt install linux-xanmod -y
update-grub && update-grub2 && reboot
  • 开启BBR
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
sysctl -p
sysctl net.ipv4.tcp_available_congestion_control
lsmod | grep bbr

有输出既是开启了。


Debian8、9/Ubuntu14、16(64位)开启魔改BBR

  • Ubuntu14.04需要提前:
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get -y install g++-4.9
  • Debian9需要提前:
wget --no-check-certificate -O libssl.deb https://raw.githubusercontent.com/xratzh/CBBR/master/debkernel/libssl1.0.0_1.0.2-1_amd64.deb
dpkg -i libssl.deb

第一步:

apt-get install -y wget && wget --no-check-certificate -O D1.sh https://raw.githubusercontent.com/xratzh/CBBR/master/D1.sh && bash D1.sh

之后输入Y就会重启

第二步:

wget --no-check-certificate -O D2.sh https://raw.githubusercontent.com/xratzh/CBBR/master/D2.sh && bash D2.sh

Ubuntu18开启魔改BBR

会把内核锁定在4.15
第一步:

apt install -y wget && wget --no-check-certificate -O D3.sh https://raw.githubusercontent.com/xratzh/CBBR/master/D3.sh && bash D3.sh

之后输入Y就会重启

第二步:

wget --no-check-certificate -O D4.sh https://raw.githubusercontent.com/xratzh/CBBR/master/D4.sh && bash D4.sh

CentOS7开启魔改BBR

第一步:

yum install -y wget && wget --no-check-certificate -O C71.sh https://raw.githubusercontent.com/xratzh/CBBR/master/C71.sh && bash C71.sh

之后输入Y就会重启

第二步:

wget --no-check-certificate -O C72.sh https://raw.githubusercontent.com/xratzh/CBBR/master/C72.sh && bash C72.sh

CentOS6开启魔改BBR

第一步:

yum install -y wget && wget --no-check-certificate -O C61.sh https://raw.githubusercontent.com/xratzh/CBBR/master/C61.sh && bash C61.sh

之后输入Y就会重启

第二步:

wget --no-check-certificate -O C62.sh https://raw.githubusercontent.com/xratzh/CBBR/master/C62.sh && bash C62.sh

Tips

  • 存在对于其他内核的删除,只保留4.11.8内核的行为
  • 为什么不能一键,因为Linux内核在4.0后支持不重启更换,但是CentOS和Debian/Ubuntu很多的内核都是4.0-的版本,Debian9和Ubuntu16.04则是4.0+的版本。
  • Xratzh压力测试,发现bbr和魔改bbr都开启时会达到最快(个人验证),本脚本默认两者都开启。
  • 脚本里加入了对内核的锁定,之后update时不会变动内核。内核统一选择4.11.8版本。
  • 由于这个我找到的CentOS/Ubuntu历史内核的镜像站的网速时快时慢,所以自己下载了上传到GitHub,这样能保持一个较为稳定的速度。原来的内核地址仍然在脚本里面,只是被添加注释了,如果你不信任我上传的内核,可以自己取消注释使用镜像站的内核下载方式。  
  • 部分内容借鉴了Vicer大佬Teddysun大佬的脚本,感谢hostloc的yankee大佬和nanqinlang大佬的魔改优化。

cbbr's People

Contributors

xratzh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cbbr's Issues

ubuntu18 issue

E: The package linux-image-4.11.8-041108-generic needs to be reinstalled, but I can't find an archive for it.

centos 7 直接GG,

新独立服务器 安装 CBBR 直接挂掉了,服务器启都起步动不了。

版本:

=============
[root@caesardata ~]# cat /etc/issue

CentOS Linux 7 (Core)

Linux caesardata 4.9.124-xxxx-std-ipv6-64 #346072 SMP Wed Aug 29 07:54:55 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Server : 908416
IPv4 : XXXXXXXXXX
IPv6 : XXXXXXXXXX
Hostname : caesardata

如何Uninstall?

已经安装,当前网络情况下测试无效果,如何uninstall再行比对?

ubuntu 18.04 x86_64 ERROR!SECOND SETP!

https://raw.githubusercontent.com/nanqinlang/tcp_nanqinlang-test/master/tcp_nanqinlang.c
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.0.133, 151.101.64.133, 151.101.128.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.0.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 36157 (35K) [text/plain]
Saving to: ‘./tcp_bbr_powered.c’

./tcp_bbr_powered.c 100%[===========================>] 35.31K --.-KB/s in 0.001s

2018-05-17 05:31:47 (44.5 MB/s) - ‘./tcp_bbr_powered.c’ saved [36157/36157]

Install error.

Ubuntu18.04 4.15.0-36-generic tcp_bbr_powered 成功

先按脚本跑失败, sudo apt-get purge linux-image-4.15.0-36-generic 有bug
No rule to make target `modules'. Stop.
然后
sudo apt-get install --reinstall linux-image-4.15.0-36-generic linux-modules-4.15.0-36-generic linux-modules-extra-4.15.0-36-generic
sudo apt-get install --reinstall linux-headers-generic linux-headers-$(uname -r) gcc g++ build-essential git
再 从D4.sh的 echo 'obj-m:=tcp_bbr_powered.o' >./Makefile 开始跑, 把后面的23替换成36
mod编译成功 重启后, 没发现问题
默认装的tcp_bbr重启后也不加载了

centos6无法使用

测试多个vps商的centos6 32&64 第一步走完后,重启便死在boot那里,应该是内核问题。

这样算成功了吗

sysctl net.ipv4.tcp_available_congestion_control
返回结果
net.ipv4.tcp_available_congestion_control = bbr_powered bbr cubic reno

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.