A-A+

在ubuntu和centos7上开启谷歌TCP BBR拥塞控制算法

2016年12月08日 Linux 评论 163 条 阅读 1,908 views 次

一、ubuntu/debian系统

下载新内核:

   wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9-rc8/linux-image-4.9.0-040900rc8\
-generic_4.9.0-040900rc8.201612051443_amd64.deb

安装内核:

    dpkg -i linux-image-4.9.0*.deb

删除其他内核:

    dpkg -l|grep linux-image 
    sudo apt-get remove linux-image-[Tab补全] #删4.9.0以外的旧内核

更新 grub 系统引导文件并重启

    update-grub
    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
    

查看下是否有BBR:lsmod | grep bbr

 

二、centos7:

    wget http://mirrors.kernel.org/debian/pool/main/l/linux/linux-image-4.9.0-rc8-amd64-un
signed_4.9~rc8-1~exp1_amd64.deb
    ar x linux-image-4.9.0-rc8-amd64-unsigned_4.9~rc8-1~exp1_amd64.deb
    tar -Jxf data.tar.xz
    install -m644 boot/vmlinuz-4.9.0-rc8-amd64 /boot/vmlinuz-4.9.0-rc8-amd64
    cp -Rav lib/modules/4.9.0-rc8-amd64 /lib/modules/
    depmod -a 4.9.0-rc8-amd64
    #centos >= 6
    dracut -f -v --hostonly -k '/lib/modules/4.9.0-rc8-amd64'  /boot/initramfs-4.9.0-rc8-a
md64.img 4.9.0-rc8-amd64
    grub2-mkconfig -o /boot/grub2/grub.cfg

修改/boot/grub2/grub.cfg 把4.9.0的内核启动 放到第一位。

然后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
    

查看下是否有BBR:lsmod | grep bbr

 

 

 

标签:

163 条留言  访客:163 条  博主:0 条

  1. morien
  2. Leapsnfc
  3. Hasekoc
  4. mityaly
  5. enamyfjd
  6. Zerstc
  7. Joypeqbx
  8. Hasesra
  9. Cagsxn
  10. Moormcyw
  11. Hasehxv
  12. Leapshns
  13. enamyedr
  14. Zerlgw
  15. Hasetij
  16. Hasexsk
  17. Hasevyg
  18. Moormazd
  19. Leapsevv
  20. enamybjg
  21. Haselus
  22. Haseoqx
  23. Haseuia
  24. Zeripe
  25. mityeyv
  26. Joypecld
  27. enamyert
  28. Hasekja
  29. Hasetnk
  30. Joypenih
  31. enamyhnk
  32. Leapsnuz
  33. mitybtr
  34. Cagpha
  35. Haseifu
  36. Hasexfu
  37. Hasetvs
  38. enamyjpx
  39. Zertcg
  40. Hasempl
  41. Leapscgb
  42. Joypejfg
  43. Cagvpr
  44. enamydxr
  45. Haseiwh
  46. Leapsjcz
  47. Joypetcy
  48. Cagjlh
  49. Moormegr
  50. enamyals
  51. Leapsame
  52. Hasecqs
  53. Hasegnp
  54. Joypeplz
  55. Cagpoe
  56. enamyxxr
  57. Leapsacf
  58. Hasewao
  59. Moormoru
  60. enamyvuo
  61. Hasetfi
  62. Leapsfbt
  63. Joypesbu
  64. Moormddj
  65. Hasecih
  66. enamyeoh
  67. Haseatd
  68. Joypepew
  69. Caghqb
  70. mityuhp
  71. Moormudy
  72. Haseosj
  73. mitygqc
  74. Hasekib
  75. enamyian
  76. mityxya
  77. Joypeveo
  78. Haseodr
  79. Leapsqjc
  80. enamypjd
  81. Moormavb
  82. Haseljm
  83. Leapsxah
  84. Zerkfp
  85. Joypewoq
  86. enamyett
  87. mitygtj
  88. Haseigg
  89. Moormwah
  90. Leapsqsq
  91. Zerutu
  92. mityqxg
  93. Hasehsz
  94. Cagxra
  95. Joypehqh
  96. Zerkmb
  97. mitylij
  98. Moormugo
  99. Hasefwd
  100. Leapsvkx
  101. Cagfah
  102. Hasesps
  103. Zersee
  104. Leapsqdk
  105. Hasetnt
  106. mityasi
  107. Moormlvi
  108. Leapshwi
  109. mityfal
  110. Haseryt
  111. Hasewut
  112. Joypehfj
  113. mityrxr
  114. Moormatn
  115. Leapspho
  116. Haseitj
  117. Cagqpv
  118. Zermzc
  119. mityozv
  120. Leapsoup
  121. Haseviw
  122. Hasepml
  123. Zeryqf
  124. mityell
  125. Hasevci
  126. Leapsqdy
  127. Hasegyz
  128. Moormipd
  129. Zersqu
  130. Joypexvn
  131. mitysby
  132. Caggwe
  133. Hasefak
  134. Leapsjwp
  135. Hasepyz
  136. Zerxfi
  137. mityhmy
  138. Hasesyy
  139. Haseucv
  140. Haseheb
  141. Leapsrsg
  142. mitymch
  143. Hasezdg
  144. Cagbqx
  145. Hasensy
  146. Haselby
  147. Leapsqvu
  148. Haseqox
  149. Haseska
  150. Haseuuw
  151. Leapssrt
  152. Cagetk
  153. Hasetxd
  154. Zerwai
  155. Hasewxt
  156. Hasesvj
  157. Leapskpn
  158. Joypeavu
  159. mityesc
  160. Hasekch
  161. Zerqza
  162. Moormmzl
  163. Hasecnc

给我留言