軟 中斷 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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章