在 CentOS(或一般 Linux 系统)中,dropped 增多通常指网络层面的 packet dropped(丢包) 或系统指标里看到的 dropped 计数上升。下面按常见场景系统说明原因和排查思路。
常见位置有:
RX dropped、TX dropped
常见原因
排查
ethtool -S eth0 | grep -i drop
ethtool -g eth0
优化示例
ethtool -G eth0 rx 4096 tx 4096
现象
si CPU 占用高排查
top
mpstat -P ALL 1
cat /proc/interrupts | grep eth
解决
net.core.netdev_budget关键参数
net.core.rmem_max
net.core.wmem_max
net.ipv4.tcp_rmem
net.ipv4.tcp_wmem
net.core.netdev_max_backlog
示例优化
sysctl -w net.core.netdev_max_backlog=5000
现象
查看
dmesg | grep conntrack
cat /proc/sys/net/netfilter/nf_conntrack_count
解决
sysctl -w net.netfilter.nf_conntrack_max=1048576
排查
iptables -L -n -v
如:
request_time 高、worker 不够dropped connethtool -S eth0 | grep dropcat /proc/net/devnetstat -s | grep -i dropdmesg | grep -i dropsi 是否高你可以补充:
我可以直接给你针对性调优方案。