Should All Developers Have Manycore CPUs?

@ Aaron G: rather web applications than the nth monstrosity in VB or Access (or Pascal, or…) which will or will not run after a certain set of office applications have been installed, and which plays hell with concurrency.

Yes, there’s enough room for several horrors in PHP, but no horrible crashes.

Jeff, I find this article disappointing. I didn’t think I would put you in the “those doomed to repeat the mistakes of history” camp. This is the same sort of mistake that Bill Gates made when exclaiming with all seriousness “Nobody will ever need more tha 640K of RAM!” At least you didn’t say “nobody”. More and more software will be able to take advantage of the extra cores. Games will start using extra cores to compute physics while handling other tasks. I believe Crysis is already pretty scalable to additional cores. I can think of lots of uses for at least four cores and I’m sure there are many more scenarios that I can’t think of. Given that a quad core CPU is not much more expensive than a dual core I can’t think of any real reason not to get a quad even if the clock speed is a little slower. I consider a quad core more future proof than a dual core even if it runs at a higher clock speed. You can easily overclock an Intel Quad core but you can’t add more cores to a dual core. Unfortunately, AMD quads haven’t shown much headroom in overclocking ability.

Also, if you can’t think of what to do with your extra cores you can always run the Fight AIDS At Home grid software from www.worldcommunitygrid.org. It makes use of multiple cores quite nicely for a good cause.

I often also find developers, myself included, highlight their threaded applications, until someone sat down one day and showed me how hard it really is to write for multi-processors.

But it’s not hard to write multithreaded applications. My Master’s was in high performance computing, and once I got proficient, I never wrote codes that would deadlock or have other synchronization errors from running on multiple processors.

The problem is that most people just haven’t taken a class on the subject.

C’mon!

What about us guys that use VM Workstation and have 4-5 VMs running all the time?

Yes, I use a VM for VS2008 that contains all my projects, third party apps, configuration, etc. I hate rebuilding this crap every time something hoses my host system and I have to reload everything.

I’ve spent months of my life (over the last 18+ years) re-installing DOS, Windows 3.1, Windows 3.51, NT 4.0, Windows 200, Win95, XP, Windoes 2003, Windows 2003 R2, Vista x86 and x64 approx. 8 times for home stuff already, and Windows 2008. Good Grief!

I highly encourage everyone to stop loading your primary PC up with crapware and beging having a dedicated VM for all your primary needs.

I have one for:

  1. Outlook2007, NNTP Reader, and RSS
  2. VS2005 + with third party apps and SQL2005
  3. VS2008 + with third party apps and SQL2005, Expression Web
  4. Visual Studio 6.0 with all third party apps and SQL2000
  5. Test XP VM for loading any/all crapware applications for testing, etc
  6. Ubuntu Workstation 7
  7. Ubuntu Server 7
  8. Adobe CS3 apps (Dreamweaver, Contribute, Photoshop, etc.)

With VMware Workstation 6.0 and its multi-montior support, it’s almost a no-brainer now to use a VM.

The new 6.5 release will support DirectX9, which means all my Expression Suite products will have their own VM as well.

I’d say quad core is a must for any serious PC user.

DavidM – what about Windows Server 2008 x64 and the Hyper-V stuff? How does that compare with VMWare Workstation 6? I hear people talk about doing the same sort of thing you just described, except via 2008’s Hyper-V thing.

To be honest, I have Windows 2008 loaded within VM Workstation, but have not attempted to yet again blow away my host machine and reinstall another virtualization product. Besides, it’s not fully baked yet anyway…

I do not think I’m going to really gain any of the benefits that VM Workstation provides using any other product. Multi-monitor support and DirectX and the soon-to-be Unity (where I can have a VM application appear on my host desktop as a regular application) is something that none of the other virtualization products can touch.

Again, I’m using VM Workstation 6 for a home PC. If I was in the office and trying to have multiple desktops and whatnot, I’d likely use ESX or Windows 2008 Hyper-V with some sort of RDP connection.

Most developers doing web apps? Yeah right, and just how many applications on your PC are web based… that you can stand to use for more than one minute? Thank you.

