Dual processors

R

Ricebowl

Guest
Would HL2 take advantage of a computer with dual processors? I'm just curious. I apologize if it's already been asked, or if speculative questions on hardware performance with HL2 is not something anybody cares to discuss.
 
Not sure. If I understand how dual processors help performance, it's to do with being able to put threads onto different processors in order that each gets more processing time than it otherwise would.

Sadly, game engines are pretty linear in the way they work, they go in straight lines, so the main work has to always be on one thread, and therefore one processor. However, you'd probably see an increase in performance because all the other background processes using up CPU would be shunted onto the other CPU, but it wouldn't be a significant performance increase.
 
Gabe Newell mentioned that HL2 won't take any advantage of a system with more than one processor. He said that it would "be a pain" to implement and there would be no significant performance boost.
 
He didn't say that they wouldn't do it, just that it was lower down on their list of priorities, behind a 64-bit port.
 
Yeh, putting multi-threading into a game engine is really more trouble than it is worth.

It's generally a pretty linear process.

Calculate world-state frame -> Render screen frame -> Get User I/O -> Calculate world-state frame

There's not much room for taking advantage of threading, which really requires two things to be happening at once. The only real thing i can see is maybe decoupling the generation of the world state away from the rendering, so it'd be more like...

Calculate world state -> Get I/O -> Calculate World State - Thread #1

Fetch Current world state -> Render -> Fetch - Thread #2

Each of which could run on a seperate CPU. Problem is, the two threads have the potential to interfere with each other. For example, if one thread is fetching the world state, bad, bad things happen if the other thread is writing it at the same time. This means, that the world state thread has to stop writing while the render thread is reading, or vice-versa. Meaning that any speed advantage could get cancelled out by the threads waiting for each other.

In conclusion, multi-threading is a pain they probably won't bother with.
 
And according to the survey, only a VERY small number of people have dual cpu's. So it's wasted effort that could be spend on game development rather than dragging out a few frames per second more.
 
Hmm...I have dual CPUs. Does anyone know what its good for? I've got a pretty good rig, both the processors are Pentium 3.04's. I don't really know why I bought threaded CPUs...didn't seem to increase the cost that much, so I went for it.
 
Dual CPUs are good if you want to be doing more than one thing at once, especially if they're computationally intensive. Because the way that threads get handed out CPU is that they get a set time-slot on the CPU, then when that time is up, they get interuppted and another thread gets the time. Most threads forgo their timeslots a lot of the time, and give their time up. I know from experience with multi-threaded programming that if a program uses all of its timeslot, it tends to end up using about 90% of CPU time.

Anyways, having dual processors enables the load to be spread across two processors, meaning the threads that really need more time and access to CPU can actually get it. But to get real performance gains out of it, you need to have serveral threads doing lots of work. This is why dual CPU is really good for servers, because they're often servicing lots and lots of clients at the same time.
 
Well I guess that's sorta good news, as I love multi-tasking. I'm often hosting a server on UT2004, listening to NPR online, have a few IRC windows open, AND cruising the net all at once. I've never known why my computer's performance never seemed to be bothered by this until now. Thanks!
 
Back
Top