#!/bin/bash

## upgrade kernel
##
wget https://ali.webrtc.win/kernel/linux-headers-4.19.59-041959_4.19.59-041959.201907140332_all.deb
wget https://ali.webrtc.win/kernel/linux-headers-4.19.59-041959-generic_4.19.59-041959.201907140332_amd64.deb
wget https://ali.webrtc.win/kernel/linux-image-unsigned-4.19.59-041959-generic_4.19.59-041959.201907140332_amd64.deb
wget https://ali.webrtc.win/kernel/linux-modules-4.19.59-041959-generic_4.19.59-041959.201907140332_amd64.deb
dpkg -i *deb

## bbr
##
cat >> /etc/sysctl.conf << EOF
net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr
EOF

sysctl -p
sysctl net.ipv4.tcp_available_congestion_control
lsmod | grep bbr

## net params
##
cat >> /etc/sysctl.conf << EOF
net.ipv4.tcp_sack=1
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_slow_start_after_idle = 0
net.ipv4.tcp_rmem = 4096 524288 524288
net.ipv4.tcp_wmem = 4096 262144 524288
EOF

sysctl -p

## exfat
##
#wget http://ali.webrtc.win/kernel/exfat.ko
#insmod ./exfat.ko
#lsmod | grep exfat

