Archive for November 20, 2006

Is dual-core better than quad-core?

Let’s hear it for the starved realm of reality.

Multiple cores are all the rage, it seems, mostly because you demand better performance — as do I, but I’d rather not subscribe to unrealistic expectations.

The mindset that more cores are better is far from the truth — this is not a simple case of raw megahertz. Whether additional cores will be beneficial depends entirely on a program’s fundamental intent.

Dividing a process into multiple threads does not mean it will simply run faster. In fact, it can run slower.

Generally speaking — and by this I mean for most desktop uses — the initial bump in performance from one to two cores is the greatest multi-core jump one is currently going to see.

Chances are high that you’re running more than one application. With two cores available among these running applications’ processes, the overall responsiveness of your multi-tasking operating system is increased.

One of the main reasons for this smoother ride is the running processes don’t need to wait as long after requesting processing time, as there’s another processor available. Quad-core isn’t needed for this.

Multi-tasking itself is also given a performance boost. This process doesn’t demand much CPU time, however, so once again, quad-core isn’t necessary.

This is why within a multi-tasking environment, as unfortunate as you think it may be, a dual-core processor is more than sufficient when the applications themselves can’t take advantage of additional cores.

Of course, where several processor-intensive applications are run at once, typically you’ll see a linear performance boost with multi-core processors, but this is heading into the realm of the workstation.

As an example, and for the sake of simplicity, let’s pretend we have a single-threaded video encoder. Using this application under a quad-core environment, you can encode four videos at once in the same amount of time as a dual-core takes to encode two videos, assuming the same video file and clock frequency.

These applications have no need to communicate with each other, so they can easily occupy their very own, dedicated core. Breaking this processing down to the individual threads of an application, which often share constantly-changing data, is far more complex.

It isn’t difficult to spawn threads left, right, and centre. It’s complex because the difficulty is in choosing the areas in a process that will actually increase performance.

There are many applications that are multi-threaded, but they don’t really see a real-world benefit from this parallelism — Microsoft Office, being one such example. It just isn’t hefty enough to noticeably benefit, as spell-checking and Clippy threads don’t exactly push a processor over the cliff (not to be confused with pushing kitchen utensils into Clippy’s eyes).

No doubt you’ve seen the quad-core benchmarks — allow me to gloat by saying I told you so: I told you so.

Ah, much better.

Synthetic, ideological tests aside, in the real world, there are currently no benefits on the desktop other than those running a workstation or a server.

The only real-world programs that are benefiting from the quad-core processors in comparison to dual-core are in workstation areas such as media encoding, or CPU-bound graphics rendering, be it 2D or 3D.

So why, then, are these applications laughing with four cores but your favourite game is barely forcing a grimace? It has to do with the nature of the data that is being processed. Most of our programs and games on the desktop are procedural, or serial in nature.

Each part of the information that these multi-threaded-friendly programs are processing is static and independent of its neighbour. As these parts are separate, a completely agnostic thread, or group of threads, can be spawned. On top of that, these types of processes are typically capable of taking up most of the available processing power of an entire core.

This leads to another problem — the need for a program to be able to optimise itself and initiate the right amount of threads based on how many cores are available.

This is much less difficult on a fixed system, such as a console, as the programmer doesn’t need to make room for greatly varying environments, be it one, two, or four (or more) cores.

An application must be threaded to support its environment. If there are too many threads available, you slow down due to a bottleneck of threads waiting for processing time, but if you have too little, you’re inherently not making full use of the available cores and, thus, an overkill CPU.

Testing and optimising for each possible multi-core environment greatly increases development time for something which may or may not have a significant performance boost. This is one of the main reasons I’m dubious about quad-core on the desktop, which is, and will be for a while, a very small niche.

So what is it in games and other applications that are otherwise resource intensive that is inhibiting them from a significant performance boost every time another core is bunged onto a system?

