注: 测试使用, 正常应用不要开启
五元组不同, 开启ntuple
ethtool --config-ntuple eth12 rx-flow-hash udp4 sdfn
Mem: 483060K used, 15719212K free, 0K shrd, 188K buff, 150536K cached
CPU0: 0.0% usr 0.0% sys 0.0% nic 58.0% idle 0.0% io 0.0% irq 41.9% sirq
CPU1: 0.0% usr 0.0% sys 0.0% nic 82.0% idle 0.0% io 0.0% irq 17.9% sirq
CPU2: 0.0% usr 0.0% sys 0.0% nic 79.2% idle 0.0% io 0.0% irq 20.7% sirq
CPU3: 0.0% usr 0.0% sys 0.0% nic 82.4% idle 0.0% io 0.0% irq 17.6% sirq
CPU4: 0.0% usr 0.0% sys 0.0% nic 78.0% idle 0.0% io 0.0% irq 21.9% sirq
CPU5: 0.0% usr 0.0% sys 0.0% nic 81.4% idle 0.0% io 0.0% irq 18.5% sirq
CPU6: 0.0% usr 0.0% sys 0.0% nic 79.4% idle 0.0% io 0.0% irq 20.5% sirq
CPU7: 0.0% usr 0.0% sys 0.0% nic 100% idle 0.0% io 0.0% irq 0.0% sirq
开启后, 多队列可以同时接收. 如下:
# ethtool -S eth12 | grep rx_queue_
rx_queue_0_packets: 451336447
rx_queue_0_bytes: 27080186820
rx_queue_1_packets: 389160137
rx_queue_1_bytes: 23349608220
rx_queue_2_packets: 389142927
rx_queue_2_bytes: 23348575620
rx_queue_3_packets: 389148391
rx_queue_3_bytes: 23348903460
rx_queue_4_packets: 389170069
rx_queue_4_bytes: 23350204140
rx_queue_5_packets: 389152692
rx_queue_5_bytes: 23349161520
rx_queue_6_packets: 389175852
rx_queue_6_bytes: 23350551120
rx_queue_7_packets: 389118657
rx_queue_7_bytes: 23347119420