What you should do after you got a new machine?

2023-09-05 0:05:54

[开发运维 | Dev Ops] ,

The following steps can help improve your machine's network performance. One way to improve your machine's network performance is by adjusting the TCP windows and using a better congestion control algorithm. In addition to improving network performance, it may be necessary to prepare your environment for using Kubernetes as well.

 

To change the network congestion algorithm, here is an article about it: Huge improve network performance by change TCP congestion control to BBR.

sudo sh -c "cat >/etc/modules-load.d/bbr.conf" <<EOL
tcp_bbr
EOL

Prepare for Kubernetes

sudo sh -c "cat >/etc/modules-load.d/kubernetes.conf" <<EOL
br_netfilters
overlay
EOL

you may also want to install and enable fuse

sudo apt update && sudo apt install fuse
sudo sh -c "cat >/etc/modules-load.d/fuse.conf" <<EOL
fuse
EOL

Adjust the TCP window size

sudo sh -c "cat >/etc/sysctl.d/99-network-finetune.conf" <<EOL
net.ipv4.tcp_congestion_control = bbr
net.core.default_qdisc = fq

net.core.wmem_max=125829120
net.core.rmem_max=125829120
net.ipv4.tcp_rmem= 10240 87380 125829120
net.ipv4.tcp_wmem= 10240 87380 125829120
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_sack = 1
net.ipv4.tcp_no_metrics_save = 1
net.core.netdev_max_backlog = 10000
EOL
sudo sh -c "cat >/etc/sysctl.d/99-kubernetes.conf" <<EOL
net.bridge.bridge-nf-call-iptables = 1
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-ip6tables = 1
EOL
这篇博文发表在 开发运维 | Dev Ops 目录下,标签为 ,
如需引用,请使用链接:https://note.mc256.dev/?p=2127

This article published in 开发运维 | Dev Ops with tags , .
Cite this page using this link:https://note.mc256.dev/?p=2127

您的邮箱地址不会被公开,评论使用Gravatar头像。
Your email address will not be published. This blog is using Gravatar.

正在提交评论... Submitting ...
正在为您准备评论控件 Loading Comment Plugin
Copyright © 2013-2024 mc256. All Rights Reserved.
Powered by WordPress on top of a dual-stack k3s Cluster using JuiceFS.
Wordpress Theme Designed By mc256.
Encrypted By Let's Encrypt.  Hosted On Linode + OVH + AWS.
DNS Provided By Hostker.
Status Page by CloudFlare Worker.