找回密码
 立即注册
搜索
热搜: SDN 云计算 H3C
查看: 3756|回复: 0

[CentOS] CentOS系统网卡buffer size过小导致错报error增长问题的解决方法

[复制链接]

57

主题

13

精华

8

回帖

管理员

体力
314 卡
贡献
161 个
金币
256 枚
注册时间
2018-8-25
最后登录
2025-3-1

活跃会员热心会员推广达人宣传达人灌水之王突出贡献优秀版主荣誉管理论坛元老最佳新人

发表于 2018-8-26 00:53:51 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

x
如果是10G端口,首先检查光模块是否有问题,可以通过排除法来排查。如果确定问题出在操作系统内部并非光模块问题,可以尝试如下方法能否修改问题。

在网上查看了一些文章,怀疑是因为网卡buffer size太小导致(This is a count of packets that have been dropped by the kernel, either due to a firewall configuration or due to a lack of network buffers.)。那我们就只有调整网卡buffersize,找了一些国外的文章,可以通过ethtool来修改网卡的buffer size ,首先要网卡支持,由于是NAT设备,我的全部是INTEL 的1000M网卡。

我们看看ethtool说明
-g –show-ring  www.2cto.com  
Queries the specified ethernet device for rx/tx ring parameter information.
-G –set-ring
Changes the rx/tx ring parameters of the specified ethernet device.
   

查看当前网卡的buffer size情况
ethtool -g eth0
Ring parameters for eth0:
Pre-set maximums:
RX:             4096
RX Mini:        0
RX Jumbo:       0
TX:             4096
Current hardware settings:
RX:             256
RX Mini:        0
RX Jumbo:       0
TX:             256
   

由于我的是rx包会有droped的情况
我们用  www.2cto.com  
ethtool -G eth0 rx 2048
同样 对于eth1也是如此
ethtool -G eth1 rx 2048
再看看修改过后的
ethtool -g eth0
Ring parameters for eth0:
Pre-set maximums:
RX:             4096
RX Mini:        0
RX Jumbo:       0
TX:             4096
Current hardware settings:
RX:             2048
RX Mini:        0
RX Jumbo:       0
TX:             2048


经过几个小时的观察,目前已经没有丢包增加的情况了。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表