Get the daily SC news wire!

One, Two, Four: StarCraft II and Multicore

Posted 8th Aug 2008 12:21 PM by Kalos

Kalos' Chronicles >> One, Two, Four: StarCraft II and Multicore >> (1) | (2) | (3)

Quadcore.jpg



One, Two, Four: StarCraft II and Multicore

A big question has been echoing across the gaming world, one that relates to StarCraft II, but other games under development and the future of typical game design in general. The utilisation of multiple cores, otherwise known as multicore processors, is gathering both a user base and an audience waiting for news of developments upon this technological front. I will attempt to go through a rough time line of the development of this area of CPUs and the direction CPU design is taking from a linear execution model to that of a more parallel execution model and then relate that subsequent change in home computers to games and of course StarCraft II itself.


Origins and development of Multicore processing

Back in 2004, things were very clear cut. The industry repeatedly throughout what could be termed the Pentium era increased the megahertz levels of components, so much so on the central processor that we began to measure processors on the gigahertz scale instead (For those unfamiliar with these measurements, one gigahertz is more or less one thousand megahertz). We went from using 0.02 Gigahertz processors in our computers to using those of over 2 Gigahertz within the space of a decade. However, with increasing frequencies came increasing inefficiency in terms of power consumption and thermal outputs, summed up in the later Prescott type Pentium 4s and many of the Pentium D type processors in the 2004-2005 time frame.

Clearly increasing frequencies without end was not a sophisticated answer, nor was it effective any longer for the future advancement of technology. While RAM and graphics cards weren't quite bumping into the problem as of yet, they already contained a solution within their design. RAM is very rarely used as a single stick in a single socket, there are typically three or four sockets on a motherboard and often multiple sockets are being used by RAM fitted in them. Graphics cards companies had begun to experiment with technologies such as Nvidia's SLI and ATI's Crossfire technologies, allowing two graphics cards to work side by side on the same screen, increasing the rendering power dramatically in some games. Why not the same for CPUs?

In fact, multiple processor machines were very common in the server market (as our administrator Rush will tell you, having owned several servers over time hosting domains like one). Universities, government departments, and big companies had machines with thousands of processors cooperating together on important tasks. Even simple things like the special effects movie studios such as Lucas Arts use large processing farms to perform complex heavy tasks. Clearly if game complexity was to continue to demand more processing in the future, processors could not stand still on the brink of the great gigahertz race without progress.

Such being the case, both Intel and AMD decided to pursuit the multicore direction. In 2005 consumer level multicore processors began to be released for sale, the new Pentium D and Athlon X2 processors were the new top designs wielding high price tags and high prestige. Following rapidly the following year was the architecture now known as Core 2 Duo, a great step forward from both of the original releases. Prices quickly dropped and many dual core processors entered the sub $150 range, some even below $100 as new top level four-core designs began to appear for the high end user. Of course with Apple switching over to using Intel processors instead of Motorola, they now use a large amount of dual core chips in their various products as well.


Problems With the Multicore Approach

However, performance leaps were not as simple and easy as expected by many users. Having two cores did not mean you could run a program twice as fast, and having four cores did not mean you could run a program four times as fast. The best way to explain this is through the analogy of a road. On this road is a single car, representing a single task. Increasing the speed limit of the road allows that car to travel faster, but adding a second lane to make it a dual carriageway does not mean the car suddenly travels twice as fast. The same thing goes for dual and quad core processors. Most tasks are still single threaded, a thread being the processing nature of the program and how it can be split up. You can't split up a single thread, just as driving half in one lane and half in the other, despite how some drivers love to do this, won't make your journey faster. The program or game in this case has to be designed from the ground upwards to be able to break certain functions into separate threads for execution, spreading several small tasks over the processors rather than one centralised thread generating the program.

Nearly all games today are single threaded, and most of those that have been use very basic multithreading in which one thread is still heavily dominant with a few minor loads untangled and able to be assigned to a parallel core. Even though it would mean games would run faster and more efficiently, it is something that isn't simply a feature that can be tacked on to a product. Programmers have to be taught how to do it over their old methods and it isn't exactly easy for certain types of programs. The PS3 is hard to program games for due to this reason; the Cell processor it uses is actually several cores of varying speeds and capabilities (making it a very strange choice for a games console processor by increasing the difficulty for developers but it does make for good boasting rights for Sony I suppose).

While it had worked great for servers with specially written programs, simply pushing multiple core processors in a market rooted on a single processor-single thread dominant mind frame is complex. There are no performance losses, but people expect certain returns for their hard spent coin, and so far I've made it sound as if there is no benefit to quad cores or dual cores at all, for Starcraft II or a typical gaming machine in general.

Explanation of Dumb Multithreading and 'Should I get?' on Page 2.


 1 2 3 >

Comments

You must be registered and logged in to post comments.
Page 1 of 1 pages
Leord
Posted 10, Aug 2008 01:27 AM
(0)
 

