Should All Developers Have Manycore CPUs?

Dual core doesn’t really protect you against badly written software. The most common problem is 100% memory use (and swapping), not 100% cpu use, and dual core doesn’t do anything to protect against that.

Just to beat the horse a little more, I would like to respond to the now infamous “waste of electricity” comment. I just got a Dell Inspiron 530 with the following specs:

Q9300 quad core
8 GB PC4200 RAM
500 GB Hard drive
gigabit ethernet

I use it as a host machine for multiple VM development servers (Visual Studio 2008, SQL 2005, Sharepoint 2007, Domain controller, etc).

After plugging in a Kill-a-Watt meter, I’ve found this PC uses LESS electricity than my old P4’s, and even a 1 year old Athlon dual core.
The Dell quad core measures on average 62 watts which is close to the IBM Thinkpad T61. Here’s my Kill-a-watt readings:

Dell Inspiron quad core Q9300 - 62 watts
HP Athlon X2 dual core 3800+ - 84 watts

Following up - here are the rest of the results of my unoffical energy audit. These are the watt readings using a Kill-a-Watt reader while on and running multiple applications. All the machines are using the on board graphics as I don’t have a need for fancy graphics while I’m coding.

Dell Inspiron quad core Q9300 - 62 watts

Asus P4P800 with P4 - 95 watts
HP Athlon X2 dual core 3800+ - 84 watts
Dell Dimension 4600 P4 - 70 watts
Lenovo T61 Laptop - 50 watts
Lenovo T61 Laptop w/ screen off - 40 watts
HP dv6525 Core 2 Duo Laptop - 40 watts
Samsung 22 inch monitor - 34 watts

As you can see, the Dell quad core uses less energy than most of my older PC’s. The 45nm technology is very energy efficient. I’m not arguing that 4 cores is faster than 2 cores for performance, just that 4 cores does not necessarily mean a waste of electricity. I think that newer computer components are much more efficient, but it’s also a factor of graphics cards, power supplies, etc.

I would be interested to see your energy results for the overclocked dual-core E8500 @ 4.0 GHz using the Kill-a-watt reader.

I’ve detailed the quad core build specs here: a href="http://bluesurftech.com/TechBlog/Lists/Posts/Post.aspx?ID=34"http://bluesurftech.com/TechBlog/Lists/Posts/Post.aspx?ID=34/a

Miles Kan

Let’s remember that Intel and AMD are pushing quad+ core processors NOT because the computing industry has realised it’s the way to go. It’s because they’ve failed in their quest to keep bumping up the clock speeds. In order to keep their market alive they’ve HAD to change tack and convince us that we all need multi-cores. It’s the only thing they can deliver.

Whilst multiple cores clearly have some benefits in very specific circumstances, their adoption is NOT being driven by the software developer community, or the computing industry, like it should be. It is being driven by the chip manufacturers, who need to keep their market alive but find themselves unable to deliver what we actually want, which is ever higher serial throughput.

Intel and AMD are pushing a solution for which there is no clearly articulated problem (very specialised applications aside). Basically, they have failed, and we - the programming community - are having to jump through some entirely artificial hoops.

SteveT

There is a company who offer compilers for c and C++ that compile code to run on multiple cores at www.codeplay.com

If you’re a C++ developer, you need a quad-core CPU yesterday.

Definitely true. I am a C++ native developer, using Visual Studio 2005 with IncrediBuild. For me the Quad Core is much more productive then dualcore, the compilation speed scales almost lineary with total GHz summed for all cores, therefore 4x2.4 is much much better than e.g. 2x2.8 I could perhaps have.

As for power costs, the Quad Core 2.4 GHz I have now is using much less power (and noise) than the PIV 3.6 GHz I have used before, therefore the upgrade was good in this respect as well.

Basically, they have failed

I agree they have “failed”, but I do not blame them for the failure. The fact the two competing companies have “failed” at the same time tell me there is probably some reason for the failure. Both AMD and Intel would like to increase scalar performance if they could (and to certain extent they still do), but the technology limits seem currently preventing any major leaps and no one seems to be able to come with any better performing technology so far.

Has Intel finally implemented their version of DEC/AMD’s HyperTransport bus?
No, but Intel now have independent FSBs for each physical processor.
If not, there’s hardly any point going above a single Core2Duo CPU on an Intel platform.
I can understand this, but thanks to independent FSBs, now that recommendation should be interpheted as max two cores per processor.
Take a look at the LAME benchmark cited in this article if you don’t believe me.
On the matter of this, the 1600 MHz FSB will certainly help, but there is no substitute for HyperTransport. Intel has it’s own version of HyperTransport, called QuickPath Interconnect, that should be available by late 2008. Google for it for more info.

Would’nt quad-core still be able to bettercope with CPU usage spikes? I’m talking about responsiveness, not the throughput.

Phillip,

While Ruby might use threads, everyday Ruby applications usually come in the form of a Ruby-on-Rails web application – which uses threads on the web server.

So multi-core is absolutely important for servers of any size and shape.

However, I do agree that there are web developers who might benefit from the multi-core on multi-VM environment – those who stress test their web applications across different browsers across different browser versions (think about, one VM instance for each major release of IE, Firefox, Opera and Safari).

I write a lot of LabView code and in that environment, it’s trivial to make multithreaded apps. I do a lot of data collection and analysis using it. What multiple cores have let me do is more real-time analysis rather than just collect data and analyze after the fact. It helps me know that the data I’m collecting is good as it’s streaming in. This saves the company I work for time and money and our customer money.

The thing I’m finding is that computer power is making this moot as well, our PC’s are jsut so insanely powerful that two cores can do what 4 used to be able to do.

Sheldon

What most people aren’t mentioning is that even if your code is beuatifully threaded, and you’re running multiple applications, the CPU is rarely going to be the bottleneck in every-day sort of workloads.

The disk is still the main reason users need to wait for the computer, and in many cases RAM can help with that.

It’s true. Most developers today are writing web applications instead of desktop applications, and in most cases it’s totally unnecessary. Shame, that.

I’m surprised no one has mentioned Parallel FX and PLINQ (Parallel Language Integrated Query), which move the very difficult work of optimizing multi-core usage to the framework level.

Some examples:
Replacing foreach() with Parallel.For()
var q = from x in data.AsParallel() where p(x) orderby k(x) select f(x); //will optimize the data filtering and ordering for multicore

http://en.wikipedia.org/wiki/Parallel_FX_Library
http://www.news.com/8301-11128_3-9922124-54.html
http://msdn2.microsoft.com/en-us/magazine/cc163329.aspx

Hopefully people will see beyond the obvious theoretical question:
"But why can’t my compiler do this automatically."
to the practical application:
“Compilers can’t determine all parallelizable operations without some hinting, and hand writing parallelized operations is really hard without a solid framework.”

As a desktop developer, I make serious use of my quad core processor. I often run two virtual machines on my box while developing and testing the client/server software I build. Having extra cores is not about performance with one application, but rather the whole picture of using your computer for multiple things at the same time. Even web developers have multiple applications and browsers open at the same time.

Our build process is not just compiling the source code, but packaging it inside of an installer and running tests. Our typical build takes 45 minutes for a single processor. I’m working on making it multi-threaded to speed it up.

Hogan