V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
通过以下 Referral 链接购买 DigitalOcean 主机,你将可以帮助 V2EX 持续发展
DigitalOcean - SSD Cloud Servers
webdev
V2EX  ›  VPS

Linode XEN VPS 上折腾 BBR 小结

  •  
  •   webdev · Jan 10, 2017 · 696 views
    This topic created in 3405 days ago, the information mentioned may be changed or developed.
    1. 获取内核文件
    wget -O linux-image-4.9.0-amd64.deb http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9/linux-image-4.9.0-040900-generic_4.9.0-040900.201612111631_amd64.deb

    2. 安装内核
    dpkg -i linux-image-4.9.0-amd64.deb

    3. 确认你的内核已经安装上
    ls /boot/vmlinuz*
    应该有类似 /boot/vmlinuz-4.9.0-040900-generic 出现

    4. 修改 grub 配置文件
    /etc/default/grub

    GRUB_TIMEOUT=10
    GRUB_CMDLINE_LINUX="console=ttyS0,19200n8"
    GRUB_DISABLE_LINUX_UUID=true
    GRUB_SERIAL_COMMAND="serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1"
    GRUB_TERMINAL=serial

    之后运行 update-grub

    5. 修改 pv-grub 配置文件
    /boot/grub/menu.lst

    timeout 5

    title linux-4.9.0-with-bbr
    root (hd0)
    kernel /boot/vmlinuz-4.9.0-040900-generic root=/dev/xvda ro quiet
    initrd //boot/initrd.img-4.9.0-040900-generic


    主要是修改 kernel 和 initrd 部分,信息可以用 update-grub 来获得

    6. 开启 BBR
    echo "net.core.default_qdisc=fq" >> /etc/sysctl.confecho "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf

    sysctl -p

    7. 在 linode 的 Dashboard 上 Edit Configuration Profile 更改 Boot Settings -> Kernel 为 pv-grub-x86_64,如图所示




    8. 重启 VPS
    9. 检验是否开启了 BBR
    sysctl net.ipv4.tcp_available_congestion_control
    #vps 会显示: net.ipv4.tcp_available_congestion_control = bbr cubic reno#第一个是 bbr ,则证明 BBR 已经启用


    因为 XEN 的 VPS 比如东京 1 用的是 PV-GRUB 所以和其他用 KVM 的 VPS 多了一步
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   971 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 51ms · UTC 20:05 · PVG 04:05 · LAX 13:05 · JFK 16:05
    ♥ Do have faith in what you're doing.