<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Those are very small numbers. in Software Tuning, Performance Optimization &amp; Platform Monitoring</title>
    <link>https://community.intel.com/t5/Software-Tuning-Performance/Reading-IMC-uncore-counters-surprising-output/m-p/1105411#M5935</link>
    <description>&lt;P&gt;Those are very small numbers...&lt;/P&gt;

&lt;P&gt;The IMC counters will count traffic from all sources (user code, OS code, and IO), so there is always some amount of background activity to be dealt with.&lt;/P&gt;

&lt;P&gt;I recommend using something like STREAM to test memory controller counters.&amp;nbsp;&amp;nbsp; If compiled with streaming stores (and an adequately large array size), the number of DRAM reads is about:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;(6 arrays read *&lt;/P&gt;

	&lt;P&gt;8 Bytes per array element *&lt;/P&gt;

	&lt;P&gt;STREAM_ARRAY_SIZE elements per array *&lt;/P&gt;

	&lt;P&gt;NTIMES repetitions)&lt;/P&gt;

	&lt;P&gt;divided by 64 Bytes/DRAM CAS read&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;The number of DRAM writes is the 4/6 of the number of reads.&lt;/P&gt;

&lt;P&gt;If the code is compiled without streaming stores, the number of DRAM reads is increased from 6 to 10 (because the store targets must be read from memory before being overwritten), while the number of DRAM writes is unchanged.&lt;/P&gt;

&lt;P&gt;There is some additional DRAM traffic associated with both the initialization of the arrays (which is hard to summarize) and the validation of the results (requiring 1 more read of each of the 3 arrays).&amp;nbsp; If you run with NTIMES=10 and NTIMES=20 and take the difference in the DRAM counts, it should be very close to the traffic for 10 iterations (i.e., this should cancel out the initialization and validation traffic).&lt;/P&gt;

&lt;P&gt;With data on small pages, there is typically a small excess in read traffic for loading page table entries -- 3% is typical.&lt;/P&gt;

