How does software profit from Dual & Quadcore?

Joined
Dec 3, 2006
Messages
538
Statement: Dualcore is not doing much in games so consider it as a single CPU.

What I don't understand with the whole Dual and Quadcore: How software is gonna profit from that!
You have Hyperthreading but if it isn't implemented in the software Hyperthreading is useless so is Quadcore in some way.

Hyperthreading makes a comeback in 2008: http://vr-zone.com/?i=4322

Why Hyperthreading never realy took of in software?
 
Well iNTel and AMD CPU are of the "Out of order" kind. So each core can do some parralelsation to execute code out of order.
But if there is to much code depandancy in the code mix. Then this solution can be very uneffective. That why the stick with 3 ALU and not 16.

HT give the opertunity to use those 3 ALU if the code is to much code dependand off a single thread. this way the core is used beter in some cases to use the unused ALU for a second thread. The down side is independad code wich fills all the ALU get a overhead performance hit. So some apps are allergic for it. So it can mean in other case more performance and in other not. XP could do disable HT if Application doesn't do well on HT.
But it disabled SMP. Wich means if XP would disable HT by disabling SMP the disable Dual and multicore to. So a Dualcore with HT just take the performance it that why a 840 can be slower and faster then the 840EE

So HT supports two threads Dual core and multi core supports also more threads but with the resources off a full core.
The problom is Software must be design to take advantage of it. It means the task must be optimal split over all cores and better is that the app can detect the number of cores avaible and split the task over all cores.

Ofcourse there is the easy way and a more complex efficent way to do so.
The Valve Multi core support arcticle will eleborate on that. Somewher on the net.

Gamer developers are now so used to singlecore development. They must adjust and optimise for it. that takes time.
IDsoft and Valve are the onces that go for SMP and more to come.
 
there is only so fast (i think) you can make the current arch of CPUs without changing something HUGE, Moore's law only states that the number of transistors doubles - these statements combined would suggest that extra cores is what is going to happen, and intel/amd are doing this (intel promising 80 core procs in 5 years or whatever)

so CPUs are gaining cores - this means that programmers now how a reason to multi-thread their programs. however, making a game that actually uses even 8 threads is just about impossible. you can make physics/rendering/ai threads and they could take up 100% of a core, but the input/manager and little worker threads aren't going to stretch the other cores that much.

so at the moment with 2/4 cores, games can be developed (and are being developed, even existing engines are being updated - like the source engine) which utilize those extra cores. however, with 8+ cores the only way for games to actually benefit from these is through reverse-hyperthreading (running one thread on two cores), an extremely advanced compiler (like impossibly advanced) where you program using one thread and then the compiler works out what tasks can be run at the same time, or by something else that we (or at least I) don't know of yet - which is probably what intel/amd/someone is designing/thinking about.

in the end, they'll work out a way, they always do. the only option really is for an automatic-hardware optimisation, as making programmers use 8+ threads at 100% is just about impossible.

(i talk about games because thats what I program, don't know much about normal applications, and games is one of the main areas where improvements to CPU/etc are actually noticed and used (unlike microsoft word or something, which doesn't neet tonnes of CPU))
 
MrMeikel said:
so CPUs are gaining cores - this means that programmers now how a reason to multi-thread their programs.
It's more they have to do SMP to make use off those extra Transistors for more then one core, iNTel and AMD put in consumers CPU's.
however, making a game that actually uses even 8 threads is just about impossible.
Valve is just going to do that. One core for sound one or the same for thread management. The other 6 to 7 will be detected and the load of each module would be split over the avaible cores. Wich means Valve new engine scales up well wenn more cores CPU comes avaible. Test of Valve show that this is the most efficient approach for SMP for games. That what I have heard in the new press about it. So a 80 core CPU would boost this game to. Nice for modders.
you can make physics/rendering/ai threads and they could take up 100% of a core, but the input/manager and little worker threads aren't going to stretch the other cores that much.
Problem is each task system doesn't have a need to stress a CPU for 100% it's very dynamical. Each subsystem/task have possible a very different average load. So puts a lot of Power to a waist, while a other system that needs it. Fill one core full after waiting on other task. While others cores wich there task are partialy used.
Valve have tested this easy way method to but doesn't scale wel up.
1 ) if you run out off task systems you keep idle cores if CPU gets more cores then you have task.
2 ) Games are serial in nature. First the game logic must fetch input compute Physics en then prepare rendering. Rendering setup coms after physx.
3 ) Each task thread load are different and dynamical.

