Multiple Cores and Games

slicedtoad

Distinguished
Mar 29, 2011
1,034
0
19,360
The general consensus is that games need processor clock speed over lots of cores, right?
I'm wondering whether this is software or hardware related.

Multiple cores help with multi tasking for obvious reasons so i understand why they are useful on a workstation computer.
But don't modern games multi task a lot too? A hypothetical chess-like game may only be able to use one core but a modern game does tons of things at once, all the time.

My assumption is that only the software is limiting the usefulness of multi-core processors in games and that, theoretically, a CPU's effectiveness could be measured in GHz times cores (not accounting for brand differences, etc.) if game developers made their games specifically for multi core processors.

Am i right or am i missing something? I suppose GPUs could have something to do with it because they take some of the load off the CPU, though i don't know the exact relationship between the GPU and CPU or how it divides the workload.
 
Solution
In the absence of truly parallel threads (the over-whelming case in the majority of games) the Windows scheduler will load balance across all available cores --- games, apps and background tasks.

The problem is that within Windows [and really, all modern desktop OS'], its impossible to make truly parrallel threads, because they all touch the OS kernal. And because [especially in windows] theres only ONE instance of all system DLL's, you quickly realize the OS itself is the primary problem: Windows is NOT a good OS for doing work in parrallel. [Frankly, I think we need to go back to statically linking everything; DLL's were a memory hack, and have caused more problems then their benifits justify]

Likewise, threading is easy...

evilgenius134

Distinguished
Apr 20, 2010
246
0
18,710
Threading a game requires processing power to manage them, it is only worth performing this if the benefit outweighs the extra overhead, this can be shown with some games receiving slight hits to performance in the early days of multi-core processing.

Video games although fairly intensive CPU and GPU wise may not receive very much benefit to massive parallel improvements, certainly we have seen that a lower clocked Core 2 and i5 perform much better than a 3.8GHz Pentium 4, but that is mainly the system being able to multi-task separate applications than the game by itself.

This is also seen with multi-GPU scaling, some game receiving much less than the predicted 80-90% improvements it theoretically gives, because you cannot efficiently split the workload up. GPUs don't take workload off the CPU they just perform a workload that they have been designed to solely perform which a general processing unit won't perform very well at.

Games are completely different to conventional applications requiring synchronization with all threads much more than other applications and within the system itself CPU and GPU wise.

Within CPU architectures games benefit from clock speeds, but between them you can't do a direct comparison.
 

4745454b

Titan
Moderator
It's a software and "bad design" thing. First, we don't really have a good video game threading engine. We are slowly getting there, but we lack a good game engine that can break the various parts out to separate cores.

When I say "bad design", I mean that games don't naturally support parallelism. The game needs things from you before it can continue. It can't perform C + D until it finishes A + B. Video converting programs work with multi core CPUs because it can safely assign a group of frames to X core. None of the other frames depend on what value goes to frame Y. It's already been done.

Threading a game requires processing power to manage them, it is only worth performing this if the benefit outweighs the extra overhead, this can be shown with some games receiving slight hits to performance in the early days of multi-core processing.

The amount of processing power needed to do this is very slight. Early HT had problems not from what you wrote, but from bad schedulers in the OS or from the chip stalling out. (two threads trying to use single resource in the CPU.) I've never seen a true dual core perform lower on a test then a single core.

certainly we have seen that a lower clocked Core 2 and i5 perform much better than a 3.8GHz Pentium 4, but that is mainly the system being able to multi-task separate applications than the game by itself.

I disagree with this as well. Its mostly due to the increases in the instruction per clock abilities of the C2D and i series then the systems ability to manage apps/threads. Inorder to hit those "high" frequencies Intel's engineers lengthened the pipeline to ~32 stages. This effectively ruined the IPC of the Prescott arch. Even the 20+ stage Northwood was C4C faster then Prescott.
 

joshyboy82

Distinguished
Nov 8, 2010
739
0
19,160
A 2 Ghz quad core will be vastly superior to a 3 Ghz dual core in almost any modern game. Most games are at least threaded for two processors today. That said, you have back ground tasks running, so you have a game running it's processes solely on processor at full load, your other background tasks are on the other processor. This way you're not sharing the CPU cycles with non-game programs. It moves up to 3 and 4 cores when you need that spare core, plus you have at least a dual threaded applications. Processes need cycles to complete, and if you share your cycles with another program, you need more cycles (higher clock rates) to happen. Different architectures have different cycle rates and less errors. The newer the processor, the more cycles it can complete at any given time (AMD excluded, because they are still running the same processors as years ago, they just keep updating the cores and speeds). A Core2 Quad at 3 Ghz is less efficient at processing in every way to a i7 at 2.8 Ghz. Without hyperthreading, which adds virtual processors to attempt to double the productivity by filling empty CPU cycles, but never really achieves a 2x productivity. Physical cores cannot be substituted by virtual cores.

Real world example: The HP laptop in my signature has a Core2 Quad 2.0Ghz (Q9000). My brother has an identical laptop in almost every way but his comes with the Core 2 Duo 3.06Ghz (T9900). His laptop could never match mine at gaming and struggles to run some games at all that I've completed on my laptop. Such games as: Metro 2033, Medal of Honor (2010) and Tropico 3. This is my real-life experience.
 


I couldn't disagree more ... and if I understand what you are saying you are contradicting yourself.

In the absence of truly parallel threads (the over-whelming case in the majority of games) the Windows scheduler will load balance across all available cores --- games, apps and background tasks.

More cores does not equal more performance in actions which are not highly parallel --- in fact, the opposite has been shown, even with improvements to the Windows scheduler.
 
In the absence of truly parallel threads (the over-whelming case in the majority of games) the Windows scheduler will load balance across all available cores --- games, apps and background tasks.

The problem is that within Windows [and really, all modern desktop OS'], its impossible to make truly parrallel threads, because they all touch the OS kernal. And because [especially in windows] theres only ONE instance of all system DLL's, you quickly realize the OS itself is the primary problem: Windows is NOT a good OS for doing work in parrallel. [Frankly, I think we need to go back to statically linking everything; DLL's were a memory hack, and have caused more problems then their benifits justify]

Likewise, threading is easy; the launcher for Dragon Age uses 22 of them. Getting them to work on multiple CPU's is harder, as you instantly have to worry about syncronisation, which itself carries a performance penalty. Plus, currently, we thread WRONG because of incorrect thinking on threading.

Remember when we got the first quad cores? People were saying: "We can do physics on one core, AI on another, etc", which is the WRONG away to thread. For instance, if I have 22 AI's to worry about, why in the hell would I do that in one thread. AI's are independent of eachother [or should be...], and thus, each instance of an AI should be its own unique thread, to make them as parrallel as possible.

As such: 22 AI's should equate to 22 seperate threads. As each AI should be independent of the next, not only should the Windows scheduler be smart enough to use the thread on the core with the least amount of work, you should also be able to NOT have to worry about syncronisation, saving even more resources.

EDIT

Its also important to understand how the Windows Scheduler works. Windows is basically a priority based OS: The thread with the highest priority will ALWAYS run. Because of this, its impossible to know exactly when any given thread will be run in relation to another, making it VERY hard to get two partcular threads running in parallel at the same time.
 
Solution

joshyboy82

Distinguished
Nov 8, 2010
739
0
19,160
I know that it requires thread parrallelization (is that even a word?). Almost nothing currently made is single threaded. Then at least it is dual threaded, thus a 3 or 4 core will run it smother than a dual or single core, due to the background processes using the cores that are also running the game. This isn't rocket science.

Give your background processes a core. It doesn't matter if the core is way more than needed, because at least it is off-loaded from the CPUs that are running your game.

Take your (at least Dual threaded app) and give it ideally 2 threads. This is 3 threads right here. There isn't direct parrallelism in any multi-threaded app, but the game programming has been scheduled to offload different things to different cpus, it isn't mirrored across all cpus. i.e. one cpu is tracking floating points, while the next cpu is controlling A.I. There is no contradiction in my previous statement, I don't make mistakes like that. Read it again.
 


I'll try to put a positive spin on this ...

Over several generations, Windows has improved!

:lol:
 

joshyboy82

Distinguished
Nov 8, 2010
739
0
19,160
The part that you seemed to have gotten lost in was my sentence, "The newer the processor, the more cycles it can complete at any given time". Therefore, your statement that I made a mistake (though I didn't) and didn't take different generations into account such as the example; "n fact the i3-540 will keep up with the intel quad Q6600 in cinebench" are invalid in my argument. Thanks though. I don't say what I don't mean. Rapture tomorrow, who's coming with me!