From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-x22c.google.com (mail-pa0-x22c.google.com [IPv6:2607:f8b0:400e:c03::22c]) by dpdk.org (Postfix) with ESMTP id CD3CE232 for ; Thu, 20 Jun 2013 17:43:36 +0200 (CEST) Received: by mail-pa0-f44.google.com with SMTP id lj1so6446169pab.31 for ; Thu, 20 Jun 2013 08:43:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=6wgMAwb2gQRmeFADzceZzVsRTzyPxd9vc0O2FbaRAK8=; b=Vrrv5o/gQ38Mab8cF56Pv5hCAlmlqCFvfBJTXz+GYQMGa9jrFKGk8NofJzQhqU61Wt 30YPSX8k6c16lW9cT3O9e8ATj2iGX8R0ktPlrU/Gx9MaM74OR0mg7D5Inh3Iv1JbM/D9 hQxZ24NdeGqUpEdu0KLSMWm/mfus2+djO+zYC4mVKu6AOiY0WhUxponSaPt9W561Byic /nKTmu0NcSSYJ40D6UV3v+zGXJ0iRw+vqHYmvoIg31U/7vYGN89N0ka2xGLspS9SKX5L q93Au71aVwvBm8f8o+XKBE9q4/SePL9MIQfAs0vGUol9+LOCvWHwU3h6Vk7T6PieDbnK XXNg== X-Received: by 10.68.138.193 with SMTP id qs1mr7944734pbb.95.1371743028175; Thu, 20 Jun 2013 08:43:48 -0700 (PDT) Received: from nehalam.linuxnetplumber.net (static-50-53-71-109.bvtn.or.frontiernet.net. [50.53.71.109]) by mx.google.com with ESMTPSA id fr1sm702690pbb.26.2013.06.20.08.43.46 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 20 Jun 2013 08:43:47 -0700 (PDT) Date: Thu, 20 Jun 2013 08:43:43 -0700 From: Stephen Hemminger To: Muhammad Ali Message-ID: <20130620084343.03376efe@nehalam.linuxnetplumber.net> In-Reply-To: References: X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQkjSojb+PUPBtlvbyC0f0+PcrH9Bgkm7hEg3wSDXE1BV20gHaQ8+fzUWrMxFaM/LQSWIBQb Cc: dev@dpdk.org Subject: Re: [dpdk-dev] Number of memory channels (EAL Options) 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: Thu, 20 Jun 2013 15:43:37 -0000 On Thu, 20 Jun 2013 16:20:35 +0500 Muhammad Ali wrote: > Hi everyone > > I am running DPDK sample application compiled in Fedora 14 environment. > > I have used following command to run the App > > ./ -c f -n 4 > > c= bitmask of cores to to be used. > and > n= number of memory channels > > Now what does 'n' actually defines ?. Is this the number of DMA channels > between RAM (hugepages) and NIC. ? If not so then what it is ? > > How does number of memory channels will effect the performance ? > > BTW I am using hugepagesize=1G > and Number of Hugepages=4 > > My question might be very basic, but I am totally confused. Please help me > out here. > > Thank you > > Regards Memory channels into the CPU, it controls the spread layout used by the memory allocator, therefore it is a performance optimization. Unfortunately, there is no good way to know what the number of memory channels exactly without hardware specs. The BIOS may know but it is not exported in any of the normal ACPI tables, and therefore not exposed by the OS. What we end up doing in our startup script was "dmidecode -t 17 | grep -c 'Size:'" which will give you some idea of the number of populated memory banks and making an educated guess on the number of channels. I.e 6 memory slots probably implies 3 channels. If someone has a better way I would love to hear it. Computing cpu bitmask isn't hard using "grep -c processor /proc/cpuinfo" and a little maths in a shell script.