[Chicago] threading is slow

Martin Maney maney at two14.net
Thu Mar 7 13:34:14 CET 2013


On Thu, Mar 07, 2013 at 06:16:14AM -0600, Oren Livne wrote:
> For a purely computational task, multiprocessing seems to give twice
> smaller speedup than the # processors in the machine: 2x for 4-proc
> and 10x for 24-proc. Is that normal?

Hmmmm.  If half the "processors" are hyperthreads, then I think that
would be as expected - they can actually reduce throughput pretty
easily by increasing contention for shared resources - cache lines,
memory transfers, ...

For a computationally bound task, you shouldn't expect much improvement
beyond the number of physical cores in the system.  And then there are
all those twisty, problem-specific things, like arranging the data so
that work units that may go to different cores don't cause excessive
cache-line bouncing, etc.

It's not directly relevant, but this article talks about most of these
issues and, usefully, compares the right and wrong ("1975 programming")
ways of getting performance out fo the hardware:

  https://www.varnish-cache.org/trac/wiki/ArchitectNotes

-- 
Minsky's Organism Principle: When a system evolves to become more complex,
this always involves a compromise: if its parts become too separate,
then the system's abilities will be limited; but if there are too many
interconnections, then each change in one part will disrupt many others.



More information about the Chicago mailing list