&lt;P&gt;With streaming stores, there is typically a small increase in writes due to prematurely flushed write combining buffers -- usually less than 1%.&lt;/P&gt;</description>
    <pubDate>Fri, 12 May 2017 20:02:32 GMT</pubDate>
    <dc:creator>McCalpinJohn</dc:creator>
    <dc:date>2017-05-12T20:02:32Z</dc:date>
    <item>
      <title>Reading IMC uncore counters, surprising output</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Reading-IMC-uncore-counters-surprising-output/m-p/1105410#M5934</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;I'm trying to get the memory bandwith for some applications on a Xeon E5 V3 (x2), but i'm getting some confusing results.&amp;nbsp;&lt;SPAN style="font-size: 1em;"&gt;These are the steps I follow to get the counters:&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;1) I read this devices and functions (devices ID)&lt;BR /&gt;
	&lt;SPAN style="font-size: 13.008px;"&gt;7f:&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px;"&gt;14.0 and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em;"&gt;7f:14.1 (&lt;/SPAN&gt;0x2FB0 and&amp;nbsp;&lt;SPAN style="font-size: 13.008px;"&gt;0x2FB1)&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 13.008px;"&gt;7f:&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px;"&gt;17.0 and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em;"&gt;7f:17.1 (0x2FD0 and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px;"&gt;0x2FD1)&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 13.008px;"&gt;ff:&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px;"&gt;14.0 and f&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em;"&gt;f:14.1 (&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px;"&gt;0x2FB0 and&amp;nbsp;0x2FB1)&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 13.008px;"&gt;ff:&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px;"&gt;17.0 and f&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em;"&gt;f:17.1 (&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px;"&gt;0x2FD0 and&amp;nbsp;0x2FD0)&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;There are 2 devices per bus (I suppose every bus for a single socket), 2 functions per device and then a total of 4 channels per socket, I suppose.&amp;nbsp;&lt;BR /&gt;
	&lt;BR /&gt;
	2) I set the freeze and reset controls and counters per BOX. Then when I want to start the measurements I enable and set the event and mask on CTL registers.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;3) I freeze every BOX and read the CTR counters (* 64).&amp;nbsp;&lt;BR /&gt;
	&lt;BR /&gt;
	It seems logic, but when I try to understand the results, something is not working. I'm using a dummy work function (simple matrix multiplication) and test. The output is something like that:&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;SPAN style="font-family:monospace"&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;ff/14.0: 727 &lt;/SPAN&gt;&lt;BR /&gt;
	ff/14.1: 1341&lt;BR /&gt;
	ff/17.0: 763&lt;BR /&gt;
	ff/17.1: 1336&lt;BR /&gt;
	&lt;STRONG&gt;7f/14.0: 67062&lt;/STRONG&gt;&lt;BR /&gt;
	7f/14.1: 3382&lt;BR /&gt;
	&lt;STRONG&gt;7f/17.0: 66813&lt;/STRONG&gt;&lt;BR /&gt;
	7f/17.1: 3463&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em;"&gt;As you can see, two IMCs (for the same socket, I suppose) are sending data. But they are not sending data using it's channel 1, just using it's channel 0. As far as I understand, all CPUs are trying to take advantage of all their channels. In my case, I have 4 channels per CPU (socket), but just two are sending data to main memory.&lt;BR /&gt;
	&lt;BR /&gt;
	If I use a third party library for the same measurements, like PAPI, the results are completely different, the 4 channels are working employing the same dummy work function.&lt;BR /&gt;
	&lt;BR /&gt;
	But the results are different in stress applications, when I want to get the max bandwith. Those result are very similar for both my measurements and third party measurements, which makes me even more surprissed.&lt;BR /&gt;
	&lt;BR /&gt;
	So the question is, what can be happening? I'm reading bad? Is the third party getting wrong results although they seem more logical results?&lt;BR /&gt;
	&lt;BR /&gt;
	Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2017 08:20:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Reading-IMC-uncore-counters-surprising-output/m-p/1105410#M5934</guid>
      <dc:creator>Jordi_V_</dc:creator>
      <dc:date>2017-05-12T08:20:01Z</dc:date>
    </item>
    <item>
      <title>Those are very small numbers.</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Reading-IMC-uncore-counters-surprising-output/m-p/1105411#M5935</link>
      <description>&lt;P&gt;Those are very small numbers...&lt;/P&gt;

&lt;P&gt;The IMC counters will count traffic from all sources (user code, OS code, and IO), so there is always some amount of background activity to be dealt with.&lt;/P&gt;

&lt;P&gt;I recommend using something like STREAM to test memory controller counters.&amp;nbsp;&amp;nbsp; If compiled with streaming stores (and an adequately large array size), the number of DRAM reads is about:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;(6 arrays read *&lt;/P&gt;

	&lt;P&gt;8 Bytes per array element *&lt;/P&gt;

	&lt;P&gt;STREAM_ARRAY_SIZE elements per array *&lt;/P&gt;

	&lt;P&gt;NTIMES repetitions)&lt;/P&gt;

	&lt;P&gt;divided by 64 Bytes/DRAM CAS read&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;The number of DRAM writes is the 4/6 of the number of reads.&lt;/P&gt;

&lt;P&gt;If the code is compiled without streaming stores, the number of DRAM reads is increased from 6 to 10 (because the store targets must be read from memory before being overwritten), while the number of DRAM writes is unchanged.&lt;/P&gt;

&lt;P&gt;There is some additional DRAM traffic associated with both the initialization of the arrays (which is hard to summarize) and the validation of the results (requiring 1 more read of each of the 3 arrays).&amp;nbsp; If you run with NTIMES=10 and NTIMES=20 and take the difference in the DRAM counts, it should be very close to the traffic for 10 iterations (i.e., this should cancel out the initialization and validation traffic).&lt;/P&gt;

&lt;P&gt;With data on small pages, there is typically a small excess in read traffic for loading page table entries -- 3% is typical.&lt;/P&gt;

