如何在Linode CentOS7开启Google TCP-BBR优化算法 | linux运维

Linux在4.9版本的内核新增了一款TCP拥塞控制技术:BBR,Linode最新内核也更新到4.9,但是没有把BBR编译进去,下面是教程是替换Linode CentOS7内核,并开启Google TCP-BBR优化算法方法。

注意:Linode、阿里云测试OK,Ucloud测试加载4.9变为只读系统。

1. 安装elrepo提供的kernel4.9

增加elrepo源


  1. cat > /etc/yum.repos.d/elrepo.repo << EOF
  2. [elrepo-kernel]
  3. name=ELRepo.org Community Enterprise Linux Kernel Repository - el7
  4. baseurl=http://elrepo.org/linux/kernel/el7/\$basearch/
  5. http://mirrors.coreix.net/elrepo/kernel/el7/\$basearch/
  6. http://jur-linux.org/download/elrepo/kernel/el7/\$basearch/
  7. http://repos.lax-noc.com/elrepo/kernel/el7/\$basearch/
  8. http://mirror.ventraip.net.au/elrepo/kernel/el7/\$basearch/
  9. enabled=1
  10. gpgcheck=0
  11. EOF

可能存在yum更新内核时候找不到升级包,请检查/etc/yum.conf是否过滤了kernel

找到改文件将exclude=kernel* centos-release*注销,再尝试安装

安装elrepo替换4.9内核及grub2

  1. yum -y install kernel-ml grub2

查看4.9内核是否安装成功

  1. [root@linode1495332 ~]# ls -l /boot/vmlinuz*
  2. -rwxr-xr-x 1 root root 6037696 Dec 22 10:16 /boot/vmlinuz-0-rescue-72863e389b584a4dab36fae7f3bffda2
  3. -rwxr-xr-x 1 root root 6037696 Dec 12 05:37 /boot/vmlinuz-4.9.0-1.el7.elrepo.x86_64

2. 替换CentOS7内核

Linode内核切换方法:

  1. [root@linode1495332 etc]# mkdir /boot/grub
  2. [root@linode1495332 etc]# grub2-mkconfig -o /boot/grub/grub.cfg
  3. Generating grub configuration file …
  4. Found linux image: /boot/vmlinuz-4.9.0-1.el7.elrepo.x86_64
  5. Found initrd image: /boot/initramfs-4.9.0-1.el7.elrepo.x86_64.img
  6. Found linux image: /boot/vmlinuz-0-rescue-72863e389b584a4dab36fae7f3bffda2
  7. Found initrd image: /boot/initramfs-0-rescue-72863e389b584a4dab36fae7f3bffda2.img
  8. done

点击Linode后台面板Dashboard,点击Edit按钮:

如何在Linode CentOS7开启Google TCP-BBR优化算法 | linux运维

在Kernel下拉菜单,选择GRUB 2启动:

如何在Linode CentOS7开启Google TCP-BBR优化算法 | linux运维

非Linode切换内核方法:

  1. [root@oneinstack ~]#  awk -F\’ ‘$1==”menuentry ” {print $2}’ /etc/grub2.cfg
  2. CentOS Linux (4.9.0-1.el7.elrepo.x86_64) 7 (Core)
  3. CentOS Linux (3.10.0-514.2.2.el7.x86_64) 7 (Core)
  4. CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)
  5. CentOS Linux (0-rescue-7d26c16f128042a684ea474c9e2c240f) 7 (Core)

grub2-set-default 0,切换到新内核

  1. [root@oneinstack ~]# grub2-set-default 0

重启服务器:

  1. reboot

查看内核版本

  1. [root@linode1495332 ~]# uname -a
  2. Linux linode1495332.members.linode.com 4.9.0-1.el7.elrepo.x86_64 #1 SMP Sun Dec 11 15:43:54 EST 2016 x86_64 x86_64 x86_64 GNU/Linux

