hyperthreading and games

gurgi

Regular
Got my 9800pro yesterday, so naturally I ran 3DMark. I still have to dl the patches (there are 2 iirc).. but I have a question that will no doubt seem silly to most here. Why do I score about the same whether hyperthreading is enabled or not?

I have 2 2gHz Xeons. When hyperthreading was enabled, I had 4 cpu's listed in my task manager. I was showing 25% cpu use with hyperthreading enabled. When I disabled hyperthreading (down to 2 physical cpu's in task manager), I was showing 50% use and getting better framerates. Not a lot higher.. but in the first demo with the planes I was reaching 600-800fps in some parts. I also did better in the cpu tests.


Is 3DMark a game benchmarking tool?.. ie. Physics, AI?.. or just graphics? As a game benchmarking tool.. one cpu is probably fine, but iirc some games have had SMP support in the past (Q3) and could in the future.. I would think futurmark would benchmark that.
 
I'd imagine most games are aimed at single-CPU systems, and thus are probably not optimally multi-threaded for multiple CPUs. I'd also imagine the halving of cache for each virtual processor that occurs when you enable HT affects performance negatively.
 
Intel like to push hyperthreading as a buzzword, but to get most out of multihreading you need:

1. A OS that is programmed for multithread.

2. A game that is programmed for multithread

3. The game to perform tasks that benefit from multithreading, (for instance, if tasks A & B are running on separate processors, but task B needs the results from task A before it can run, you don't get any benefit).

When it comes to PC gaming, we're a long way from the above. Most developers don't see any benefit in doing a lot of work to code for multithreading which has a small benefit for a very small number of gamers.
 
When it comes to PC gaming, we're a long way from the above. Most developers don't see any benefit in doing a lot of work to code for multithreading which has a small benefit for a very small number of gamers.
Then they'd better well start optimizing, because the P4 has the largest part of the market AND currently only has Hyperthreaded versions in stores.
 
sonix666 said:
When it comes to PC gaming, we're a long way from the above. Most developers don't see any benefit in doing a lot of work to code for multithreading which has a small benefit for a very small number of gamers.
Then they'd better well start optimizing, because the P4 has the largest part of the market AND currently only has Hyperthreaded versions in stores.

Developers are not going to spend %50 percent (or whatever) more time doing a real multithread design if it only gets them %5 more speed for the small percentage of the market with a 3 gig hyperthreading P4.

Sure, you can tweak up routines here and there (much as you would with MMX or SIMD), but a proper multi-threading design, in *addition* to your single thread game, is not a trivial job.

Most game developers are simply going to look for speed increases in CPU's and graphics cards to give them increased performance transparently, rather than spending significant amount of time on niche optimisations with small benefits.
 
Who was it that mentioned not so long ago here that he'd rather see a multhreading capable HDD first? I'd like to congratulate the gentleman once more ;)
 
gurgi said:
So then why would my scores in 3DMark be similar? Maybe its not that cpu intensive?

Because it's AFAIK anyway programmed for only one CPU and most likely not that dependent on CPU anyway.
 
gurgi said:
Got my 9800pro yesterday, so naturally I ran 3DMark. I still have to dl the patches (there are 2 iirc).. but I have a question that will no doubt seem silly to most here. Why do I score about the same whether hyperthreading is enabled or not?

I have 2 2gHz Xeons. When hyperthreading was enabled, I had 4 cpu's listed in my task manager. I was showing 25% cpu use with hyperthreading enabled. When I disabled hyperthreading (down to 2 physical cpu's in task manager), I was showing 50% use and getting better framerates. Not a lot higher.. but in the first demo with the planes I was reaching 600-800fps in some parts. I also did better in the cpu tests.
Sounds like you are running 3D Mark 2003. 3D Mark 2003 is known to be a lot more stressful on the video card than the CPU (aside from GT1, as you noted). Try 3D Mark 2001 as it's more CPU limited on today's top-of-the-line cards.
 
Gabe Newell has commented on hyperthreading in half-life 2. He said it takes quite some time to write the code and sometimes the new code doesn't run faster or even runs slower. But it can boost performance when using the tools by 30%. On the other hand, 64 bit code will boost performance and is a lot easier than hyperthreading.

