故障现象:

    一批设备使用的是万兆光模块,当单台流量达到4G以上时量就会上不去且有dorp丢包现象。

同一批设备相同业务,量在4G以下的一切正常

设备故障信息如下:

wKiom1j4PBuTQz8dAAK7pqv13bs352.png-wh_50

wKioL1j4PB3zIiDqAAQYHIa4jWQ812.png-wh_50


处理过程:

1、  调整buffer_size缓冲大小(未解决该问题)

wKiom1j4PF_SBt75AADWIupb2ec140.png-wh_50

注:ethtool -G是暂时生效的,永久生效的话需要将ethtool设置写入/etc/rc.d/rc.local之中

2、  联系厂家更新驱动(未解决该问题)

3、  设置中断绑定在不同的cpu核心上(解决了该问题)

设置之前:cat /proc/interrupts |egrep "CPU|em1"

wKioL1j4PG-iWXi9AAPX_LtRPTw168.png-wh_50

设置之后:cat /proc/interrupts |egrep "CPU|em1"

wKioL1j4PHyi01LGAACQhFf5l2Y348.png-wh_50

修改过程:

1、安装irqbalance (原本没有这个服务,但对应的文件修改不了)

#yum -y install glib2-devel
#yum -y install irqbalance 
# /etc/init.d/irqbalance start
# /etc/init.d/irqbalance stop
[root@localhost ~]# cat /proc/interrupts|egrep "CPU|em1"
           CPU0       CPU1       CPU2       CPU3       CPU4       CPU5       CPU6       CPU7      
 104: 429863108          0          0          0     29594          0          0          0 IR-PCI-MSI-edge      em1-0
 105:  93211688          0         0          0          0          0       6662          0 IR-PCI-MSI-edge      em1-1
 106:  91114970          0          0          0          0          0          0          0 IR-PCI-MSI-edge      em1-2
 107:  79281082          0       5058         0          0          0          0          0 IR-PCI-MSI-edge      em1-3
 108:  85015088          0          0          0       5483          0          0          0 IR-PCI-MSI-edge      em1-4
[root@localhost ~]# cat/proc/irq/104/smp_affinity_list
4
[root@localhost ~]# cat/proc/irq/105/smp_affinity_list
6
[root@localhost ~]# cat/proc/irq/106/smp_affinity_list
0
[root@localhost ~]# cat/proc/irq/107/smp_affinity_list
2
[root@localhost ~]# cat/proc/irq/108/smp_affinity_list
4
[root@localhost ~]# echo '1' >/proc/irq/108/smp_affinity_list
[root@localhost ~]# cat/proc/irq/108/smp_affinity_list
1

 说明:

1、一般情况下不建议修改,irqbalance根据系统中断负载的情况,自动迁移中断保持中断的平衡,同时会考虑到省电因素等等。 但是在实时系统中会导致中断自动漂移,对性能造成不稳定因素,在高性能的场合建议关闭。

2、如果再次启动irqbalance服务,会覆盖掉之前修改的内容。

2、还有其他操作看附件{厂商给的}。

3、参考博文:

http://blog.chinaunix.net/uid-26642180-id-3131179.html

http://blog.csdn.net/liugongfeng/article/details/50311071

http://www.it165.net/os/html/201301/4427.html