mirror of
https://github.com/hwdsl2/openvpn-install.git
synced 2024-05-28 17:03:30 +02:00
Improve sysctl settings
- For enabling TCP BBR congestion control, add a check to make sure tcp_congestion_control exists.
This commit is contained in:
parent
0a76ae48f8
commit
f05bf31083
|
@ -424,7 +424,8 @@ update_sysctl() {
|
|||
|| { /bin/rm -f "$conf_opt"; touch "$conf_opt"; }
|
||||
# Enable TCP BBR congestion control if kernel version >= 4.20
|
||||
if modprobe -q tcp_bbr \
|
||||
&& printf '%s\n%s' "4.20" "$(uname -r)" | sort -C -V; then
|
||||
&& printf '%s\n%s' "4.20" "$(uname -r)" | sort -C -V \
|
||||
&& [ -f /proc/sys/net/ipv4/tcp_congestion_control ]; then
|
||||
cat >> "$conf_opt" <<'EOF'
|
||||
net.core.default_qdisc = fq
|
||||
net.ipv4.tcp_congestion_control = bbr
|
||||
|
|
Loading…
Reference in New Issue
Block a user