This is from a thread at halflife2.net forums:
Q: Will Half-Life 2 support Hyper-Threaded CPU's? In theory shouldn't it take alot of load of the system? Example, the first processor does all the physics, while the second does some other tasks, like AI, 3d Sound etc


A: Hyperthreaded CPUs attempt to extract thread-level parallelism, as opposed to traditional pipelined architectures which attempt to take advantage of instruction level parallelism. Hyperthreading can be somewhat unpredictable in terms of the performance impact, as you can, in some cases, run slower.

Implementing and maintaining a "deeply" multi-threaded version of Source would be a pain (i.e. multi-threading the renderer). Implementing a hacky version (e.g. having a discreet physics thread or running the client and server in different threads) is something we may do depending upon how much bandwidth we have before we ship. Right now we don't get nearly as much bang for the buck working on hyperthreading as we do on other optimizations. That may change as we run out of things to optimize.

64-bits, in contrast, is a one-time cost and is fairly simple to take advantage of. It's a huge win for tools as it not only gets more work done per instruction, but it also gets us past the current memory limitations, which are a problem for us today on tools.

Distributed computing is harder than hyperthreading but it has the potential to increase performance by a huge amount (8X on our tools) as opposed to hyperthreading (30%). All of our tools are going to a distributed approach.

So the taxonomy looks like this:

- general algorithmic optimization (general good thing to do)
- DX9 optimization (big gains, long term direction)
- 64-bits (not that hard, solves memory problem as well as performance gains)
- hyperthreading (hard initial cost, on-going code maintainence cost, limited unpredictable performance gains, benefits in multiprocessor environments as well)
- distributed computing (hardest to do, biggest potential gains, great for tools, may be great for servers, not sure how it works with clients)
 
sonix666 said:
Then they'd better well start optimizing, because the P4 has the largest part of the market AND currently only has Hyperthreaded versions in stores.
Yeah, um, I think developers have some time before HT CPUs become anywhere near standard. The cheapest HT P4 is $175--call me when it hits $50. :)
 
Bouncing Zabaglione Bros. said:
Developers are not going to spend %50 percent (or whatever) more time doing a real multithread design if it only gets them %5 more speed for the small percentage of the market with a 3 gig hyperthreading P4.

Sure, you can tweak up routines here and there (much as you would with MMX or SIMD), but a proper multi-threading design, in *addition* to your single thread game, is not a trivial job.

Most game developers are simply going to look for speed increases in CPU's and graphics cards to give them increased performance transparently, rather than spending significant amount of time on niche optimisations with small benefits.
I agree that Intel has an uphill battle getting developers to optimize for multithreading, but in some cases it can yield a large performance boost without requiring too much effort. It will depend on the game though. Also, there's no need to have a multithreaded and single threaded design. A non-hyper threaded cpu can handle multiple threads just fine.

Ailuros said:
Who was it that mentioned not so long ago here that he'd rather see a multhreading capable HDD first? I'd like to congratulate the gentleman once more ;)
While it's not quite a multithreaded hard drive serial ATA 2 should be much better in this regard because it will support command queueing.

I was trying to think how you might be able to use a software solution and two hard drives to effectively get a multithreaded hard drive, but I couldn't figure out how to make it work. My basic idea started with thinking of raid mirroring and figuring out how to selectively turn it off periodically and then update the mirror later. I'm sure it could be done, but the overhead might not be worth it. Maybe just a crazy idea ...
 
gurgi said:
I have 2 2gHz Xeons. When hyperthreading was enabled, I had 4 cpu's listed in my task manager. I was showing 25% cpu use with hyperthreading enabled. When I disabled hyperthreading (down to 2 physical cpu's in task manager), I was showing 50% use and getting better framerates. Not a lot higher.. but in the first demo with the planes I was reaching 600-800fps in some parts. I also did better in the cpu tests.