So If you put Physics on one core. instead of 5 to 15% reserverd of one SC aplication in the old day's would give. you get with DC, QC and MC now a 100% a full core. But this Phsycs threads is still waiting on the Server thread computing inpute and game logics AI then Physx task get the result and computing for the render task wich is waiting for the Physx task.
So that 100% dedicated would be 25 to 33% and for the rest be idle.
Valve tested this and the performance gain is there but far form impresive
Sure it beats a Single core aplication.
So each Task must be split over most cores.
That's fine grain MultiThreading spliting a single task over multi cores.
That's the hardway but posible.
And being done.

Performance scales way better with the number of cores.
And that number can be bigger then there are task.

Because while other task are waiting or done the task at focus and others are depended on, get a large pack of resources of the CPU to do its thing in a lot less time.

In my example. With in one frame of 1/60 second it get 1/4 part to do its thing but with 6 to 7 of the 8 cores. Thats 25% * 6

And all cores are mostly bussy doin somethin.

There is also a down side. Some task liek sound isn't so splitable. Well. No problem.

The hybrid solution. Put the unsplitable task to a common or own core and the othere task are split over the other avaible cores.

So this solution makes sens from 4 or more cores.
so at the moment with 2/4 cores, games can be developed (and are being developed, even existing engines are being updated - like the source engine) which utilize those extra cores. however, with 8+ cores the only way for games to actually benefit from these is through reverse-hyperthreading (running one thread on two cores), an extremely advanced compiler (like impossibly advanced) where you program using one thread and then the compiler works out what tasks can be run at the same time, or by something else that we (or at least I) don't know of yet - which is probably what intel/amd/someone is designing/thinking about.
that reverse threading is a solution for Software houses that don't go for SMP.
It whil detect code mixes that are easy splitable and recofnisible.
So Depends how that singletreaded program is programmed. And performance yield are welcome but don't expect as real SMP support.

Most game developrs who started in that bussnes aren't used to SMP development and must learn it and get experience in it. While Software engenering market for Proffesional software. SMP is a Common basic use because Super computer servers and dualcore workstation exist for a long time in the CPU market.

Keep in mind that Valve is one off the early adopters just like IDsoft(with iNtel help)
That means most games coming out will not so SMP using or using the easy way wich yields a bit performance. But in time SMP will be common for Game development to.

Plus Compiler optimisation take years. And this reverse idea was i think AMD idea.
iNtel could pull it off but it takes years. Unless the are already bussy with it for years. We could see this earlier.
Maybe iNTel picked it also up. But it takes time to develop such compiler. By then the software market is mostly migrated to SMP use.
in the end, they'll work out a way, they always do. the only option really is for an automatic-hardware optimisation, as making programmers use 8+ threads at 100% is just about impossible.
In the end Gamedeveloprs will Migrate to SMP coding. this takes time but for competive sake they have to do so.
So surely the licenced engines whill go for it.
Inhouse engine in time also other wise they stay behind.
(i talk about games because thats what I program, don't know much about normal applications, and games is one of the main areas where improvements to CPU/etc are actually noticed and used (unlike microsoft word or something, which doesn't neet tonnes of CPU))
SMP is old stuff there are old books about threads save coding.
Because it basic stuf for proffesional Software engenering and software applications for Proffesionals.

For Gamedevelopers wich doesn't come from the Software enginering bussnes it's something they aren't used to.
But some off them have the background who have to pick it up again.

While SMP had before a suportive role. Load threads.
Now it where a game engine must be based on.
 
Tnx for the info replays.

Is it true that if you have two HT strings and two CPU's. One threat will alwayz go to one and the other to the other CPU or can you put the two HT for example on one CPU if you want that?

I expect a lot more of the HT in software in the future (But so did during the last 3 years).

They have to make some sort of general platform which will make implementing HT in the software more easy, sort of standard or DIN norm. The have to because Dual or Quadcore will be useless without use of the proper software.
 
Youri Carma said:
They have to make some sort of general platform which will make implementing HT in the software more easy, sort of standard or DIN norm.
I think you're getting multiple threads and hyperthreading confused.

Hyperthreading (HT) is a hardware feature that simulates the presence of two (or more) logical processors so that two (or more) threads can be scheduled concurrently. From a programmatic standpoint, this is very similar to actually having multiple processors (in fact, all we need concern ourselves with is that the scheduler does indeed see two processors, the hardware handles the rest).

Also, there are already many established platforms for developing multithreaded applications. Windows comes with kernel threads iirc. Linux has POSIX threads. There are also a number of user thread libraries available like GNU Pth.
 
In life, there are certain tasks that can always be achieved faster with 'n' number of people where 'n+1' people or 'n-1' people decreases the productivity. Examples: It's easier for one person to carry something within his/her carrying capacity than it is two.

Team work (threading) requires management ("overhead"), and the decisions have to be made whether putting more players in the field is going to help or get in the way.

Now computers don't always have to follow the rules we do, but for the most part they do.
 
Back
Top