On Wed, Dec 19, 2007 at 07:17:21PM -0800, Ron Mayer wrote:
> > but it doesn't follow that you will get
> > 10X improvement with 10 threads, or even 4X with 4.
>
> Yeah - unless those 10 cores have additional I/O to the
> memories compared to a 1 core system (which I'd hope
> would be the case or else I'd expect many apps would be
> run into memory bottlenecks on such systems, no?).
I don't suppose you saw the document from Ulrich Drepper "What Every
Programmer Should Know About Memory". It's a fact that most machines
with multiple cores have less L2 cache/core than a single core
machines. And having multiple conduits to main memory isn't that common
at all. So having more threads sometimes *decreases* performance
because you cut the L2 cache and memory bandwidth in half.
The document is very useful for getting tips about how to work out
optimal thread/memory/datasize ratios.
The way around this is a NUMA architecture, but that's a whole
other ball of wax.
Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
> -- John F Kennedy