Is 3DMark a game benchmarking tool?.. ie. Physics, AI?.. or just graphics? As a game benchmarking tool.. one cpu is probably fine, but iirc some games have had SMP support in the past (Q3) and could in the future.. I would think futurmark would benchmark that.
Even if 3dmark was optimized for hyperthreading you probably wouldn't see an advantage because you already have dual cpus. It would have to run 4 threads to stress your entire system. Yes, Quake3 had SMP support, but it didn't help performance at all on my computer. Dual PIII 733. Dungeon Siege did see an improvement, but I believe that's only because my single cpu is slow. I don't think dual 2 GHz cpus would see much benefit.
 
I think you misunderstood me. I didn't expect 3DMark2k3 to necessarily support both my cpu's. It's that when I had hyperthreading enabled 3DMark was only using half of one of my cpus.. vs hyperthreading disabled where it was using one whole cpu. I didnt see much change in 3DMark score. That is where my confusion lies.

I was going to run both enabled and disabled to post results in this thread.. but I've been too bussy downloading demos for my new videocard. My apologies. :oops:
 
I dont think it is possible that 3dMark03 was using half on one CPU with HT enabled and getting just about the same score. It may seem that way from the information you have at hand.
 
It's that when I had hyperthreading enabled 3DMark was only using half of one of my cpus

Its how system reports the usage thats probably making you think that way. It seems that dues to application/os combination the work is not assigned to more than 1 CPU.

Normally systems report the CPU usage depending on number of cpu ie Usage/CPU. So when you enable HT on your dual CPU system the OS sees 4 processors and as only 1 cpu can be utililized by the application to 100 % so you see 100/4 = 25% usage.
Now when you disable the HT and the system sees 2 CPUs the application still uses 100% of one CPU and system reports 100/2 = 50% cpu.

In both cases the work done by application is almost same but the way CPU usage is reported makes it appear that under HT less cpu is being utilized.
 
Pete said:
sonix666 said:
Then they'd better well start optimizing, because the P4 has the largest part of the market AND currently only has Hyperthreaded versions in stores.
Yeah, um, I think developers have some time before HT CPUs become anywhere near standard. The cheapest HT P4 is $175--call me when it hits $50. :)
That might be sooner than you think. First, ALL new P4 have HT, so P4 without HT will soon be phased out. Of course, the cheapest P4 you can usually get new is around $150, beyond that you have to get Celerons. However, there is absolutely nothing preventing intel from switching on HT in Celerons tomorrow (since apparently all cpus include that functionality already). Though I'm not too sure HT would work as expected, given the crappy 2-way associative 128KB L2 cache it could easily be a net loss.
 
mczak said:
That might be sooner than you think. First, ALL new P4 have HT, so P4 without HT will soon be phased out. Of course, the cheapest P4 you can usually get new is around $150, beyond that you have to get Celerons. However, there is absolutely nothing preventing intel from switching on HT in Celerons tomorrow (since apparently all cpus include that functionality already). Though I'm not too sure HT would work as expected, given the crappy 2-way associative 128KB L2 cache it could easily be a net loss.

No one is going to be "phasing out" the installed user base of non-HT systems that are already out there. You are talking 1-2 years before even the heavy gamers have all updated their systems, and AMD is particularly popular with the gaming market.

Making full use of HT means a good ground-up design of a game for multhreading - something that just doesn't make a good outlay for the small potential market.

As I said above, I'm sure you can hack HT into specific routines here and there, but that doesn't make a game properly multithreaded.
 
HT in celerons should be way to slow since they only have 128 KB L2 Cache

(but since noone has a clue, they will buy those too)
 
Bouncing Zabaglione Bros. said:
No one is going to be "phasing out" the installed user base of non-HT systems that are already out there. You are talking 1-2 years before even the heavy gamers have all updated their systems, and AMD is particularly popular with the gaming market.

Making full use of HT means a good ground-up design of a game for multhreading - something that just doesn't make a good outlay for the small potential market.

As I said above, I'm sure you can hack HT into specific routines here and there, but that doesn't make a game properly multithreaded.
You are of course correct that the installed systems today don't have HT. However, if you're talking about developing new games (not almost finished ones like DoomIII or HL2) then you are also talking about 2 years (?). So, if you develop a new game now, then HT is something you might at least consider (though apparently, Gabe Nevell doesn't think that the potential gains are worth the increased development efforts).
 
Back
Top