[root@localhost ixgbe]# cpupower frequency-info analyzing CPU 0: driver: cppc_cpufreq CPUs which run at the same hardware frequency: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 CPUs which need to have their frequency coordinated by software: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 maximum transition latency: 40.0 us hardware limits: 200 MHz - 2.60 GHz available cpufreq governors: conservative ondemand userspace powersave performance current policy: frequency should be within 1000 MHz and 2.60 GHz. The governor "performance" may decide which speed to use within this range. current CPU frequency: Unable to call hardware current CPU frequency: 2.60 GHz (asserted by call to kernel) [root@localhost ixgbe]#
[root@localhost ixgbe]# lspci -s 05:00.0 -vv | grep Lnk LnkCap: Port #0, Speed 8GT/s, Width x16, ASPM not supported, Exit Latency L0s unlimited, L1 unlimited LnkCtl: ASPM Disabled; RCB 128 bytes Disabled- CommClk- LnkSta: Speed 8GT/s, Width x16, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt- LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis- LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete+, EqualizationPhase1+ [root@localhost ixgbe]#
1. PCIe是否存在瓶頸?
因為報文從網卡到系統是經過PCIe總線來傳輸的,PCIe總線的吞吐將直接影響數據包從網卡拷貝到內存的速率。通過lspci -s 03:00.1 -vv | grep Lnk
可以查看當前網卡的PCIe速率,其中03:00.1是網卡的PCIe地址,可通過lspci -v|grep Ethernet
查到。
由上圖可以看到網口能力是傳輸速率5GT/s,總線寬帶x8(LnkCap),實際使用的是傳輸速率5GT/s,總線寬帶x8(LnkSta),工作正常。如果傳輸速率和總線帶寬下降,則需要調試PCIe兼容性問題。一般是服務器與網卡兼容性問題,可以更換網卡或者更換服務器。如果有條件,可以找服務器廠商從bios等方面進行詳細定位解決兼容性問題。
2. rte_rx_queue中的數據包沒有及時消費掉?
-
檢查CPU運行模式,
cpupower frequency-info
如果當前運行在powersave模式下,可以將其修改為performance,提升CPU頻率,cpupower frequency-set -g performance
。