<div dir="ltr"><div><div><div><div>Thanks for your detailed reply, I just want to clear myself on Number of Memory Channels, These Memory channels are between <br><br>CPU and Hugepages (RAM)<br></div>or <br></div>HugePages (RAM) and NIC   (multi channel DMA)<br>
</div>or <br></div>both<br><br><div><div>?<br><br></div><div>Thanks<br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 20, 2013 at 8:43 PM, Stephen Hemminger <span dir="ltr"><<a href="mailto:stephen@networkplumber.org" target="_blank">stephen@networkplumber.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Thu, 20 Jun 2013 16:20:35 +0500<br>
Muhammad Ali <<a href="mailto:Muhammad.Ali@xflowresearch.com">Muhammad.Ali@xflowresearch.com</a>> wrote:<br>
<br>
> Hi everyone<br>
><br>
> I am running DPDK sample application compiled in Fedora 14 environment.<br>
><br>
> I have used following command to run the App<br>
><br>
> ./<application> -c f -n 4<br>
><br>
> c= bitmask of cores to to be used.<br>
> and<br>
> n= number of memory channels<br>
><br>
> Now what does 'n' actually defines ?. Is this the number of DMA channels<br>
> between RAM (hugepages) and NIC. ? If not so then what it is ?<br>
><br>
> How does number of memory channels will effect the performance ?<br>
><br>
> BTW I am using hugepagesize=1G<br>
> and Number of Hugepages=4<br>
><br>
> My question might be very basic, but I am totally confused. Please help me<br>
> out here.<br>
><br>
> Thank you<br>
><br>
> Regards<br>
<br>
</div></div>Memory channels into the CPU, it controls the spread layout used by the memory<br>
allocator, therefore it is a performance optimization.<br>
<br>
Unfortunately, there is no good way to know what the number of memory channels<br>
exactly without hardware specs. The BIOS may know but it is not exported in any<br>
of the normal ACPI tables, and therefore not exposed by the OS.<br>
<br>
What we end up doing in our startup script was<br>
 "dmidecode -t 17 | grep -c 'Size:'"<br>
which will give you some idea of the number of populated memory banks and making<br>
an educated guess on the number of channels. I.e 6 memory slots probably implies 3 channels.<br>
If someone has a better way I would love to hear it.<br>
<br>
Computing cpu bitmask isn't hard using "grep -c processor /proc/cpuinfo" and a<br>
little maths in a shell script.<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><div><br><br>Muhammad Ali<br></div><font face="georgia, serif"><font><span style="color:rgb(51,51,51)">Software Development Engineer<br><a href="http://www.xflowresearch.com/" style="color:rgb(17,85,204)" target="_blank">xFlow Research Inc.</a><br>
+92-323-965-4043 (GMT +5)<br><b>Skype: </b>ali.wcct<br></span></font><br></font><div></div><font face="georgia, serif" size="1">This electronic message transmission contains information from the company that may be proprietary, confidential and/or privileged.  The information is intended only for the use of the individuals or entity named above.  If you are not the intended recipient, be aware that any disclosure, copying or distribution or use of the contents of this information is prohibited.  If you have received this electronic transmission in error, please notify the sender immediately by replying to the address listed in the “From:” field.</font><br>
</div>
</div>