<br><br><div class="gmail_quote">2009/8/11 Rahul Nabar <span dir="ltr">&lt;<a href="mailto:rpnabar@gmail.com">rpnabar@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Tue, Aug 11, 2009 at 5:57 PM, Bruno Coutinho&lt;<a href="mailto:coutinho@dcc.ufmg.br">coutinho@dcc.ufmg.br</a>&gt; wrote:<br>
&gt; Nehalem and Barcelona have the following cache architecture:<br>
&gt;<br>
&gt; L1 cache: 64KB (32kb data, 32kb instruction), per core<br>
&gt; L2 cache: Barcelona :512kb, Nehalem: 256kb, per core<br>
&gt; L3 cache: Barcelona: 2MB, Nehalem: 8MB , shared among all cores.<br>
&gt;<br>
&gt;<br>
&gt; Both in Barcelona and Nehalem, the &quot;uncore&quot; (everything outside a core, like<br>
&gt; L3 and memory controllers) runs at lower speed than the cores and all cores<br>
&gt; communicate through L3, so it must handle some coherence signals too.<br>
&gt; This makes impossible to L3 feed all cores at full speed if L2 caches have<br>
&gt; big miss ratios.<br>
&gt;<br>
&gt; So, what is happening with your program is something like:<br>
&gt;<br>
&gt; Working set fits Barcelona 512kb L2 cache, so it has 10% miss rate,<br>
&gt; but is doesn&#39;t fits Nehalem 256km L2 cache, so it has 50% miss rate.<br>
&gt; So in Nehelem the shared L3 cache has to handle much more requests from all<br>
&gt; cores than Barcelona, becoming a big bottleneck.<br>
<br>
</div>Thanks Bruno! That makes a lot of sense now. Assuming that is what is<br>
happening is there any way of still using the Nehalems fruitfully for<br>
this code? Any smart tricks / hacks?</blockquote><div><br>You can use profilers that monitor hardware performance counters like oprofile or papi  to measure miss ratios and verify if that is what is happening. But solving it is a much larger problem. :)<br>
<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
The reason is that the Nehalems seem to scale and perform beautifully<br>
for my other codes.<br>
<br>
The only other option is to relapse back to the AMDs. I believe the<br>
Shanghai would be a choice or an Instanbul. I assume the cache<br>
structure there is as good as the Barcelona if not better! Any<br>
experiences with these chips on the group?<br>
<br>
Funnily, I haven&#39;t heard of any such Nehalem (-ive) stories anywhere<br>
else. Am I the first one to hit this cache bottleneck? I doubt it. Any<br>
other cache heavy users?<br>
<br>
--<br>
<font color="#888888">Rahul<br>
</font></blockquote></div><br>