瀏覽代碼

Switch to BBR congestion control

Bob Mottram 7 年之前
父節點
當前提交
c63b3abe8b
共有 1 個檔案被更改,包括 10 行新增0 行删除
  1. 10
    0
      src/freedombone-utils-setup

+ 10
- 0
src/freedombone-utils-setup 查看文件

685
     fi
685
     fi
686
 }
686
 }
687
 
687
 
688
+function congestion_control {
689
+    # see /proc/sys/net/ipv4/tcp_congestion_control
690
+    echo 'net.core.default_qdisc=fq' > /etc/sysctl.d/10-custom-kernel-bbr.conf
691
+    echo 'net.ipv4.tcp_congestion_control=bbr' >> /etc/sysctl.d/10-custom-kernel-bbr.conf
692
+    sysctl --system
693
+}
694
+
688
 function setup_utils {
695
 function setup_utils {
689
     read_config_param "PROJECT_REPO"
696
     read_config_param "PROJECT_REPO"
690
     write_config_param "PROJECT_REPO" "$PROJECT_REPO"
697
     write_config_param "PROJECT_REPO" "$PROJECT_REPO"
695
     function_check support_256_colours
702
     function_check support_256_colours
696
     support_256_colours
703
     support_256_colours
697
 
704
 
705
+    function_check congestion_control
706
+    congestion_control
707
+
698
     function_check enable_predictable_device_names
708
     function_check enable_predictable_device_names
699
     enable_predictable_device_names
709
     enable_predictable_device_names
700
 
710