I can’t really stress this enough, but I find it really interesting to see how all these hardware technologies come together, and it all just makes sense when explained by an expert. Well, Not that Kalos calls himself an expert, he’s just to timid wink But I mean I thought I had a decent amount of knowledge, and it’s very refreshing to be filled up on ten times that information.

Thanks a million Kalos, I really appreciate the time you take to write this. I really look forward to the next edition! And some time in a distant future a buyer’s guide as well wink Don’t forget laptops in that guide though, I love laptops!

Reply
 
Troglodyte
Posted 10, Aug 2008 03:58 AM
(0)
 

Another excellent article Kalos and well written too.  I managed to pick up some info on multithreading that I wasn’t originally aware of.

You made a good point about the development start date for SC2; it might be unlikely that this technology will be fully used with the release but it’s definitely something that they should consider for future games.

I probably don’t know enough about game programming, but I assume it wouldn’t be feasible to “enhance” the code with the inevitable expansion?

Reply
 
Troglodyte
Posted 10, Aug 2008 03:58 AM
(0)
 

Another excellent article Kalos and well written too.  I managed to pick up some info on multithreading that I wasn’t originally aware of.

You made a good point about the development start date for SC2; it might be unlikely that this technology will be fully used with the release but it’s definitely something that they should consider for future games.

I probably don’t know enough about game programming, but I assume it wouldn’t be feasible to “enhance” the code with the inevitable expansion?

Reply
 
Yamael
Posted 11, Aug 2008 02:03 PM
(0)
 

This article was really interesting and well written, but you have left me with one doubt:

A game designed with multi-threading in mind so it takes good advantage of multiple processors / cores would run well in a single core computer, or would the constant switching between threads slow down the game? Of course we’re assuming the rest of the computer is up to par and capable of running the game.

Reply
 
Yamael
Posted 11, Aug 2008 02:03 PM
(0)
 

This article was really interesting and well written, but you have left me with one doubt:

A game designed with multi-threading in mind so it takes good advantage of multiple processors / cores would run well in a single core computer, or would the constant switching between threads slow down the game? Of course we’re assuming the rest of the computer is up to par and capable of running the game.

Reply
 
Kalos
Posted 12, Aug 2008 11:59 AM
(0)
 

[QUOTE=Yamael;5641]This article was really interesting and well written, but you have left me with one doubt:

A game designed with multi-threading in mind so it takes good advantage of multiple processors / cores would run well in a single core computer, or would the constant switching between threads slow down the game? Of course we’re assuming the rest of the computer is up to par and capable of running the game.

Indeed, the overhead from managing and coordinating the different threads would be quite costly on a single core processor. I’d expect at least a 10% drop in performance, increasing as more threads are introduced. The threads often have to duplicate some of the same maths as they can’t pull the conclusion out of a seperate thread on that operation at the same point in time. There would be much greater performance benifits in multithread processing machines that decreases in the single thread PC market however. It is just a very difficult process to isolate areas of execution that can be processed seperately, not to mention isolating them from the main thread without making the whole thing inoperable: the main reason why multithreaded applications are usually freshly built rather than recrafting a single thread program, from what programmers tell me it is radically different.

Many applications on the small scale, without major processing demands, simply don’t benefit noticably from a multi-threaded nature, so amature small time programmers rarely go to the both of learning a set of styles that is overly complicated for what they are doing. Right now, multiparellelism in hardware works, but in most software it is ignored, for others it is nothing but a marketing gimmick, and in a minority it is actually benifitting the task. I believe the up to date versions of WinRAR and Photoshop take advantage for gains that can be seen in the time taken for tasks.

Reply
 
Kalos
Posted 12, Aug 2008 12:13 PM
(0)
 

[QUOTE=Troglodyte;5606]Another excellent article Kalos and well written too.  I managed to pick up some info on multithreading that I wasn’t originally aware of.

You made a good point about the development start date for SC2; it might be unlikely that this technology will be fully used with the release but it’s definitely something that they should consider for future games.

I probably don’t know enough about game programming, but I assume it wouldn’t be feasible to “enhance” the code with the inevitable expansion?

It is hard to retrofit multithreaded subsections and actions into a multithreaded design, but I wouldn’t put it beyond Blizzard and their engine. I half expect them to make minor multithreading from the physics processing. It is hard to say what can be isolated and processed seperately, a typical example is AI but there is no evidence or sourcing to suggest such an undertaking. Features added later into the build, such as an expansion, I suppose would have a higher probability of being multithreaded that the original core components, it depends on what kind of things they’ll choose to add I suppose.

Reply
 
Page 1 of 1 pages

Search StarCraft IncGamers

We are Here Where are You?

- StarCraft Videos

Loading...

StarcraftWire's Friends

SC2p.com

(view more)

Link to StarcraftWire with this image:

Syndicate