[dpdk-users] [dpdk-dev] long initialization of rte_eal_hugepage_init

王志克 wangzhike at jd.com
Wed Sep 6 08:45:05 CEST 2017

Hi Stephen,

Do you means “disable zero huge page” would improve the performance?  How can the memory be guarantee<http://www.baidu.com/link?url=OcSiFdTLN-XzcXbWcNS7WKEDAs5KPRf5SoQeihstSK0eIPPoRsFICa7XLymTk-ln_XJ5mXmGU9C4srI6Nwax6IgorIeptfF9NvgooO1z4B3>d to be allocated? Would it introduce function issue?

I checked below commit, and I guess the commit at least means the “zero the huge page” is needed.

commit 5ce3ace1de458e2ded1b408acfe59c15cf9863f1
Author: Zhihong Wang <zhihong.wang at intel.com>
Date:   Sun Nov 22 14:13:35 2015 -0500

    eal: remove unnecessary hugepage zero-filling

    The kernel fills new allocated (huge) pages with zeros.
    DPDK just has to populate page tables to trigger the allocation.

    Signed-off-by: Zhihong Wang <zhihong.wang at intel.com>
    Acked-by: Stephen Hemminger <stephen at networkplumber.org>

From: Stephen Hemminger [mailto:stephen at networkplumber.org]
Sent: Wednesday, September 06, 2017 12:24 PM
To: 王志克
Cc: dev at dpdk.org; users at dpdk.org
Subject: Re: [dpdk-dev] long initialization of rte_eal_hugepage_init

Linux zeros huge pages by default. There was a fix in later releases

On Sep 5, 2017 8:24 PM, "王志克" <wangzhike at jd.com<mailto:wangzhike at jd.com>> 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.

What is the proposal from DPDK community? Any solution?

Note I tried version dpdk 16.11.

Wang Zhike

More information about the users mailing list