软 中断 Irqbalance

ethtool --show-ntuple em2 rx-flow-hash udp4
      UDP over IPV4 flows use these fields for computing Hash flow key:
      IP SA
      IP DA
   Irqbalance 在均衡软中断时候,并不会将UDP的端口号作为计算哈希值的参数,所以我们的测试环境中是使用一台机器(sipp)    测试的话,软中断会集中到一个cpu上。

 

ethtool --config-ntuple eth0  rx-flow-hash udp4 sdfn

 

对于TCP的话设置如下

ethtool --config-ntuple eth0  rx-flow-hash tcp4 sdfn

 

因为忽略了端口号所以结果范围非常有限. 许多NIC是允许定制hash算法的. 同样, 使用ethtool, 我们可以选择用于哈希的元组(src IP, dst IP, src Port, dst Port):

receiver$ ethtool -N eth2 rx-flow-hash udp4 sdfn
Cannot change RX network flow hashing options: Operation not supported

说明这个NIC 是不支持定制hash 算法的

 

 

watch 'netstat -s --udp'

Udp:
      437.0k/s packets re

你可能感兴趣的:(软 中断 Irqbalance)