谷歌BBR加速记录

需要更换内核,目前内核是测试版本

Centos6
http://elrepo.org/people/ajb/devel/kernel-ml/el6/x86_64/RPMS/
Centos7
http://elrepo.org/people/ajb/devel/kernel-ml/el7/x86_64/RPMS/

洛杉矶VPS测试CENTOS7

 

	







  • rpm -ivh http://elrepo.org/people/ajb/devel/kernel-ml/el7/x86_64/RPMS/kernel-ml-4.9.0-0.rc8.el7.elrepo.x86_64.rpm --force
  • grub2-set-default 'CentOS Linux (4.9.0-0.rc8.el7.elrepo.x86_64) 7 (Core)'
    
    grub2-editenv list   #当前启动项
    
    reboot
    
    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

    以上是测试版 已经无效了,下面是正式版

    http://elrepo.org/linux/kernel/el7/x86_64/RPMS/

    http://elrepo.org/linux/kernel/el7/x86_64/RPMS/kernel-ml-4.9.0-1.el7.elrepo.x86_64.rpm

     
    
    rpm -ivh http://elrepo.org/linux/kernel/el7/x86_64/RPMS/kernel-ml-4.9.0-1.el7.elrepo.x86_64.rpm --force 

    grub2-set-default 'CentOS Linux (4.9.0-1.el7.elrepo.x86_64) 7 (Core)'
    grub2-editenv list #当前启动项
    reboot

    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

    以上不用看了

    rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
    
    rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
    
    yum --enablerepo=elrepo-kernel install kernel-ml
    
    #查看内核
    awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg
    #设置内核
    grub2-set-default 0
    reboot
    nano /etc/sysctl.conf
    
    net.core.default_qdisc = fq
    net.ipv4.tcp_congestion_control = bbr
    
    sysctl -p
    #查看生效
    lsmod | grep bbr
    
    #删除旧的内核
    rpm -qa | grep kernel
    yum autoremove kernel-3.10.0-327.13.1.el7.x86_64 
    

    或者使用一键更换内核

    wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh && chmod +x bbr.sh && ./bbr.sh

    CentOS使用yum update更新时不升级内核           

    cp /etc/yum.conf    /etc/yum.conf.bak
    nano /etc/yum.conf  在[main]的最后添加
    exclude=kernel*
    

    不能加exclude=centos-release*  不然无效

    发表评论

    电子邮件地址不会被公开。 必填项已用*标注

    此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据