你提到的 “CentOS dropped” 通常有两种常见理解,我先分别说明,再给你系统性调优思路。如果你指的是某一种具体情况,可以再补充。
常见于:
ifconfig / ip -s link 中 RX/TX droppednetstat -s 中有 packet receive errorsip -s link
ethtool -S eth0 | grep -i drop
cat /proc/net/dev
ethtool -L eth0 combined 8 # 多队列
irqbalance
cat >> /etc/sysctl.conf <<EOF
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
net.core.netdev_max_backlog = 10000
net.ipv4.tcp_max_syn_backlog = 8192
EOF
sysctl -p
net.ipv4.tcp_tw_reuse = 1
比如:
dmesg 中有 Out of memorydmesg | egrep -i "killed|oom|drop"
free -h
top
iostat -x 1
# 减少 swap 使用
vm.swappiness = 10
# 避免 OOM kill
vm.overcommit_memory = 2
vm.overcommit_ratio = 90
# 调度器
echo deadline > /sys/block/sda/queue/scheduler
# 文件系统
mount -o noatime,nodiratime /dev/sda1 /data
CentOS 8 已停止维护,常见“dropped”指官方支持结束。
迁移示例:
# Rocky
dnf install -y rockylinux-repos
uptime
dmesg | tail
journalctl -p err -xb
ss -s
sar -n DEV 1
如果你能补充:
我可以直接给你针对性参数。