DPDK usage discussions
 help / color / mirror / Atom feed
From: "Wiles, Keith" <keith.wiles@intel.com>
To: "Trahe, Fiona" <fiona.trahe@intel.com>
Cc: "Templin (US), Fred L" <Fred.L.Templin@boeing.com>,
	users <users@dpdk.org>
Subject: Re: [dpdk-users] Multiple DPDK application instances on the	same	machine?
Date: Wed, 9 Oct 2019 21:54:22 +0000	[thread overview]
Message-ID: <4871BEBD-BEB8-4F70-8F7D-6D5B880FA61F@intel.com> (raw)
In-Reply-To: <348A99DA5F5B7549AA880327E580B43589831D45@IRSMSX101.ger.corp.intel.com>



> On Oct 9, 2019, at 12:49 PM, Trahe, Fiona <fiona.trahe@intel.com> wrote:
> 
> Hi Fred,
> 
> There may be other ways, but this is what I do:
> I use --file-prefix <some_unique_name> and -m <some usubset of the total huge pages>
> so I can run multiple instances of the tests in parallel.
> e.g.
> ./dpdk/app/test --file-prefix myProcess1 -m 128  (plus some other options)
> ./dpdk/app/test --file-prefix myProcess2 -m 128  
> 
> The prefix is used to mark separate memory allocations and the -m limits the amount of memory used by the process so there's some available for other processes.
> Hope this helps
> Fiona

Three resources need to be segmented and assigned to each DPDK instance, memory, logical core and devices.

- With memory the —file-prefix is defining a different set of huge page files by prefixing myProcess1 instead of the default rte_ to each huge page file.
The -m option limits the amount of memory the instance can use, which is the total amount of memory in huge pages divided by the number of instances (if each requires the same amount of memory).
- Logical cores must also be split up among the instances use the -l option
- If you are using resources like physical ports then you need to give each instance its own set of resources. You will need to --blacklist or --whitelist the physical devices for each instance.

Adding —blacklist (-b) or whitelist (-w) to the command line.

With ports at PCI address 83:00.0 and 83:00.1 and only those bound to DPDK (igb_uio, vfio, …) if you have more bound to DPDK and only using two than blacklist the extra devices.

Minimum amount of memory require for the two instances below is 256M

# use 83:00.0 with instance 1
./dpdk/app/test -l 1-4 —file-prefix foo1 -m 128 -b 83:00.1

# use 83:00.1 with instance 2
./dpdk/app/test -l 5-8 —file-prefix foo2 -m 128 -b 83:00.0

You can use whitelist also, just can't use both on the same command line.

HTH

> 
> 
> 
>> -----Original Message-----
>> From: users [mailto:users-bounces@dpdk.org] On Behalf Of Templin (US), Fred L
>> Sent: Wednesday, October 9, 2019 6:07 PM
>> To: users <users@dpdk.org>
>> Subject: [dpdk-users] Multiple DPDK application instances on the same machine?
>> 
>> Hi, we have a need to run multiple instances of applications that use the DPDK library on the
>> same machine. We are currently working with only two instances, but can't even get that to
>> work because the two seem to interfere with each other in terms of mempool creation. In
>> the future, we are going to want to have many more instances of the app all running in the
>> same physical/virtual machine. Is there a way to run multiple DPDK-using applications on
>> the same machine?
>> 
>> We note that there is only one /sys/kernel/mm/hugepages/ area per machine, and our
>> instructions were for *each application* to set the number of hugepages. Could it be that
>> there needs to be a way for the application instances to cooperatively share this area
>> instead of interfering with one another?
>> 
>> Thanks - Fred

Regards,
Keith


  reply	other threads:[~2019-10-09 21:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-09 17:06 Templin (US), Fred L
2019-10-09 17:49 ` Trahe, Fiona
2019-10-09 21:54   ` Wiles, Keith [this message]
2019-10-09 21:59     ` Templin (US), Fred L

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=4871BEBD-BEB8-4F70-8F7D-6D5B880FA61F@intel.com \
    --to=keith.wiles@intel.com \
    --cc=Fred.L.Templin@boeing.com \
    --cc=fiona.trahe@intel.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).