From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id AC522F72 for ; Thu, 26 Jul 2018 11:52:13 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jul 2018 02:52:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,404,1526367600"; d="scan'208";a="77979931" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.86]) ([10.237.220.86]) by orsmga002.jf.intel.com with ESMTP; 26 Jul 2018 02:51:56 -0700 To: Kevin Traynor , Thomas Monjalon Cc: dev@dpdk.org, Ravi1.Kumar@amd.com, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, yskoh@mellanox.com, arybchenko@solarflare.com, damarion@cisco.com, stephen@networkplumber.org, olivier.matz@6wind.com, christian.ehrhardt@canonical.com, bluca@debian.org References: <40cf48703f5fae8af8c31dcc8a1a1ecb0b151d27.1532426170.git.anatoly.burakov@intel.com> <7333019.QUcIvQh70r@xps> <6155181.arAJIN2bNs@xps> <0cde5b6f-558a-08cf-0a03-29eeb7772618@redhat.com> From: "Burakov, Anatoly" Message-ID: <3615ec97-73d4-78a8-9ddf-a8cabb0b1797@intel.com> Date: Thu, 26 Jul 2018 10:51:54 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <0cde5b6f-558a-08cf-0a03-29eeb7772618@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] config: reduce memory requirements for DPDK X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jul 2018 09:52:14 -0000 On 25-Jul-18 6:43 PM, Kevin Traynor wrote: > On 07/24/2018 01:03 PM, Thomas Monjalon wrote: >> 24/07/2018 13:04, Burakov, Anatoly: >>> On 24-Jul-18 11:23 AM, Thomas Monjalon wrote: >>>> 24/07/2018 12:03, Anatoly Burakov: >>>>> It has been reported that current memory limitations do not work >>>>> well on an 8-socket machines in default configuration when big >>>>> page sizes are used [1]. >>>>> >>>>> Fix it by reducing memory amount reserved by DPDK by default to >>>>> 32G per page size per NUMA node. This translates to allowing us >>>>> to reserve 32G per page size per NUMA node on 8 nodes with 2 >>>>> page sizes. >>>>> >>>>> [1] https://mails.dpdk.org/archives/dev/2018-July/108071.html >>>>> >>>>> Signed-off-by: Anatoly Burakov >>>>> --- >>>>> >>>>> Notes: >>>>> We could have increased CONFIG_RTE_MAX_MEM_MB but this would've >>>>> brought other potential problems due to increased memory >>>>> preallocation, and secondary process initialization is flaky >>>>> enough as it is. I am willing to bet that 32G per page size is >>>>> more than enough for the majority of use cases, and any >>>>> application with bigger requirements could adjust config options >>>>> itself. >>>> [...] >>>>> -CONFIG_RTE_MAX_MEMSEG_PER_TYPE=32768 >>>>> -CONFIG_RTE_MAX_MEM_MB_PER_TYPE=131072 >>>>> +CONFIG_RTE_MAX_MEMSEG_PER_TYPE=16384 >>>>> +CONFIG_RTE_MAX_MEM_MB_PER_TYPE=32768 >>>> >>>> Ideally, it should be a run-time option. >>>> >>> >>> It can be, yes, and this can be worked on for next release. However, we >>> also need to have good default values that work across all supported >>> platforms. >> >> Yes sure, we can wait the next release for a run-time option. >> >> How can we be sure these default values are good enough? > > Why add a new limitation? Why not take the other approach that was > suggested of increasing the max possible memory? The commit notes explain that :) Basically, increasing total amount of allocate-able memory increases risk of secondary processes not working due to inability to map segments at the same addresses. Granted, the "usual" case of running DPDK on a 1- or 2-socket machine with 1- or 2- pagesizes will not be affected by increase in total amounts of memory, so things will stay as they are. However, reducing the memory requirements will reduce the VA space consumption for what i perceive to be most common case (under 32G per page size per NUMA node) thereby improving secondary process experience, while still enabling 8 NUMA nodes with two page sizes to work on default settings. > > If there is new limitations or backwards compatibility issues with > default settings compared with before the large memory management > rework, then it would be good to have that clear in the docs at a high > level for the users who want to update. Agreed, i will follow this patch up with doc updates. > > It would also help a lot to add what the implications and limits for > changing the most important defines are - will it be slower? will it not > work above X? etc. The main impact is amount of VA-contiguous memory you can have in DPDK, and amount of total memory you can have in DPDK. How that memory works (slower, faster etc.) is not affected. So, for example, if you really needed a one VA-contiguous memzone of 20 gigabytes - yes, this change would affect you. However, i suspect this is not a common case, and given that you've went that far, increasing memory limits would not be such a big deal anyway. > >> It would be good to have several acks from various projects or companies. >> >> > > > > > > -- Thanks, Anatoly