DPDK usage discussions
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: "Ruslan R. Laishev" <zator@yandex.ru>
Cc: "users@dpdk.org" <users@dpdk.org>
Subject: Re: Performance "problem" or how to get power of the DPDK
Date: Mon, 26 Dec 2022 23:04:51 +0300	[thread overview]
Message-ID: <20221226230451.690c3986@sovereign> (raw)
In-Reply-To: <279421672082645@mail.yandex.ru>

2022-12-26 22:24 (UTC+0300), Ruslan R. Laishev:
> Sorry, right interface:
>  
> Network devices using DPDK-compatible driver
> ============================================
> 0000:09:00.0 'Ethernet Connection X553 10 GbE SFP+ 15c4' drv=igb_uio unused=ixgbe,vfio-pci
>  
>  
> 26.12.2022, 22:21, "Ruslan R. Laishev" <zator@yandex.ru>:
> There is what i do at xmiter side, may be u will get a quantum to see a code of pupil:  https://pastebin.com/1WMyXtr5

I see nothing terribly wrong there.
If you run it on more then one core each using a distinct Tx queue,
do you see a performance increase?

You might want to remove the shared atomic counter;
use simple per-lcore counters and sum them for display.
Also, if "g_nqueue" is not const, "%" should not be used on the data path.

> > I spent some time with the testpmd, sorry but there is not an ability to get rate information on sending, may be i'll add it into the code ...

Run testpmd as follows to make it transmit packets
(add DPDK options before "--" as needed):

dpdk-testpmd -- --forward-mode=txonly --tx-first

It will print statistics on exit ("exit" or Ctrl+C).

> > Some statistics (rte_eth_stats)  :
> >  
> > Date;Time;Device;Port;Name;Area;In pkts;Out pkts;In bytes;Out bytes;In missed;In errors;Out errors;No mbufs;
> > (payload is 0 octets)
> > 26-12-2022; 22:14:10; 0000:09:00.0; _PEA00:; WAN0; WAN; 0; 21122753; 0; 1563085750; 0; 0; 0; 0
> > 26-12-2022; 22:14:20; 0000:09:00.0; _PEA00:; WAN0; WAN; 0; 21122392; 0; 1563057008; 0; 0; 0; 0
> > 26-12-2022; 22:14:30; 0000:09:00.0; _PEA00:; WAN0; WAN; 0; 21121978; 0; 1563024500; 0; 0; 0; 0
> > 26-12-2022; 22:14:40; 0000:09:00.0; _PEA00:; WAN0; WAN; 0; 21122012; 0; 1563028888; 0; 0; 0; 0
> >  
> > (payload is 1024 octets)
> > 26-12-2022; 22:15:20; 0000:09:00.0; _PEA00:; WAN0; WAN; 0; 5246799; 0; 4648659464; 0; 0; 0; 0
> > 26-12-2022; 22:15:30; 0000:09:00.0; _PEA00:; WAN0; WAN; 0; 5246456; 0; 4648360016; 0; 0; 0; 0
> > 26-12-2022; 22:15:40; 0000:09:00.0; _PEA00:; WAN0; WAN; 0; 5246168; 0; 4648108408; 0; 0; 0; 0
> > 26-12-2022; 22:15:50; 0000:09:00.0; _PEA00:; WAN0; WAN; 0; 5246143; 0; 4648084478; 0; 0; 0; 0
> > 26-12-2022; 22:16:00; 0000:09:00.0; _PEA00:; WAN0; WAN; 0; 5246129; 0; 4648070294; 0; 0; 0; 0
> >  
> > A piece of the DPDK-DEVBIND.SH
> > 0000:02:00.0 'I211 Gigabit Network Connection 1539' if=enp2s0 drv=igb unused=igb_uio,vfio-pci *Active*
> >  
> > 26.12.2022, 16:22, "Ruslan R. Laishev" <zator@yandex.ru>:
> > Thanks for the answer.
> >>  
> >> Oops, sorry, some details:
> >> - one core run generator routine
> >> - one core run routine to save/display statistic
> >>  
> >> core run a generator routine like:
> >>  
> >> while (1) {
> >> get buffer from pool
> >> make eth+ip+udp header (it's static content)
> >> generate payload like memset(packet.payload , 'A' + something, payload_size);
> >> generate packet sequence and CRC32C  - and add it to the payload part
> >> "send" packet to tx_buffer
> >>  
> >> if (tx_buffer.size == tx_buffer.length)
> >> do flush()
> >> }
> >>  
> >> "header; part of the packet : sizeof(eth+ip+udp) -
> >> "payload" part - 20-1024 octets

From your statistics I calculate 74 bytes per packet (Ethernet),
i.e. the theoretical maximum for 10 Gbps is 12.25 Mpps,
with packet budget of 81 ns per packet.

https://calc.pktgen.com/#gbe=20&payload=40&rate=12250000&header=20

> >> RSS - it's on received side, yes ?

Correct.
I asked because it was unclear from the initial message
whether you app does the receiving or not.

P.S. Please avoid top-posting, i.e. reply below the quote.

  reply	other threads:[~2022-12-26 20:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-26 12:20 Ruslan R. Laishev
2022-12-26 13:07 ` Dmitry Kozlyuk
2022-12-26 13:22   ` Ruslan R. Laishev
2022-12-26 19:21     ` Ruslan R. Laishev
2022-12-26 19:24       ` Ruslan R. Laishev
2022-12-26 20:04         ` Dmitry Kozlyuk [this message]
2022-12-26 20:10           ` Ruslan R. Laishev
2023-01-08 13:23           ` One transmitter worker stop after "some time" (Was: Performance "problem" or how to get power of the DPDK ) Ruslan R. Laishev
2023-01-08 17:13             ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221226230451.690c3986@sovereign \
    --to=dmitry.kozliuk@gmail.com \
    --cc=users@dpdk.org \
    --cc=zator@yandex.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).