DPDK usage discussions
 help / color / mirror / Atom feed
From: Filip Janiszewski <contact@filipjaniszewski.com>
To: "users@dpdk.org" <users@dpdk.org>
Subject: rte_pktmbuf_free_bulk vs rte_pktmbuf_free
Date: Tue, 11 Jan 2022 13:12:24 +0100	[thread overview]
Message-ID: <5ecf22af-ac38-7dd5-b3ce-5b2ccf60b32f@filipjaniszewski.com> (raw)

Hi,

Is there any specific reason why using rte_pktmbuf_free_bulk seems to be
much slower than rte_pktmbuf_free in a loop? (DPDK 21.11)

I ran a bunch of tests on a 50GbE link where I'm getting packet drops
(running with too few RX cores on purpose, to make some performance
verification) and when the time comes to release the packets, i did a
quick change like this:

.
            //rte_pktmbuf_free_bulk( data, pkt_cnt );
            for( idx = 0 ; idx < pkt_cnt ; ++idx ) {
                rte_pktmbuf_free( data[ idx ] );
            }
.

And suddenly I'm dropping around 10% less packets (The traffic rate is
around ~95Mpps). In case that's relevant, RX from the nic is done on a
separate core than where the pkts are released (processed and released)

I did also the following experiment: Found the MPPs speed value where i
get around 2-5% drops using rte_pktmbuf_free_bulk, executed a bunch of
readings where I consistently get drops.. Then switched to the loop with
rte_pktmbuf_free and executed the same tests again, of a sudden I can't
drop anymore.

Isn't this strange? I was sure rte_pktmbuf_free_bulk would be kind of
optimized for bulk releases so people don't have to loop themselves.

Thanks

-- 
BR, Filip
+48 666 369 823

             reply	other threads:[~2022-01-11 12:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-11 12:12 Filip Janiszewski [this message]
2022-01-11 18:02 ` Stephen Hemminger
2022-01-12  6:32   ` Filip Janiszewski

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=5ecf22af-ac38-7dd5-b3ce-5b2ccf60b32f@filipjaniszewski.com \
    --to=contact@filipjaniszewski.com \
    --cc=users@dpdk.org \
    /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).