?

Log in

No account? Create an account
Adventures in Engineering
The wanderings of a modern ronin.

Ben Cantrick
  Date: 2007-09-04 15:14
  Subject:   Programmers have trouble thinking beyond dual-core.
Public
  Tags:  parallel computing, reddit

To get a sense of what kind of performance improvement we can expect going from 2 to 4 CPU cores, let's focus on the Core 2 Duo E6600 and Core 2 Quad Q6600 processors. These 2.4 GHz CPUs are identical in every respect, except for the number of cores they bring to the table. In a recent review, Scott Wasson at the always-thorough Tech Report presented a slew of benchmarks that included both of these processors. Here's a quick visual summary of how much you can expect performance to improve when upgrading from 2 to 4 CPU cores.

http://www.codinghorror.com/blog/archives/000942.html

What's that? Software written in the days before cheap multi-core machines were readily available to programmers... aren't programmed to take advantage of multi-core? Shocker!!

I'm not saying that multi-core coding is easy. It isn't. Even the smartest programmers screw it up all the time. The human mind is set up to think procedurally. That's why even experts at lock-based programming still cause race conditions, deadlocks, and other forms of screwage with regularity. We programmers don't really understand parallel coding yet, and we don't have all the tools we need to do it well. I especially don't (yet) see any kind of reason to believe that parallelization of code can be made automated except in the simplest possible cases. Some human being is always going to have to be decide how a program splits up its tasks, and write the code accordingly.

So if you're going to buy a computer tomorrow, or next week, getting a faster 2-core may indeed be a smarter move than getting a slower 4-core. But I think in the long run, there's no contest. Programs that are properly written for N cores do see almost an N times speedup. And the tools to write code for multi-core are getting better all the time. It will probably take ten years for programmers to get fully up to speed on parallel computing. But once we do, watch out...
Post A Comment | 7 Comments | | Flag | Link






  User: nickhalfasleep
  Date: 2007-09-04 22:03 (UTC)
  Subject:   (no subject)
What kind of idiot can't handle multithreading? Oh wait...
Reply | Thread | Link



Ben Cantrick
  User: mackys
  Date: 2007-09-04 22:23 (UTC)
  Subject:   (no subject)
Most of us. ;D

I forgot to pay you for rent on the Linode after our debugging session the other night. I still owe you that money next time I see you.
Reply | Parent | Thread | Link



  User: nickhalfasleep
  Date: 2007-09-05 04:09 (UTC)
  Subject:   (no subject)
Dude, you get half off for how much I learned fixing that bug.
Reply | Parent | Thread | Link



Ben Cantrick
  User: mackys
  Date: 2007-09-05 04:44 (UTC)
  Subject:   (no subject)
Heh. Okay, not turning that down! ;D
Reply | Parent | Thread | Link



Trevor Stone: daemon tux hexley
  User: flwyd
  Date: 2007-09-05 00:48 (UTC)
  Subject:   (no subject)
Keyword:daemon tux hexley
That's assuming there are at least N things to do. There are some projects that can't be done more effectively with four people than they can with two. Processors aren't much different than people. (Well, they're smaller, eat less, are better at arithmetic, and don't leave crumbs in your couch...)

I think the main easy advantage of a multi-core machine is the ability to run multiple programs at once. When there's nothing to cooperate over (except OS-managed resources), there's nothing to stumble over.
Reply | Thread | Link



Ben Cantrick
  User: mackys
  Date: 2007-09-05 01:21 (UTC)
  Subject:   (no subject)
This is true - I am assuming a parallelizable problem. But many things that use a for() loop are parallelizable at least to some extent.
Reply | Parent | Thread | Link



Ohmi
  User: ohmisunao
  Date: 2007-09-05 17:59 (UTC)
  Subject:   (no subject)
Hmm PS3 must be fun to program then. Let's see the 7 core tango! :D
Reply | Thread | Link



browse
May 2015