- 论坛徽章:
- 0
|
服务器用于做NAT转换,之前发现软中断集中在一个CPU上,SI占用率接近100%,因为netfilter的处理都在软中断里,软中断的处理没有在多CPU上均衡,有丢包现象,后采用多队列网卡,结果发现,SI占用率仍然比较高,但不会总这样高。
top - 14:00:00 up 6:01, 4 users, load average: 4.82, 4.97, 4.88
Tasks: 140 total, 7 running, 133 sleeping, 0 stopped, 0 zombie
Cpu0 : 1.3%us, 8.6%sy, 0.0%ni, 63.2%id, 23.5%wa, 0.0%hi, 3.3%si, 0.0%st
Cpu1 : 0.0%us, 0.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi,100.0%si, 0.0%st
Cpu2 : 0.0%us, 0.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.3%hi, 99.7%si, 0.0%st
Cpu3 : 0.0%us, 0.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.3%hi, 99.7%si, 0.0%st
Cpu4 : 0.0%us, 0.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.3%hi, 99.7%si, 0.0%st
Cpu5 : 0.0%us, 0.0%sy, 0.0%ni, 64.0%id, 0.0%wa, 14.3%hi, 21.7%si, 0.0%st
Cpu6 : 0.7%us, 4.7%sy, 0.0%ni, 12.0%id, 0.0%wa, 1.0%hi, 81.7%si, 0.0%st
Cpu7 : 0.0%us, 0.0%sy, 0.0%ni, 15.0%id, 0.0%wa, 0.7%hi, 84.3%si, 0.0%st
Mem: 4043220k total, 4013728k used, 29492k free, 266680k buffers
Swap: 2031608k total, 136k used, 2031472k free, 3178176k cached
仍然有丢包现象
ethtool -S eth5
NIC statistics:
rx_packets: 3637695389
tx_packets: 3580576262
rx_bytes: 1174229568628
tx_bytes: 498786511822
rx_broadcast: 2388
tx_broadcast: 1
rx_multicast: 0
tx_multicast: 16
rx_errors: 0
tx_errors: 0
tx_dropped: 0
multicast: 0
collisions: 0
rx_length_errors: 0
rx_over_errors: 0
rx_crc_errors: 0
rx_frame_errors: 0
rx_no_buffer_count: 12728808
rx_missed_errors: 30191542
最后两个出错信息是读网卡寄存器获得的,我查了intel的manual,把rx descriptor调到最大,仍然不行。服务器是DELL的,基本同样的应用和负载,在IBM服务器上没有这个问题,和PCI总线的带宽有关?
Missed Packets Count
MPC (04010h; RC)
Counts the number of missed packets. Packets are missed when the receive FIFO has insufficient
space to store the incoming packet. This can be caused because of too few buffers allocated, or
because there is insufficient bandwidth on the PCI bus. Events setting this counter cause RXO, the
Receiver Overrun Interrupt, to be set. This register does not increment if receives are not enabled.
These packets are also counted in the Total Packets Received register as well as in Total Octets
Received.
Receive No Buffers Count
RNBC (040A0h; RC)
This register counts the number of times that frames were received when there were no available
buffers in host memory to store those frames (receive descriptor head and tail pointers were equal).
The packet is still received if there is space in the FIFO. This register only increments if receives
are enabled.
This register does not increment when flow control packets are received. |
|