3. 开启TCP-BBR

  1. cat >>/etc/sysctl.conf << EOF
  2. net.core.default_qdisc=fq
  3. net.ipv4.tcp_congestion_control=bbr
  4. EOF

内核参数生效:

  1. sysctl -p

查看bbr是否生效:

  1. [root@linode1495332 ~]# sysctl net.ipv4.tcp_available_congestion_control
  2. net.ipv4.tcp_available_congestion_control = bbr cubic reno
  3. [root@linode1495332 ~]# lsmod | grep bbr
  4. tcp_bbr                16384  70

Thu Dec 22 11:17:53 CST 2016

主题测试文章,只做测试使用。发布者:云大使,转转请注明出处:https://www.xp8.net/server/1915.html

赞 (0)
打赏 微信扫一扫 微信扫一扫
SaltStack设置配置教程 | Linux运维教程
上一篇 2018年11月21日 下午11:24
本地tomcat正常,但liunx poi excel下载却内容乱码问题的解决方法-学派吧
下一篇 2018年11月21日 下午11:48

相关推荐

  • /dev/hdb1 is apparently in use by the system; will not make a filesystem here!磁盘正在使用

    今天帮客户挂载个服务器硬盘、一直挂载不上。无法格式化、后来看了下 正在使用、 停止下。[root@localhost ~]# mkfs.ext3 /dev/hdb1mke2fs 1.39 (29-May-2006)/dev/hdb1 is apparently in use by the system; will not make a filesystem …

    服务器运维 2018年8月20日
    3.8K00
  • centos如何看进程信息及结束进程的命令教程

    linux查看进程的命令有:ps命令用于查看静态的进程统计信息,top命令用于查看进程动态信息,pgrep命令用于根据条件查询进程PID信息,pstree命令用于查看进程树信息 程序是保存在外部存储介质(如硬盘)中的可执行机器代码和数据的静态集合,而进程是在CPU及内存中处于动态执行状态的计算机程序。在Linux系统中,每个程序启动后可以创建一个或多个进程。…

    2019年3月13日
    4.7K00
  • 学派吧-使用Linux Ubuntu服务器VPN配置的教程(图)-linux教程

    本文概要说明 Ubuntu 系统下的 VPN 配置示例。 说明:本文相关配置和说明仅用于示例和操作指引,阿里云不对相关操作结果及由此产生的问题负责。 服务端配置 1. 登录服务器,安装 pptpd: sudo apt-get install pptpd 2. 修改配置文件: 1) /etc/pptpd.conf $ sudo vi /etc/pptpd.co…

    服务器运维 2018年12月12日
    4.0K00
  • 使用 htop 命令报错:-bash: htop: command not found

    今天通过htop命令查看下服务器状态、居然提示-bash: htop: command not found 后来看看没有这个工具。那我们进行安装下1: yum -y install htop 由于htop是一个扩展工具,是一个强大的进程管理前端工具,有的系统优化去掉了 。2、第二个解决办法步骤一:yum install -y epel-release步骤二:…

    2018年8月26日
    8.5K00
  • Linux中关于别名与二进制的使用教程-linux教程

    这篇文章主要给大家介绍了关于Linux中别名与二进制的使用方法,文中介绍的非常详细,对大家具有一定的参考学习价值,需要的朋友们下面来一起看看吧。 本文介绍的是关于Linux中别名与二进制使用的相关内容,分享出来给大家参考,下面来看看详细的介绍: 二进制 一般二进制这个名词听上去高深莫测,然而当你了解它之后其实并不复杂,在计算机里处理数据一般都是由二进制处理。…

    2019年1月1日
    2.3K00

发表回复

登录后才能评论
联系我们

联系我们

18838889666

在线咨询: QQ交谈

邮件:xinyun@88.com

工作时间:周一至周五,9:30-18:30,节假日休息

添加微信
添加微信
分享本页
返回顶部