网卡丢包问题定位
ifconfig看丢包可能是由于多种原因,您应该更深入地了解NIC统计信息以找出真正的原因。以下是一些一般原因
- NIC环形缓冲区已满,无法应付传入的流量突发
- 接收NIC中断的CPU非常忙,无法处理
- 一些电缆/硬件/双工问题
- NIC驱动程序中的一些错误
查看ethtool -S eth0并查看/proc/net/dev了解更多信息
➜ ~ ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.19.6.105 netmask 255.255.192.0 broadcast 172.19.63.255
ether 00:16:3e:18:9f:57 txqueuelen 1000 (Ethernet)
RX packets 11631990 bytes 3611913450 (3.3 GiB)
RX errors 0 dropped 216 overruns 0 frame 0
TX packets 10461655 bytes 2946312189 (2.7 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
➜ ~ ethtool -i eth0
driver: virtio_net
version: 1.0.0
firmware-version:
expansion-rom-version:
bus-info: 0000:00:03.0
supports-statistics: no
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no
➜ ~ ethtool -S eth0
no stats available
➜ ~ cat /proc/net/dev
Inter-| Receive | Transmit
face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
eth0: 3611947360 11632489 0 0 0 0 0 0 2946427291 10462601 0 0 0 0 0 0
lo: 4215 78 0 0 0 0 0 0 4215 78 0 0 0 0 0 0