DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Eads, Gage" <gage.eads@intel.com>
To: Olivier Matz <olivier.matz@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"arybchenko@solarflare.com" <arybchenko@solarflare.com>,
	"Mcnamara, John" <john.mcnamara@intel.com>,
	"Kovacevic, Marko" <marko.kovacevic@intel.com>
Subject: Re: [dpdk-dev] [PATCH v3] doc: add stack mempool guide
Date: Mon, 21 Sep 2020 15:42:28 +0000	[thread overview]
Message-ID: <SN6PR11MB2574E6B50774A712BB28C87AF63A0@SN6PR11MB2574.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200917142530.GU21395@platinum>

Hi Olivier,

<snip>

> > +Stack Mempool Driver
> > +====================
> > +
> > +**rte_mempool_stack** is a pure software mempool driver based on the
> > +``rte_stack`` DPDK library. A stack-based mempool is often better suited to
> > +packet-processing workloads than a ring-based mempool, since its LIFO
> behavior
> > +results in better temporal locality and a minimal memory footprint even if the
> > +mempool is over-provisioned.
> 
> Would it make sense to give an example of a use-case where the stack
> driver should be used in place of the standard ring-based one?
> 
> In most run-to-completion applications, the mbufs stay in per-core
> caches, so changing the mempool driver won't have a big impact. However,
> I suspect that for applications using a pipeline model (ex: rx on core0,
> tx on core1), the stack model would be more efficient. Is it something
> that you measured? If yes, it would be useful to explain this in the
> documentation.
> 

Good point, I was overlooking the impact of the per-core caches. I've seen data showing
better overall packet throughput with the stack mempool, and indeed that was a pipelined
application. How about this re-write?

"
**rte_mempool_stack** is a pure software mempool driver based on the
``rte_stack`` DPDK library. For run-to-completion workloads with sufficiently
large per-lcore caches, the mbufs will likely stay in the per-lcore caches and the
mempool type (ring, stack, etc.) will have a negligible impact on performance. However
a stack-based mempool is often better suited to pipelined packet-processing workloads
(which allocate and free mbufs on different lcores) than a ring-based mempool, since its
LIFO behavior results in better temporal locality and a minimal memory footprint even
if the mempool is over-provisioned. Users are encouraged to benchmark with multiple
mempool types to determine which works best for their specific application.
"

Thanks,
Gage

  reply	other threads:[~2020-09-21 15:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-11 21:10 [dpdk-dev] [PATCH] " Gage Eads
2020-08-24 16:13 ` Gage Eads
2020-09-14 21:11 ` [dpdk-dev] [PATCH v3] " Gage Eads
2020-09-17 14:25   ` Olivier Matz
2020-09-21 15:42     ` Eads, Gage [this message]
2020-10-07  8:43       ` Olivier Matz
2020-10-07 14:18 ` [dpdk-dev] [PATCH v4] " Gage Eads
2020-10-07 14:40   ` Olivier Matz
2020-10-08 10:19     ` David Marchand

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=SN6PR11MB2574E6B50774A712BB28C87AF63A0@SN6PR11MB2574.namprd11.prod.outlook.com \
    --to=gage.eads@intel.com \
    --cc=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=john.mcnamara@intel.com \
    --cc=marko.kovacevic@intel.com \
    --cc=olivier.matz@6wind.com \
    /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).