Web developers are the majority of those chatting about web apps thus it may seem to be a larger category than it actually is.

You must understand that to a web app the OS is the web browser. A very non-standard loosy goosey gonna change for the next 10 years platform. Serious applications are programmed against a real operating system that has real stable standards.

Thus the future of “desktop rich clients” will probably be served by Citrix like servers. Where each executable thinks it is inside it’s own OS. This way developers can develop as they always have plus the benefits of pushing software to the web browser.

i think it been mentioned already, but compiling is usually i/o bound, not cpu bound.

on big projects that becomes more pronounced as ur harddisk groans under all those files.

oh, my gosh. Miss a couple of days and… Stand in line.

A couple of Questions here. (They might seem trivial, But I would like to know)
Q #1: Does multi-core CPU processing / compliling become multi-core CPU process dependent programs? Or, can it happen that way? As in a program devoloped in C++, share-compiled across multi-core CPUs, leading to run errors on a non-multi. Is that an issue? (In my little mind it could be an error factor.)
Q #2: On multi-threading program compiles. I’m realitivly sure that most processes are using multi-threating in their operation. Just how does a person compile correctly a multi-threaded program across multi-core CPUs? And than, as in Q #1, have, or lead to problems on non-multi systems.
Anyone care to try to get up up to speed on this? (please, and a Thanks as well.) -d
a ps as well… Would / could those times mentioned as ‘bench marks’ be also dependent on the thread managment? It seems that even with, or maybe more importantly basic thread managment would some how come into the overall process. No? -

“640K ought to be enough for anyone.”

-Bill Gates

Developers – or at least testers – using single CPU computers are still important – especially when you develop device drivers. Here’s an example from my work why it is important:

My company makes PCI cards (for motion control), the firmware for the cards, the device drivers, and libraries for different OSes to access the cards. A few weeks ago, I upgraded the firmware on the card and my computer froze. It turns out that the card kept hitting on the intterupt line. My computer’s CPU spent the entire time trying to service the interrupt, not allowing anything else in the operating system to run. None of my co-workers experienced the problem. I knew that I have one of the older computers and probably the only with a single-core CPU. As soon as I suggested my co-workers look at their CPU usage before and after upgrading the firmware, they noticed the one core being completely locked-up. However, they had other cores available to run the rest of the operating system.

We are now trying to come up with a test to monitor CPU usage, but the scary thing is that if it weren’t for my old single-core computer, we may well have shipped the software to customers only to discover the problem in the field.

If you run only Windows, maybe you could be right. For me, I would consider a more budget oriented quad-core as an alternative to a system with 2 dual-core CPU’s. The vmware argument is spot on. I run Kubuntu and use vmware to have install scenarios that don’t clutter up my computer. If you wish to run anything that’s more than a few processes or a few threads per process, the more cores the better. Just need to remember that a doubling of cores does not mean a doubling of overall performance. What about running an IDE (Eclipse,IntelliJ), a runtime environment(Tomcat/JBoss/Geronimo/Mono), a build (ant/maven) and some browsers(Firefox with tabs of Javascript and Flash) and a music player all at the same time?

The post sounds like its trying to solve my issues before it knows what they are! Next will be a 32 vs. 64 bit diatribe… How no one ‘needs’ more memory than some silly number in the sky.

Badly written software rarely multithreads, and certainly not effectively. I think the point stands.

I have literally never seen a crashed, consume-all-cpu program take out more than one CPU. Have you?

If you wish to run anything that’s more than a few processes or a few threads per process, the more cores the better.

I consider this pure wishful thinking. There are no benchmarks, outside of highly specialized tasks, that support what you’re describing for typical – even “developer” typical – tasks.

Yes, dual core brings clear benefits for 80-90% of general purpose computing. Quad-core, more like 10% at best. You’ll suffer from diminishing returns unless you live in those edge conditions.

It’s true that eventually all CPUs will be quad and this will be a moot point. But why pay more for the same performance today?

“dual-core CPUs protect you from badly written software”

No they don’t. It only takes two errand threads and you’re done.

Ahem - bye bye goes the ‘why pay more’ argument then? http://www.custompc.co.uk/news/602457/intel-slashes-core-2-quad-prices-by-50.html

