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 via email to