As I mentioned, the bottleneck is serialised commands that rely on their own or each other’s results before they can proceed. As a result, spawning off additional threads helps no one because a bunch of threads are waiting on one thread to finish its job and output a result before another can begin, ad infinitum.

See the problem? These serialised commands are not easily avoided, if at all, in our highly dynamic and procedural desktop applications.

What games have going for them, however, is a number of categorical processes, such as sound, graphics, physics, and AI. Ideally, as these processes are reasonably separable to each other, each could have its own intensive thread processing away on its own core.

In fact, Valve seems intent on convincing the gaming world that quad-core is significantly superior to dual-core because of just this. I’m not convinced that it will be that great, but I’ll be excited if proven wrong and Valve releases a game that significantly benefits from four cores as opposed to two.

What’s seemingly being overlooked is that CPUs are much less a deciding factor in the performance of games as are graphics cards. Upgrading the GPU has, for some time now, provided a far more significant performance boost over the CPU.

With stream processing picking up support on the GPU — and zipping well past the CPU for speed with its supported processing types — this only serves to make multi-core CPUs far less appealing.

Of course, if you just want to be an early adopter, that’s your choice. Unless your specific needs on a computer are at workstation-level, expect to see a dismal performance boost at best.

I won’t ever say quad-core will never be useful — one can never be certain as to where our ever-evolving processing needs will take us in the distant future. But for a while to come, outside of workstation and other niche requirements, desktop quad-core CPUs really are damned excessive.

Where have all the PC games gone?

t’s late in November, and Christmas is over in terms of game releases. If it’s not out by now chances are it’ll be delayed until next year. The inner PC user in me wants to attribute the delays to Windows Vista, however in reality Vista’s changes to the PC gaming landscape will mean very little for some time to come, and certainly does not provide a financial imperative to not release games for Christmas.

It is most likely the US launch of the PS3 and Wii keeping focus away from the PC market, which is a shame considering one of the by-products of Vista’s pretty desktop looks is that it gets gaming hardware into a lot more people’s hands. This means they can buy a game, fire it up and enjoy it, rather than try to run it only to discover that Intel has a whole other definition of ‘Extreme’ when it comes to integrated graphics.

This has left us PC gamers with a smattering of titles, some good, most average. We’ve seen stellar moments like Company of Heroes, competent ones like Dark Messiah of Might and Magic and ummm, to put it this way, asking around the office here the response was a sarcastic “That new football manager game” and “Oh, yeah, Jaws, that was good”.

Unfortunately having the most sharks ever in a game does not make it jawdropping (pun intended). The real answer is that there has been very little, in fact after asking more the only other title of note in recent months was Warhammer 40K: Dark Crusade, which is made by the same people as Company of Heroes. Hats off to Relic Entertainment for flying the PC flag while our former champions like Epic Entertainment go all console on us.

Looking forward to Christmas it looks like Splinter Cell: Double Agent, Rainbow Six: Vegas and *breathes deep* Lord of The Rings: The Battle For Middle Earth II: The Rise of The Witch King (LoTRTBFME2TRoTWK for short) are the only titles of note due to hit the PC.

As far as Christmas for PC users goes it looks like Santa Claus was mugged while trying to pay a homeless man to queue to buy him a PS3.

Redemption will come next year when some potentially groundbreaking titles emerge from development. High on our wishlist are games like Bioshock, Supreme Commander, Hellgate: London, Crysis and Command and Conquer 3. There will also be a swathe of massively multiplayer titles launched, attempting to knock World of Warcraft from its throne of incumbency, while WoW delivers a significant amount of newly minted addictive content in the form of The Burning Crusade expansion pack.

Despite the generally bleak outlook for PC gaming this Christmas, each and every one of the aforementioned titles stand out, and are laden with potential. While this year it looks like PC gamers will have to cope with concept’s like ‘sunshine’ and ‘fresh air’ by this time next year we should be happily ensconced in our darkened rooms working through a pile of highly anticipated releases.