https://decodezp.github.io/2019/01/22/test5-linux-network-performance-optimization/
https://blog.csdn.net/sinat_20184565/article/details/88127851
RSS Hash配置,采集程序配置同一个流进一个队列的配置
这里可以决定针对不同的流量(IPv4-tcp, IPv4-udp, IPv6-tcp, Ethernet…)采用报文的哪些字段进行RSS Hash。
有没有体验过UDP流量换了端口号还是始终进入同一条队列的恐惧?
那是因为:
1 2 3 4 | root@OpenWrt:~# ethtool -n eth0 rx-flow-hash udp4 UDP over IPV4 flows use these fields for computing Hash flow key: IP SA IP DA |
针对UDP流量只用Src IP和dst IP做哈希…如果这两个字段没变化那么就只能进入同一条队列…
想添加上src和dst port一同作为RSS的字段:
ethtool -N eth3 rx-flow-hash udp4 sdfn
查看一下man ethtool可以明白sdfn的意义:
1 2 3 4 5 6 7 8 9 | m Hash on the Layer 2 destination address of the rx packet.
v Hash on the VLAN tag of the rx packet.
t Hash on the Layer 3 protocol field of the rx packet.
s Hash on the IP source address of the rx packet.
d Hash on the IP destination address of the rx packet.
f Hash on bytes 0 and 1 of the Layer 4 header of the rx packet.
n Hash on bytes 2 and 3 of the Layer 4 header of the rx packet.
r Discard all packets of this flow type. When this option is
set, all other options are ignored.
|
本文探讨了如何通过ethtool工具调整网络设备的RSSHash配置,重点在于UDP流量的处理,解释了为何不同端口的UDP流量可能仍进入同一队列,并提供了如何利用SrcIP、DstIP和SrcPort/DstPort进行哈希以实现流量分发的技巧。
2296

被折叠的 条评论
为什么被折叠?



