[dpdk-dev] Huge Pages.
Bruce Richardson
bruce.richardson at intel.com
Wed Oct 1 11:30:26 CEST 2014
On Wed, Oct 01, 2014 at 12:21:05PM +0300, Alex Markuze wrote:
> Hi,
> How well does DPDK play with other applications using huge pages?
> Looking at eal_init/eal_hugepage_info_init it seems that DPDK will try to
> grab All available huge pages.
>
> Is there an existing way to limit the number of huge pages taken ?
> My goal is to be able to run several applications each with its own dpdk
> instance and a possible 3rd party application all using huge pages. Is this
> possible under DPDKs current design?
>
> Sharing the NICs is fairly simple if we specify the available lci functions
> per dpdk instance but at first glance sharing huge pages looks like a
> problem.
>
> Thanks.
It should play well-enough, though not perfectly. There are a couple of
things to take into account:
* If an app is already using hugepages when a DPDK app starts, the new app
should only be looking at using the free hugepages.
* By default, the app will look to use all the free hugepages on the system.
However, this can be overriden by specifying the "-m" or for numa systems
the "--socket-mem" options. The extra wrinkle here is that eal will try to
grab the best set of hugepages it can, so actually temporarily takes over
all free hugepages to analyse, then releases the ones it won't use back
once it has determined what a good page set would be.
* The hugepage files used by a DPDK app are not automatically deleted once
the app terminates. Instead, each time the app starts up it cleaups any
unused hugepages from any previous runs. It does this by looking for files
with the appropraite filename used by DPDK apps, and checking for a lock
being held on them.
* To have multiple apps running side by side, each with it's own hugepage
memory, use the --file-prefix EAL option (along with --socket-mem) to
force each app to use a different set of hugepage files. [In this
situation, you do need to use the -b flag to blacklist ports used by one
app from the other app]
Hope this helps.
/Bruce
More information about the dev
mailing list