CentOS 更新内核并开启 TCP BBR 方法

Kevin 教程 1,475 次浏览 39条评论

BBR 是由 Google 设计开发的 TCP 拥塞控制算法,属于单边网络加速方式,其在 Linux 内核 4.9 版本开始被加入。较之前其它流行算法,TCP BBR 提供更高网络吞吐量和降低延迟。由于 CentOS 默认内核版本低,开启 BBR 需要先升级系统内核

更新后如果查询内核版本是 4.1x 或 4.2x 也是支持 BBR 的。有些人可能会问,上面不是说 4.9 开始才支持 BBR 吗?这个问题与内核版本命名有关,有时会造成误解。4.9 按惯常理解是 4.09。

确保内核版本满足要求后,检查是否已设置加载tcp_bbr模块。

lsmod | grep bbr

没有返回内容的话,手动设置加载tcp_bbr模块。

modprobe tcp_bbr
echo "tcp_bbr" | tee --append /etc/modules-load.d/modules.conf

将相关配置写入系统文件并更新。其中 default_qdisc 在内核 4.13 版本起似乎不要求 fq qdisc 了,可以设置使用其它 qdisc。另外如果之后要关闭 BBR,将命令中的 fq 改为 cubic,bbr 改为 pfifo_fast。

echo "net.core.default_qdisc = fq" | tee --append /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control = bbr" | tee --append /etc/sysctl.conf
sysctl -p

reboot重启系统(非必需),用下面命令验证 BBR 生效状态,输出结果类似下面就表示已启用。

# 查询内核可用拥塞控制算法
[root@vpsdp ~]# sysctl -n net.ipv4.tcp_available_congestion_control
reno cubic bbr

# 查询内核当前拥塞控制算法
[root@vpsdp ~]# sysctl -n net.ipv4.tcp_congestion_control
bbr

# 查询系统是否加载 BBR 模块
[root@vpsdp ~]# lsmod | grep bbr
tcp_bbr                20480  6

如果想测试 BBR 加速效果,除了实际使用,还可以用 Linux 内核自带的 tc 工具模拟网络环境,如设置不同丢包率、延迟情况下测试。

评论列表

  1. #1

    bimatoprost ophthalmic solution brand https://carepro1st.com/

  2. #2

    dapoxetine citrate camber https://dapoxetine.confrancisyalgomas.com/

  3. #3

    naltrexone 3 mg https://naltrexoneonline.confrancisyalgomas.com/

  4. #4

    plaquenil hydroxychloroquine manufacturer https://hydroxychloroquine.webbfenix.com/

  5. #5

    hydroxychloroquine treatment updates https://hhydroxychloroquine.com/

  6. #6

    ivermectin for scabies side effects https://ivermectin.mlsmalta.com/

  7. #7

    30 day free trial vidalista https://vidalista40mg.mlsmalta.com/

  8. #8

    cialis 5mg price comparison https://wisig.org/

  9. #9

    tamoxifen and weight https://tamoxifen.mrdgeography.com/

  10. #10

    online medical services https://buymeds.mlsmalta.com/

  11. #11

    online medical services https://medpills.bee-rich.com/

  12. #12

    sildenafil 20 mg tablet coupons https://sildenafili.com/

  13. #13

    amstyles.com https://amstyles.com/

  14. #14

    dapoxetine 90 mg dosage https://ddapoxetine.com/

  15. #15

    what dosage of azithromycin for covid https://hydroxychloroquine.lm360.us/

  16. #16

    sildenafil citrate 20 mg price http://cavalrymenforromney.com/

  17. #17

    prednisone for dogs with tumors https://bvsinfotech.com/

  18. #18

    studies show hydroxychloroquine works https://hydroxychloroquine.wisig.org/

  19. #19

    viagra vs cialis which is better https://cialis.grassfed.us/

  20. #20

    viagra vs cialis which is better https://cialis.buszcentrum.com/

  21. #21

    online tadalafil order https://cialis.webbfenix.com/

  22. #22

    online tadalafil order http://cialis.anafassia.com/

  23. #23

    I conceive you have mentioned some very interesting details , thankyou for the post.

    http://www.vreyrolinomit.com/

  24. #24

    cialis dosage canada https://cialis.studiowestinc.com/

  25. #25

    cialis dosage canada https://cialis.adicbc.com/

  26. #26

    buy hydroxychloroquine online https://hydroxychloroquinex.com/

  27. #27

    tadalafil buy – tadalafil citrate bulk powder tadalafil 5mg

  28. #28

    over the counter viagra best over the counter viagra
    viagra online usa

  29. #29

    alprostadil injection video https://alprostadildrugs.com/ injectable ed medications

  30. #30

    vardenafil prices https://vegavardenafil.com/ vardenafil 20mg dosage

  31. #31

    buy ed pills buy ed pills
    ed treatments that really work

  32. #32

    buy ed pills cheap ed pills from india
    ed pills online

  33. #33

    40 mg tadalafil https://elitadalafill.com/ buy tadalafil us

  34. #34

    cheap ed pills in mexico non prescription erection pills
    buy ed pills from canada

  35. #35

    Czxyle – ivermectin usa Keaxeh ytflfj

  36. #36

    buy sildenafil australia https://eunicesildenafilcitrate.com/ sildenafil 55mg

  37. #37

    Msodju – cialis generique avis Jjgcbg rwhswa

  38. #38

    Kawlhw – lasix medication Adsdki yxenaw

  39. #39

    Have you ever heard of second life (sl for short). It is essentially a online game where you can do anything you want. SL is literally my second life (pun intended lol). If you would like to see more you can see these sl authors and blogs

    beth.typepad.com/beths_blog/2007/05/second_life_in_.html

发表评论

电邮地址用于 Gravatar 头像显示,不会被公开可见。