DPDK patches and discussions
 help / color / mirror / Atom feed
From: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
To: "Pavan Nikhilesh Bhagavatula" <pbhagavatula@caviumnetworks.com>,
	王志克 <wangzhike@jd.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] long initialization of rte_eal_hugepage_init
Date: Wed, 6 Sep 2017 08:37:19 +0100	[thread overview]
Message-ID: <2c08c2c7-ae29-1709-c0e5-9ca5252cfa1d@intel.com> (raw)
In-Reply-To: <20170906043516.GB27242@PBHAGAVATULA-LT>

On 06/09/2017 05:35, Pavan Nikhilesh Bhagavatula wrote:
> On Wed, Sep 06, 2017 at 03:24:52AM +0000, 王志克 wrote:
>> Hi All,
>>
>> I observed that rte_eal_hugepage_init() will take quite long time if there are lots of huge pages. Example I have 500 1G huge pages, and it takes about 2 minutes. That is too long especially for application restart case.
>>
>> If the application only needs limited huge page while the host have lots of huge pages, the algorithm is not so efficent. Example, we only need 1G memory from each socket.
>>
> There is a EAL option --socket-mem which can be used to limit the memory
> aquired from each socket.
>
>> What is the proposal from DPDK community? Any solution?
>>
>> Note I tried version dpdk 16.11.
>>
>> Br,
>> Wang Zhike
> -Pavan

Since DPDK 17.08+ we use libnuma to first get the amount of pages we 
need from each socket, then as many more as we can.
So you can setup your huge page mount point or cgroups to limit the 
amount of pages you can get.

So basically:
1. setup mount quota or cgroup limit
2. use --socket-mem option to limit amount per socket

Note that pre-17.08 we did not have libnuma support so chances are that 
if you have a low quota/limit and need memory from both sockets it would 
likely fail to allocate the request.

Thanks,
Sergio

  reply	other threads:[~2017-09-06  7:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-06  3:24 王志克
2017-09-06  4:24 ` Stephen Hemminger
2017-09-06  6:45   ` 王志克
2017-09-06  4:35 ` Pavan Nikhilesh Bhagavatula
2017-09-06  7:37   ` Sergio Gonzalez Monroy [this message]
2017-09-06  8:59     ` 王志克
2017-09-06  4:36 ` Tan, Jianfeng
2017-09-06  6:02   ` 王志克
2017-09-06  7:17     ` Tan, Jianfeng
2017-09-06  8:58       ` 王志克

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=2c08c2c7-ae29-1709-c0e5-9ca5252cfa1d@intel.com \
    --to=sergio.gonzalez.monroy@intel.com \
    --cc=dev@dpdk.org \
    --cc=pbhagavatula@caviumnetworks.com \
    --cc=wangzhike@jd.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).