From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1B39DA04C0 for ; Wed, 13 Nov 2019 10:19:40 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7662C1BF10; Wed, 13 Nov 2019 10:19:37 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 084081BEF0; Wed, 13 Nov 2019 10:19:32 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2019 01:19:31 -0800 X-IronPort-AV: E=Sophos;i="5.68,300,1569308400"; d="scan'208";a="198386421" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.46]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 13 Nov 2019 01:19:30 -0800 Date: Wed, 13 Nov 2019 09:19:27 +0000 From: Bruce Richardson To: Venumadhav Josyula Cc: users@dpdk.org, dev@dpdk.org, Venumadhav Josyula Message-ID: <20191113091927.GA1501@bricha3-MOBL.ger.corp.intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Subject: Re: [dpdk-users] [dpdk-dev] time taken for allocation of mempool. X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" On Wed, Nov 13, 2019 at 10:37:57AM +0530, Venumadhav Josyula wrote: > Hi , > We are using 'rte_mempool_create' for allocation of flow memory. This has > been there for a while. We just migrated to dpdk-18.11 from dpdk-17.05. Now > here is problem statement > > Problem statement : > In new dpdk ( 18.11 ), the 'rte_mempool_create' take approximately ~4.4 sec > for allocation compared to older dpdk (17.05). We have som 8-9 mempools for > our entire product. We do upfront allocation for all of them ( i.e. when > dpdk application is coming up). Our application is run to completion model. > > Questions:- > i) is that acceptable / has anybody seen such a thing ? > ii) What has changed between two dpdk versions ( 18.11 v/s 17.05 ) from > memory perspective ? > > Any pointer are welcome. > Hi, from 17.05 to 18.11 there was a change in default memory model for DPDK. In 17.05 all DPDK memory was allocated statically upfront and that used for the memory pools. With 18.11, no large blocks of memory are allocated at init time, instead the memory is requested from the kernel as it is needed by the app. This will make the initial startup of an app faster, but the allocation of new objects like mempools slower, and it could be this you are seeing. Some things to try: 1. Use "--socket-mem" EAL flag to do an upfront allocation of memory for use by your memory pools and see if it improves things. 2. Try using "--legacy-mem" flag to revert to the old memory model. Regards, /Bruce