Re: DPDK testpmd forwarding performace degradation
From: Alexander Belyakov <hidden>
Date: 2015-01-29 12:43:45
On Wed, Jan 28, 2015 at 3:24 PM, Alexander Belyakov [off-list ref] wrote:
On Tue, Jan 27, 2015 at 7:21 PM, De Lara Guarch, Pablo < pablo.de.lara.guarch-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote:quoted
quoted
On Tue, Jan 27, 2015 at 10:51 AM, Alexander Belyakovquoted
[off-list ref] wrote:quoted
quoted
Hi Pablo,quoted
quoted
On Mon, Jan 26, 2015 at 5:22 PM, De Lara Guarch, Pabloquoted
[off-list ref] wrote:quoted
Hi Alexander,quoted
quoted
quoted
-----Original Message-----quoted
quoted
From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org <redacted>] OnBehalf Of Alexanderquoted
Belyakovquoted
quoted
Sent: Monday, January 26, 2015 10:18 AMquoted
quoted
To: dev-VfR2kkLFssw@public.gmane.orgquoted
quoted
Subject: [dpdk-dev] DPDK testpmd forwarding performace degradationquoted
quoted
quoted
quoted
Hello,quoted
quoted
quoted
quoted
recently I have found a case of significant performance degradationfor ourquoted
quoted
application (built on top of DPDK, of course). Surprisingly, similarissuequoted
quoted
is easily reproduced with default testpmd.quoted
quoted
quoted
quoted
To show the case we need simple IPv4 UDP flood with variable UDPquoted
payloadquoted
quoted
size. Saying "packet length" below I mean: Eth header length (14bytes) +quoted
quoted
IPv4 header length (20 bytes) + UPD header length (8 bytes) + UDPpayloadquoted
quoted
length (variable) + CRC (4 bytes). Source IP addresses and ports arequoted
selectedquoted
quoted
randomly for each packet.quoted
quoted
quoted
quoted
I have used DPDK with revisions 1.6.0r2 and 1.7.1. Both show the samequoted
issue.quoted
quoted
quoted
quoted
Follow "Quick start" guide (http://dpdk.org/doc/quick-start) tobuild andquoted
quoted
run testpmd. Enable testpmd forwarding ("start" command).quoted
quoted
quoted
quoted
Table below shows measured forwarding performance depending onquoted
packetquoted
quoted
length:quoted
quoted
quoted
quoted
No. -- UDP payload length (bytes) -- Packet length (bytes) --Forwardingquoted
quoted
performance (Mpps) -- Expected theoretical performance (Mpps)quoted
quoted
quoted
quoted
1. 0 -- 64 -- 14.8 -- 14.88quoted
quoted
2. 34 -- 80 -- 12.4 -- 12.5quoted
quoted
3. 35 -- 81 -- 6.2 -- 12.38 (!)quoted
quoted
4. 40 -- 86 -- 6.6 -- 11.79quoted
quoted
5. 49 -- 95 -- 7.6 -- 10.87quoted
quoted
6. 50 -- 96 -- 10.7 -- 10.78 (!)quoted
quoted
7. 60 -- 106 -- 9.4 -- 9.92quoted
quoted
quoted
quoted
At line number 3 we have added 1 byte of UDP payload (comparing toquoted
quoted
previousquoted
quoted
line) and got forwarding performance halved! 6.2 Mpps against 12.38Mppsquoted
quoted
ofquoted
quoted
expected theoretical maximum for this packet size.quoted
quoted
quoted
quoted
That is the issue.quoted
quoted
quoted
quoted
Significant performance degradation exists up to 50 bytes of UDPpayloadquoted
quoted
(96 bytes packet length), where it jumps back to theoretical maximum.quoted
quoted
quoted
quoted
What is happening between 80 and 96 bytes packet length?quoted
quoted
quoted
quoted
This issue is stable and 100% reproducible. At this point I am notsure ifquoted
quoted
it is DPDK or NIC issue. These tests have been performed on Intel(R)Ethquoted
quoted
Svr Bypass Adapter X520-LR2 (X520LR2BP).quoted
quoted
quoted
quoted
Is anyone aware of such strange behavior?quoted
I cannot reproduce the issue using two ports on two different 82599EBNICs,quoted
using 1.7.1 and 1.8.0.quoted
I always get either same or better linerate as I increase the packetsize.quoted
quoted
Thank you for trying to reproduce the issue.quoted
quoted
Actually, have you tried using 1.8.0?quoted
quoted
I feel 1.8.0 is little bit immature and might require some post-releasequoted
patching. Even tespmd from this release is not forwarding packetsproperlyquoted
on my setup. It is up and running without visible errors/warnings, TX/RXquoted
counters are ticking but I can not see any packets at the output.This is strange. Without changing anything, forwarding works perfectly for me (so, RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC is enabled).quoted
Please note, both 1.6.0r2 and 1.7.1 releases work (on the same setup)out-of-the-box justquoted
fine with only exception of this mysterious performance drop.quoted
So it will take some time to figure out what is wrong with dpdk-1.8.0.quoted
Meanwhile we could focus on stable dpdk-1.7.1.quoted
quoted
Managed to get testpmd from dpdk-1.8.0 to work on my setup.quoted
Unfortunately I had to disable RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC,quoted
it is new comparing to 1.7.1 and somehow breaks testpmd forwarding. Bythequoted
way, simply disabling RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC inquoted
common_linuxapp config file breaks the build - had to makequick'n'dirty fixquoted
in struct igb_rx_queue as well.quoted
quoted
Anyway, issue is still here.quoted
quoted
Forwarding 80 bytes packets at 12.4 Mpps.quoted
Forwarding 81 bytes packets at 7.2 Mpps.quoted
quoted
Any ideas?quoted
As for X520-LR2 NIC - it is dual port bypass adapter with device id155d. Iquoted
believe it should be treated as 82599EB except bypass feature. I putbypassquoted
mode to "normal" in those tests.I have used a 82599EB first, and now a X520-SR2. Same results. I assume that X520-SR2 and X520-LR2 should give similar results (only thing that is changed is the wavelength, but the controller is the same).It seems I found what was wrong, at least got a hint. My build server machine type differs from test setup. Until now it was OK to build DPDK with -march=native. I found that building dpdk-1.8.0 with explicitly set core-avx-i (snb, ivb) or bdver2 (amd) machine types almost eliminates performance drop. The same goes for RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC option issues. It seems DPDK performance and stability depends on machine type more than I was expecting. Thank you for your help.
Mysteries are still here. While single RX queue forwarding shows almost no degradation now, multiple RX queues still do. Launching ./testpmd -c7 -n3 -- -i --rxq=2 --txq=2 --nb-cores=2 --nb-ports=2 shows the following result: 80 bytes packets are being forwarded at 12.46Mpps rate (which is fine) 81 bytes packets are being forwarded at 7.5Mpps rate (which is weird) Pablo, could you please check on your setup if multiple RX queues shows no performance degradation depending on packet size? Additional information about packets I'm sending. 80 bytes packet is IPv4 UDP packet (with random source IP/port) and 34 payload bytes. 81 bytes packet is IPv4 UDP packet (with random source IP/port) and 35 payload bytes. Thank you, Alexander
Alexander Pabloquoted
quoted
Alexanderquoted
quoted
quoted
Pabloquoted
quoted
quoted
quoted
Regards,quoted
quoted
Alexander Belyakovquoted
quoted