mirror of
https://gitee.com/callmer/pve_toss_notes.git
synced 2026-08-31 22:12:51 +08:00
update 4.PVE制作虚拟机模板.md.
This commit is contained in:
@@ -354,3 +354,33 @@ sudo nano /etc/network/interfaces
|
||||
# configuration fragments are stored in /run:
|
||||
# source-directory /run/network/interfaces.d ## 在这行前面增加注释符 # 来注释
|
||||
```
|
||||
|
||||
### 5.4.调整系统内核参数
|
||||
|
||||
由于该 Debian 虚拟机模板主要作为内网的 DNS 服务器使用,因此调整一部分系统内核参数来简单优化一下性能。
|
||||
|
||||
使用 `nano` 编辑器编辑 `sysctl` 的配置文件,使用以下命令:
|
||||
|
||||
```bash
|
||||
## 调整系统内核参数
|
||||
sudo nano /etc/sysctl.conf
|
||||
```
|
||||
|
||||
在编辑器对话框中输入以下内容,注意命令中间的空格:
|
||||
|
||||
```bash
|
||||
net.core.default_qdisc = fq_codel
|
||||
net.ipv4.tcp_congestion_control = bbr
|
||||
|
||||
net.ipv6.conf.all.disable_ipv6 = 1
|
||||
|
||||
net.ipv4.tcp_fastopen = 1
|
||||
net.ipv4.tcp_syncookies = 1
|
||||
net.ipv4.tcp_notsent_lowat = 131072
|
||||
|
||||
net.ipv4.tcp_ecn = 1
|
||||
net.ipv4.tcp_sack = 1
|
||||
net.ipv4.tcp_dsack = 1
|
||||
|
||||
net.ipv4.icmp_ratelimit = 50
|
||||
```
|
||||
Reference in New Issue
Block a user