在 CentOS(或一般的 Linux 服务器)语境里,“dropped” 通常指 网络丢包(packet dropped)、连接被丢弃(connection dropped),也可能是 系统日志里看到 dropped。不同场景原因不同,下面按最常见情况说明如何避免。
ip -s link
或
ifconfig
关注:
RX droppedTX droppedethtool -g eth0
增大环形缓冲区:
ethtool -G eth0 rx 4096 tx 4096
开启 IRQ 均衡:
systemctl start irqbalance
systemctl enable irqbalance
检查:
iptables -L -v -n
nft list ruleset
避免误丢:
现象:
dmesg | grep conntrack
解决:
sysctl -w net.netfilter.nf_conntrack_max=262144
写入:
/etc/sysctl.conf
查看:
ss -lnt
如果 Recv-Q 经常满:
调大:
sysctl -w net.core.somaxconn=65535
sysctl -w net.ipv4.tcp_max_syn_backlog=65535
应用层也要:
ulimit -n
修改:
/etc/security/limits.conf
* soft nofile 65535
* hard nofile 65535
free -m 监控如果你说的是 CentOS 8 被“dropped”(废弃):
✅ 避免方法:
dmesgip -s linkss -siptables -L -vjournalctl -p err如果你能告诉我:
我可以给你更精准的配置示例。