某局点2288V3服务器出现网卡丢包问题处理案例

 
问题描述

局点使用多台RH2288V3服务器,部署了华为大数据平台,通过fusionInsightmanager大数据管理界面发现一直上报网络丢包告警,业务侧反馈数据查询和写入时延较大;

 
告警信息

在大数据管理界面上持续上报网络丢包告警;

 
处理过程

从收集的信息来看万兆网卡丢包统计如下:
eth2      Link encap:Ethernet  HWaddr E4:A8:B6:97:A2:CE 
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:22311179313 errors:0 dropped:212932 overruns:0 frame:0
          TX packets:19863061884 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:49594989710939 (45.1 TiB)  TX bytes:27686963916333 (25.1 TiB)
 
eth3      Link encap:Ethernet  HWaddr E4:A8:B6:97:A2:CE 
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:46459354889 errors:0 dropped:312597 overruns:0 frame:0
          TX packets:58374998148 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:95965226801957 (87.2 TiB)  TX bytes:69855612439915 (63.5 TiB)
 
ethtool -S eth2
{
NIC statistics:
     rx_packets: 22311179703
     tx_packets: 19863062276
     rx_bytes: 49594989747075
     tx_bytes: 27686963955170
     rx_pkts_nic: 35662916328
     tx_pkts_nic: 19863062274
     rx_bytes_nic: 50620484550566
     tx_bytes_nic: 27766799456380
     lsc_int: 9
     tx_busy: 0
     non_eop_descs: 20975198746
     rx_errors: 0
     tx_errors: 0
     rx_dropped: 0
     tx_dropped: 0
     multicast: 1091666
     broadcast: 937755
     rx_no_buffer_count: 0
     collisions: 0
     rx_over_errors: 0
     rx_crc_errors: 0
     rx_frame_errors: 0
     hw_rsc_aggregated: 18940077554
     hw_rsc_flushed: 5588340927
     fdir_match: 21123563285
     fdir_miss: 18307510764
     fdir_overflow: 58857
     rx_fifo_errors: 0
     rx_missed_errors: 212932
 
ethtool -S eth3
{
NIC statistics:
     rx_packets: 46459355292
     tx_packets: 58374998542
     rx_bytes: 95965226840776
     tx_bytes: 69855612477675
     rx_pkts_nic: 58927970523
     tx_pkts_nic: 58374998539
     rx_bytes_nic: 97025415708655
     tx_bytes_nic: 70089871434535
     lsc_int: 9
     tx_busy: 0
     non_eop_descs: 40836101363
     rx_errors: 0
     tx_errors: 0
     rx_dropped: 0
     tx_dropped: 0
     multicast: 1091738
     broadcast: 5089745
     rx_no_buffer_count: 0
     collisions: 0
     rx_over_errors: 0
     rx_crc_errors: 0
     rx_frame_errors: 0
     hw_rsc_aggregated: 20910806075
     hw_rsc_flushed: 8442190819
     fdir_match: 52579073218
     fdir_miss: 6482918673
     fdir_overflow: 116389
     rx_fifo_errors: 0
     rx_missed_errors: 312597
总体丢包在十万分之一以下,以后端实验室标准属于大压力下正常丢包情况,且丢包类型都为rx_missed_errors,是CPU处理不过来DMA中的ring buffer缓存报文导致的丢包,网卡硬件和网络协议栈层面没有异常。
同时,现场服务器的操作系统版本为RHEL6.5原生未升级版本:
Kernel /boot/vmlinuz-2.6.32-431.el6.x86_64 ro root=UUID=4646c097-2af0-44d5-9a1d-3c3c9a54f353 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
其bonding模块有影响性能的缺陷,参考如下红帽官网链接:
https://access.redhat.com/solutions/631123



综上所述,现场网口丢包类型为CPU无法及时处理内存DMA区域中报文导致;当前操作系统内核网卡bonding模块的缺陷,建议升级操作系统内核并进行网卡调优。
 
根因
现场网口丢包类型为CPU无法及时处理内存DMA区域中报文导致;当前操作系统内核网卡bonding模块的缺陷,建议升级操作系统内核并进行网卡调优;
解决方案

1、升级Redhat操作系统内核至2.6.32-431.11.2.el6或者以上版本,消除负面影响网卡性能因素;
2、将网卡驱动更新为华为support官网发布的网卡驱动(原生驱动不支持性能调优,且性能较低,不支持设置RSS),设置网卡RSS参数,使得网卡的各个中断队列处理能够均分在每一个CPU核上去执行。根据日志,现网服务器CPU型号为E5-2618L v3,开启了超线程之后为16核,因此,可以设置RSS参数为16。

用新的RSS参数加载驱动并生效,以主机配置4个Intel 82599万兆网口为例,在进行此步操作前请先暂停业务和网络服务
  1. <!--[if !supportLists]--><!--[endif]-->rmmod ixgbe   /*卸载旧驱动*/
  2. <!--[if !supportLists]--><!--[endif]-->modprobe ixgbe RSS=16,16,16,16
  3. <!--[if !supportLists]--><!--[endif]-->执行dmesg | grep –i tx  查看是否有类似如下回显,确认所有万兆网口队列深度已改成16:


  1. <!--[if !supportLists]--><!--[endif]-->执行service network restart将所有网口up起来, 以二张双口万兆网卡端口号为eth0~eth3为例:
输入ethtool -G eth0 tx 1024
       ethtool -G eth0 rx 1024
       ethtool -G eth1 tx 1024
       ethtool -G eth1 rx 1024
   ethtool -G eth2 tx 1024
       ethtool -G eth2 rx 1024
       ethtool -G eth3 tx 1024
       ethtool -G eth3 rx 1024
统一修改ring buffer深度为1024,该命令立即生效,无需重启系统或网络服务。
  1. <!--[if !supportLists]--><!--[endif]-->恢复业务
  2. <!--[if !supportLists]--><!--[endif]-->参考/proc/interrupts文件中的信息,可以进一步根据新的网口中断情况进行网卡中断绑定操作,将各网卡发出的中断通过CPU绑定手段精确绑定到挂载该网卡资源的CPU上,以两张双口万兆网卡分别插在RH5885 V3的Slot1和Slot2,且端口号为eth0~eth3为例, eth0~eth3可全部绑定在node1(CPU2)下属的CPU线程8-15,40-47上,此操作不会中断网络;具体绑定操作方法参考附录二。此外也可以直接使用操作系统自带的irqbalance服务自动分配中断所属CPU(前提是RSS参数已经做过调整)。
  3. <!--[if !supportLists]--><!--[endif]-->在/etc/modprobe.conf中追加options ixgbe RSS=16,16,16,16
这样服务器重启后配置依然生效。


 
建议与总结

  1. <!--[if !supportLists]--><!--[endif]-->建议定期巡检服务器硬件和大数据软件平台,如果发现有异常告警及时处理;
  2. <!--[if !supportLists]--><!--[endif]-->网络丢包类问题可以尝试从网卡参数调优这个角度着手;

 
END