DPDK示例l3fwd性能测试

测试环境

CPU: Intel® Xeon® Gold 5122 CPU @ 3.60GHz
Cache: 16896 KB
Memory: 16G

X710 driver: i40e-2.11.29
X710 expansion-rom-version: 4.53 0x80001cdf 0.0.0

DPDK: dpdk-20.05

BIOS设置

CPU Power and Performance Policy
CPU C-state Disabled
CPU P-state Disabled
Enhanced Intel® Speedstep® Tech Disabled
Turbo Boost Disabled
Intel VT Fordirected I/O(VT-d) Enable
Intel Virtualization Technology (VT-x) Enable

内核启动参数

巨页设置: “default_hugepagesz=1G hugepagesz=1G hugepages=8”
IOMMU: “intel_iommu=on iommu=pt”
核心隔离: “isolcpus=4,5 nohz_full=4,5 rcu_nocbs=4,5”

以上核心隔离的配置,对于RFC2544不丢包测试比较关键。

l3fwd示例

安装DPDK官方的文档,要达到最好的性能,需要将以下两个变量,发送和接收描述符数量调整为2048,l3fwd示例中默认的值为1024。

/*
 * Configurable number of RX/TX ring descriptors
 */
#define RTE_TEST_RX_DESC_DEFAULT 1024
#define RTE_TEST_TX_DESC_DEFAULT 1024

但是在本环境中,经过测试描述符数量设置为4096,性能最好。

l3fwd参数配置如下,核心使用4和5,端口数量为2,其中端口0的队列0由核心4处理,端口1的队列0由核心5处理。

./fastpath -c 0x30 – -p 0x3 -P --config="(0,0,4),(1,0,5)"

测试数据

64字节报文,双向流量,可达到线速的75%。
DPDK官方测试数据可参见链接: DPDK_20_05_Intel_NIC_performance_report

因项目需求,需要用到dpdk l3fwd-power例子,每个核处理0号port的单个队列,但尝试后用单核单队列命令可以跑,多核下每个线程都卡在epoll_wait上,无响应,例子是自带的 参数: ./l3fwd-power -l 0-3 -n 4 -- -p 3 --config "(0,0,0),(0,1,1)" 输出: root@ubuntu:~/dpdk-18.08/examples/l3fwd-power/build# ./l3fwd-power -l 0-1 -n 4 -- -p 3 --config "(0,0,0),(0,1,1)" EAL: Detected 4 lcore(s) EAL: Detected 1 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Probing VFIO support... EAL: no supported IOMMU extensions found! EAL: VFIO support could not be initialized EAL: PCI device 0000:01:00.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:1539 net_e1000_igb EAL: PCI device 0000:02:00.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:1539 net_e1000_igb EAL: PCI device 0000:03:00.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:1539 net_e1000_igb EAL: PCI device 0000:06:00.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:1539 net_e1000_igb EAL: PCI device 0000:07:00.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:1539 net_e1000_igb EAL: PCI device 0000:08:00.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:1539 net_e1000_igb POWER: Attempting to initialise ACPI cpufreq power management... POWER: Power management governor of lcore 0 has been set to user space successfully POWER: File not openned POWER: Cannot get available frequencies of lcore 0 POWER: Attempting to initialise VM power management... GUEST_CHANNEL: Opening channel '/dev/virtio-ports/virtio.serial.port.poweragent.0' for lcore 0 GUEST_CHANNEL: Unable to to connect to '/dev/virtio-ports/virtio.serial.port.poweragent.0' with error No such file or directory POWER: Unable to set Power Management Environment for lcore 0 POWER: Library initialization failed on core 0 POWER: Attempting to initialise ACPI cpufreq power management... POWER: Power management governor of lcore 1 has been set to user space successfully POWER: File not openned POWER: Cannot get available frequencies of lcore 1 POWER: Attempting to initialise VM power management... GUEST_CHANNEL: Opening channel '/dev/virtio-ports/virtio.serial.port.poweragent.1' for lcore 1 GUEST_CHANNEL: Unable to to connect to '/dev/virtio-ports/virtio.serial.port.poweragent.1' with error No such file or directory POWER: Unable to set Power Management Environment for lcore 1 POWER: Library initialization failed on core 1 Initializing port 0 ... Creating queues: nb_rxq=2 nb_txq=2... Address:00:02:B6:85:1E:C2, Allocated mbuf pool on socket 0 LPM: Adding route 0x01010100 / 24 (0) LPM: Adding route 0x02010100 / 24 (1) LPM: Adding route 0x03010100 / 24 (2) LPM: Adding route 0x04010100 / 24 (3) LPM: Adding route 0x05010100 / 24 (4) LPM: Adding route 0x06010100 / 24 (5) LPM: Adding route 0x07010100 / 24 (6) LPM: Adding route 0x08010100 / 24 (7) txq=0,0,0 txq=1,1,0 Initializing port 1 ... Creating queues: nb_rxq=0 nb_txq=2... Address:00:02:B6:85:1E:C3, txq=0,0,0 txq=1,1,0 Skipping disabled port 2 Skipping disabled port 3 Initializing rx queues on lcore 0 ... rxq=0,0,0 Initializing rx queues on lcore 1 ... rxq=0,1,0 Checking link status.........................................done Port 0 Link Up - speed 100 Mbps - full-duplex Port 1 Link Up - speed 1000 Mbps - full-duplex L3FWD_POWER: entering main loop on lcore 1 L3FWD_POWER: -- lcoreid=1 portid=0 rxqueueid=1 L3FWD_POWER: entering main loop on lcore 0 L3FWD_POWER: -- lcoreid=0 portid=0 rxqueueid=0 EAL: Event already been added. L3FWD_POWER: lcore 1 sleeps until interrupt triggers L3FWD_POWER: lcore 0 sleeps until interrupt triggers L3FWD_POWER: lcore 1 is waked up from rx interrupt on port 0 queue 1 L3FWD_POWER: lcore 1 sleeps until interrupt triggers 备注: intel电源管理技术没开启,不过从代码看应该不影响 系统环境: Linux ubuntu 4.4.0 x64 Ubuntu 16.04.5 LTS dpdk18.08 网卡I211 4口 2队列 4核
©️2020 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页