一、添加源并更新

echo -e "\ndeb https://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list
apt-get update

国内服务器请替换deb.debian.orgmirrors.163.com,下同。
如果出现如下提示

Err:2 https://deb.debian.org/debian buster-backports Release 
  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 199.232.94.132 443]

将上述源由https改为http然后再更新。

二、升级内核

apt install -t buster-backports linux-image-cloud-amd64 linux-headers-cloud-amd64

三、删除多余内核

1、查看当前系统所有内核

dpkg -l|grep linux-image | awk '{print $2}'

类似如下输出

linux-image-4.19.0-5-amd64
linux-image-5.10.0-0.bpo.5-cloud-amd64
linux-image-amd64
linux-image-cloud-amd64

2、删除多余内核

apt-get purge 其余内核名称

3、更新grub 系统引导文件并重启VPS

update-grub
reboot

四、打开BBR

开启方法:

echo net.core.default_qdisc=fq >> /etc/sysctl.conf
echo net.ipv4.tcp_congestion_control=bbr >> /etc/sysctl.conf
sysctl -p

检查是否成功:

sysctl net.ipv4.tcp_available_congestion_control

显示:

sysctl net.ipv4.tcp_available_congestion_control
net.ipv4.tcp_available_congestion_control = bbr cubic reno

表示开启成功。
或执行lsmod | grep bbr,检测 BBR 是否开启。

本站由企鹅小屋强力驱动
Last modification:May 9, 2021
如果觉得我的文章对你有用,请随意赞赏