DPDK usage discussions
 help / color / Atom feed
From: Pierre <pierre.laurent@emutex.com>
To: users@dpdk.org
Cc: prashanth.fernando@tatacommunications.com
Subject: Re: [dpdk-users] Run To Completion Vs Pipeline
Date: Tue, 21 Jul 2020 08:01:21 +0100
Message-ID: <4b4368f1-871d-fa49-0049-b0210161b055@emutex.com> (raw)
In-Reply-To: <20200720080852.4db7f0ae@hermes.lan>

HI

In a run-to-completion simple model on a single core,

    - you have full control of the execution order and packet 
transmission order, typically being strictly the same than reception order.

   - simple model to make it easy to debug and learn DPDK code.

   - simple model to get deterministic latencies.

   - will not scale easily, because the bottleneck is the whole sw.

In a simple pipeline model,

   - execution order get less deterministic .

     If the problems to solve are stateless (no dependency between 
packets), that might be ok,

     extreme scalability is easy to achieve.

   - you need queues between pipelined components. You have to handle 
overflows and bottlenecks,

     and decisions to throttle and drop traffic is yours.

    - you might wish to use priority queues, i.e. much more complex 
design with its own drawbacks

      and failure cases , and debugging uncertainties. Latencies get 
hairy to analyse.


There are all intermediates between these extremes , e.g. pipelining 
across multiple  run-to-completion stateful subsystems

- stateful TCP reordering and reassembly,

- IP reordering and reassembly, IPSec , fragmentations  between networks 
with different mtus

- UDP reassembly before regex

- IGMP packets and multicast packets

- ...... all the networking fun .....

  - and you have to design your subsystem to best fit workloads vs. 
processing power of each core.


you could switch dynamically from one model to the other one depending 
on traffic rates

- at low traffic rate, get the best use of a single core and save the 
maximum of power on the system

   this would favour a run-to-completion model at run time.

- at high traffic rate, wake up multiple cores

    this would favour a piplining model at run time.



On 20/07/2020 16:08, Stephen Hemminger wrote:
> On Mon, 20 Jul 2020 05:03:55 +0000
> Prashanth Fernando <prashanth.fernando@tatacommunications.com> wrote:
>
>> Hi,
>>
>> I'm wondering why DPDK proposes 2 different models.
>> Is there any situation that fits one model but not another?
>>
>> I am looking to build an application with a firewall, regex, LPM, rate-limiters etc ...
>> I am wondering which approach would be a best fit for my usecase.
>>
>>
>> Thanks,
>> Prashanth
>>
> There are two different factors here.
> First, how many cores do you have to burn. The run to completion model uses
> less cores (and has less latency). But other models are better if some set
> of packets require longer to process (VPN, Crypto, ...) in that case you
> want to push packets to other core.

-- 
Emutex Limited, Roselawn House, National Technology Park, Limerick, V94 6R68, Ireland.
Phone: +353 (0)61 514496 Ext# 814, Web: www.emutex.com.


      reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20  5:03 Prashanth Fernando
2020-07-20 15:08 ` Stephen Hemminger
2020-07-21  7:01   ` Pierre [this message]

Reply instructions:

You may reply publically 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=4b4368f1-871d-fa49-0049-b0210161b055@emutex.com \
    --to=pierre.laurent@emutex.com \
    --cc=prashanth.fernando@tatacommunications.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

DPDK usage discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/users/0 users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 users users/ http://inbox.dpdk.org/users \
		users@dpdk.org
	public-inbox-index users


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.users


AGPL code for this site: git clone https://public-inbox.org/ public-inbox