From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id A87A37E1B for ; Wed, 1 Oct 2014 11:23:45 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 01 Oct 2014 02:30:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="394008965" Received: from bricha3-mobl.ger.corp.intel.com (HELO bricha3-mobl.ir.intel.com) ([10.243.20.27]) by FMSMGA003.fm.intel.com with SMTP; 01 Oct 2014 02:24:06 -0700 Received: by bricha3-mobl.ir.intel.com (sSMTP sendmail emulation); Wed, 01 Oct 2014 10:30:26 +0001 Date: Wed, 1 Oct 2014 10:30:26 +0100 From: Bruce Richardson To: Alex Markuze Message-ID: <20141001093026.GA2540@BRICHA3-MOBL> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.22 (2013-10-16) Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] Huge Pages. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 09:23:46 -0000 On Wed, Oct 01, 2014 at 12:21:05PM +0300, Alex Markuze wrote: > Hi, > How well does DPDK play with other applications using huge pages? > Looking at eal_init/eal_hugepage_info_init it seems that DPDK will try to > grab All available huge pages. > > Is there an existing way to limit the number of huge pages taken ? > My goal is to be able to run several applications each with its own dpdk > instance and a possible 3rd party application all using huge pages. Is this > possible under DPDKs current design? > > Sharing the NICs is fairly simple if we specify the available lci functions > per dpdk instance but at first glance sharing huge pages looks like a > problem. > > Thanks. It should play well-enough, though not perfectly. There are a couple of things to take into account: * If an app is already using hugepages when a DPDK app starts, the new app should only be looking at using the free hugepages. * By default, the app will look to use all the free hugepages on the system. However, this can be overriden by specifying the "-m" or for numa systems the "--socket-mem" options. The extra wrinkle here is that eal will try to grab the best set of hugepages it can, so actually temporarily takes over all free hugepages to analyse, then releases the ones it won't use back once it has determined what a good page set would be. * The hugepage files used by a DPDK app are not automatically deleted once the app terminates. Instead, each time the app starts up it cleaups any unused hugepages from any previous runs. It does this by looking for files with the appropraite filename used by DPDK apps, and checking for a lock being held on them. * To have multiple apps running side by side, each with it's own hugepage memory, use the --file-prefix EAL option (along with --socket-mem) to force each app to use a different set of hugepage files. [In this situation, you do need to use the -b flag to blacklist ports used by one app from the other app] Hope this helps. /Bruce