&lt;P&gt;With streaming stores, there is typically a small increase in writes due to prematurely flushed write combining buffers -- usually less than 1%.&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2017 20:02:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Reading-IMC-uncore-counters-surprising-output/m-p/1105411#M5935</guid>
      <dc:creator>McCalpinJohn</dc:creator>
      <dc:date>2017-05-12T20:02:32Z</dc:date>
    </item>
    <item>
      <title>Quote:McCalpin, John wrote:</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Reading-IMC-uncore-counters-surprising-output/m-p/1105412#M5936</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;McCalpin, John wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Those are very small numbers...&lt;/P&gt;

&lt;P&gt;The IMC counters will count traffic from all sources (user code, OS code, and IO), so there is always some amount of background activity to be dealt with.&lt;/P&gt;

&lt;P&gt;I recommend using something like STREAM to test memory controller counters.&amp;nbsp;&amp;nbsp; If compiled with streaming stores (and an adequately large array size), the number of DRAM reads is about:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;(6 arrays read *&lt;/P&gt;

	&lt;P&gt;8 Bytes per array element *&lt;/P&gt;

	&lt;P&gt;STREAM_ARRAY_SIZE elements per array *&lt;/P&gt;

	&lt;P&gt;NTIMES repetitions)&lt;/P&gt;

	&lt;P&gt;divided by 64 Bytes/DRAM CAS read&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;The number of DRAM writes is the 4/6 of the number of reads.&lt;/P&gt;

&lt;P&gt;If the code is compiled without streaming stores, the number of DRAM reads is increased from 6 to 10 (because the store targets must be read from memory before being overwritten), while the number of DRAM writes is unchanged.&lt;/P&gt;

&lt;P&gt;There is some additional DRAM traffic associated with both the initialization of the arrays (which is hard to summarize) and the validation of the results (requiring 1 more read of each of the 3 arrays).&amp;nbsp; If you run with NTIMES=10 and NTIMES=20 and take the difference in the DRAM counts, it should be very close to the traffic for 10 iterations (i.e., this should cancel out the initialization and validation traffic).&lt;/P&gt;

&lt;P&gt;With data on small pages, there is typically a small excess in read traffic for loading page table entries -- 3% is typical.&lt;/P&gt;

&lt;P&gt;With streaming stores, there is typically a small increase in writes due to prematurely flushed write combining buffers -- usually less than 1%.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Sorry for the delay, I had login problems.&lt;/P&gt;

&lt;P&gt;I used stream to test before, but worked as expected. The problem is just in small test applications like this "dummy work function". Although the bandwith used is small, for me it has no sense that just 2 of 4 channels are in use. Maybe I have a lack of theory, but as I understand, the CPU will try to send that data through all 4 channels.&lt;/P&gt;

&lt;P&gt;What could be happening in small bandwith applications? Why in heavy bandwith applications works as expected (filling all expected channels)?&lt;BR /&gt;
	&lt;BR /&gt;
	Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 11:20:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Reading-IMC-uncore-counters-surprising-output/m-p/1105412#M5936</guid>
      <dc:creator>Jordi_V_</dc:creator>
      <dc:date>2017-05-16T11:20:07Z</dc:date>
    </item>
    <item>
      <title>It is very hard to interpret</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Reading-IMC-uncore-counters-surprising-output/m-p/1105413#M5937</link>
      <description>&lt;P&gt;It is very hard to interpret performance counter results unless you have a model of what to expect...&lt;/P&gt;

&lt;P&gt;With numbers this small it entirely possible that the small values are the "signal" and the larger values are "noise" due to OS polling on a few number of specific addresses (each of which will map to a single memory controller, of course).&lt;/P&gt;

&lt;P&gt;One way to test this is to run a few benchmarks that are expected to have no memory traffic (other than loading the program text) and monitor the range of DRAM accesses as a function of runtime and the number of cores used.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 15:43:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Reading-IMC-uncore-counters-surprising-output/m-p/1105413#M5937</guid>
      <dc:creator>McCalpinJohn</dc:creator>
      <dc:date>2017-05-17T15:43:56Z</dc:date>
    </item>
  </channel>
</rss>