Jeff - it sounds like your whining about making the wrong choice of CPU. Don’t sweat it, it happens to us all. Next hardware cycle just try to step back a bit and look at the bigger picture. Don’t be embarrassed with just 2 small cores.

Besides, we know you just write these ‘John Dvorak’ style posts to get the page views up - and who can blame you, you’re in the ‘content’ business now.

I suggest a ‘Why I think hi-speed internet is a waste of money for most people’ article - that’ll get them chomping onto your new ad-sponsored stackoverflow.com venture eh? Click those ad’s monkey boy!

An open source example is SharpDevelop. On a typical 2.4ghz celeron, their code editor control scrolls at about 2-3fps, almost unusable. But this bug is marked as “wontfix worksforme”, because the developer has one of the fastest desktops money can buy, so it scrolls at like 10-15fps, barely noticeable.

I have a single-core AMD 64 3500+, hardly one of the fastest desktops nowadays. I’ve also tried SharpDevelop on my old computer (1.2 GHz); and scrolling was still fine.
And I did look at the drawing performance, and found all that all time is spend in the GDI drawing functions, not in our code. I have no idea why GDI is slower for some people, and why this happens only in SharpDevelop. I’m certainly no GDI expert, so it would be great if someone could review the drawing code to check if there’s something wrong, but I don’t know how to debug and test this without a machine where I can reproduce the problem.

Jeff–

I know this blog entry has you up to your knees or above in comments. :wink:

I’m hoping though that a link to my recent comment / request for your advice or thoughts, on your now nine day old blog entry re: upgrading your 18 month old main home power PC, will get you to notice it, and hoepfully want to respond!

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

Your PC building and overclocking posts both on Scott Hanselman’s system and your upgrade have I think nudged me over the edge towards rolling my own once again, though I haven’t done that for a decade now (and am using a laptop as my main home system at the moment.) Time for a Vista 64 / 8gb ram / foray I think. But I need your mobo and other advice. Hence the link!

How silly. I don’t care how many processors a single app can use as long as my OS can distribute processes across processors. After all who on earth only runs a single application on their box these days?

I have a dual core 2.3 GHz processor in front of me and I regularly have to restrict the number programs that I’m running because my machine will grind to a halt.

Eclipse + iTunes + MS Word + Excel + OminGraffle + Chat + Mail + Calendar + MySQL + web server + a linux build server + a linux target server (both communicating with each other over encrypted channels) + XP running MySQL for compatibility testing is not an unusual combination. And if I had enough RAM and processing power I’d regularly be setting up another six or seven VMs so I could accurately simulate our production environment.

As a user how snappy my system responds is more important that how quickly it does things. Even if none of those tasks know how to use more than a single processor, a quad core is a big win for me, and I suspect that I’m not alone.

I am typing this on an 8 core MacPro. I am a Java developer. At any given time I will have Eclipse running (a CPU hog), I will be debugging one or more servlets, I will have at least one DBMS running, and I will have several web browser pages open (possibly several different browsers if I am trying to figure out why something works in IE vs. FireFox vs. Safari).

I could quite possibly be running one or more VMs in VMWare and maybe several other tools (profilers, debuggers and so on).

I have found that this really taxes a two CPU system and sometimes even taxes my 8 core system (I need to get more memory too).

Other benefits are that I have seen multi-threaded apps work fine on a single core system then crash on a multi-core system due to bugs in the code. I can assign certain CPUs to certain CPUs and keep others from being loaded down.

As for being able to test one a single core, as I mentioned I can either assign the one core to the one process, or I can easily disable one or more CPUs dynamically (CPU Palette, an app that comes with Leopard, allows me to just click on the CPU icon to disable it from being used by any process).

I was going to buy a MacBook Pro, but I am going to wait until they are available with more than 2 CPUs and 4 GB of memory (another reason I bought my MacPro - the ability to stuff 32 GB into it so I can run multiple VMWare sessions).

I remember when the 16 mHz Intel 386 came out. A magazine pundit stated that they would only ever be used in high end workstations or “file servers” as they were more powerful than the typical user would ever need. Famous last words.