我有一个处理大量stream量的Centos 6服务器。 我看到RX超支一直在增加:
RX packets:11191345002 errors:0 dropped:0 overruns:35592596 frame:0 TX packets:15262461573 errors:0 dropped:0 overruns:0 carrier:0 RX bytes:1871320014951 (1.7 TiB) TX bytes:12673638434114 (11.5 TiB)
根据http://www.tldp.org/LDP/nag2/x-087-2-iface.ifconfig.html
当数据包进入速度超过内核可以服务最后一个中断时,通常会发生接收超限。
应该调整哪些内核参数来解决这个问题?
我build议使用适当的tuned-adm
configuration文件为您的I / Oconfiguration。 对于这个设置,听起来像yum install tuned-utils
和tuned-adm profile enterprise storage
将是有帮助的。
在内核方面,您可以设置发送/接收缓冲区:
net.ipv4.tcp_window_scaling = 1 net.ipv4.tcp_rmem = 4096 87380 16777216 net.ipv4.tcp_wmem = 4096 65536 16777216 net.core.rmem_max = 16777216 net.core.wmem_max = 16777216
我会先尝试那些…
如果仍然有问题,可以使用ethtool -g
检查NIC环形缓冲区
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
所以你可以用ethtool -G eth0 rx 1024
修改rx从256到ethtool -G eth0 rx 1024
。