![]() |
Hyperthreading and CPU utilization.
I'm sure this has been discussed before, but I don't know where.
I just discovered that my instance of Prime95 is operating at only 50% utilization. Is there a way to change this? It's a hyperthreaded CPU, so I don't know if it's effectively the same as a dual-proc, or what? Thanks, Drew |
Run two copies
There's no way that I can find to goose Windows to give you the whole CPU. That's because of Intel's shadow registers (for hyperthreading).
You can run a second copy of Prime95. But ... I just ran a little test consisting of generating 10^8 random dfloats. The test program alone takes 13 seconds. With one copy of Prime95 running, the test program takes 19 seconds. With two copies of Prime95 running, the test program takes 19 seconds. So, it's likely that two copies of Prime95 crank along about 1.5X one copy, even though you have "fully" utilized the CPU. So much for hyperthreading. - rll |
[QUOTE=scanrik]There's no way that I can find to goose Windows to give you the whole CPU. That's because of Intel's shadow registers (for hyperthreading).
You can run a second copy of Prime95. But ... I just ran a little test consisting of generating 10^8 random dfloats. The test program alone takes 13 seconds. With one copy of Prime95 running, the test program takes 19 seconds. With two copies of Prime95 running, the test program takes 19 seconds. So, it's likely that two copies of Prime95 crank along about 1.5X one copy, even though you have "fully" utilized the CPU. So much for hyperthreading. - rll[/QUOTE] Hmmm...I just turned HT off, and the iteration times dropped from .066 to .064 seconds. Hardly a difference, but I had never seen it go as low as .064 before. Drew |
HT is not useful in prime95 because the program uses only 1 cpu / logical unit. Its best to test weather your getting more work done running 2 copies of prime95 if you arnt then you should just turn off ht in the bios.
|
[QUOTE=moo]HT is not useful in prime95 because the program uses only 1 cpu / logical unit. Its best to test weather your getting more work done running 2 copies of prime95 if you arnt then you should just turn off ht in the bios.[/QUOTE]
It appears to run slower while I'm using the PC, though. I'm starting to think it's a wash whether I leave HT on or off. Drew |
[QUOTE=drew]I'm sure this has been discussed before, but I don't know where.[/quote]Usually in the "Information & Answers" or "Software" subforums.
After a quick review of titles and threads, I can't find an earlier instance of this topic in "Hardware", so you're probably the first to post it here. It seems like a reasonable choice to me -- I was surprised not to find an earlier "50% utilization" thread here. [quote]I just discovered that my instance of Prime95 is operating at only 50% utilization. Is there a way to change this? It's a hyperthreaded CPU, so I don't know if it's effectively the same as a dual-proc, or what?[/QUOTE]Others have responded to you above, so I'll just add a few clarifying (I hope) statements. (Maybe you already know this stuff.) A hyperthreaded CPU is [u]not[/u] effectively the same as a dual-processor CPU. An HT CPU has just 1 real CPU, but pretends that it has another, virtual CPU that can execute a second instruction stream. It has a few extra real components (extra registers) beyond what a non-HT CPU has, but does not duplicate most components. The HT CPU can rapidly switch back and forth between two instruction streams, using separate components (e.g., ALU for integer arithmetic, FPU for floating-point) to overlap [i]some[/i] instructions of the separate streams in the only real CPU. The HT CPU also fools monitor software into thinking that there are two CPUs, so when the one real CPU is really 100% utilized by a single instruction stream, the monitor is tricked into telling you that your system is only 50% loaded. But an HT CPU can't fool either Mother Nature or Father Mersenne; an L-L test requires [i]real[/i] processor cycles; virtual cycles do it no good. :-) |
[QUOTE=drew]Hmmm...I just turned HT off, and the iteration times dropped from .066 to .064 seconds. Hardly a difference, but I had never seen it go as low as .064 before.
Drew[/QUOTE] Update. I tried a second instance of Prime95, and now when the computer is otherwise idle, they're running at .119 and .120 seconds per iteration, which totals .0595 seconds per iteration. A clear improvement over one instance at a time. Drew |
Some time ago I carried out a few experiments on my 3[i][b]E[/b][/i]GHz P4 Prescott running Prime95 with priority 10 on a 10,000,000 digit candidate and discovered the following:
With HT turned ON and no affinity set, per iteration time of 0.077; With HT turned ON and affinity set to 0, per iteration time of 0.074; With HT turned ON and affinity set to 1, per iteration time of 0.075; (These all show an overall CPU usage of <51%; 50% is used by Prime95, <1% is used by the system, anti-virus, firewall, etc.) With HT turned OFF the per iteration time INCREASES to (I've forgotten! I know it nearly doubles. I'll check it again and come back shortly and fill this in. What an idiot!) CPU usage is at 100%, nearly all used by Prime95. Because of these results I have HT turned ON and Prime95 affinity set to 0. I don't understand these results: Why, with HT turned ON, is processor 0 faster than processor 1? Why, with HT turned OFF, does the per iteration time INCREASE? |
(I thought I'd be able to EDIT my previous post. Never mind.)
What a load of rubbish [i]that[/i] was. The actual per iteration time with HT turned OFF was 0.079. BUT ... With priority set to 10 it slowed everything else down beyond anything reasonable. For example, it took over two minutes to load a simple performance monitor that usually takes two seconds. In conclusion, my experience dictates that if you have an HT enabled processor you should turn HT ON. |
[QUOTE=MS63](I thought I'd be able to EDIT my previous post. Never mind.)
What a load of rubbish [i]that[/i] was. The actual per iteration time with HT turned OFF was 0.079. BUT ... With priority set to 10 it slowed everything else down beyond anything reasonable. For example, it took over two minutes to load a simple performance monitor that usually takes two seconds. In conclusion, my experience dictates that if you have an HT enabled processor you should turn HT ON.[/QUOTE] From my experience, it's even better to run two instances of Prime95 with distinct affinity values 0 and 1. On my tests, I'm getting .119 and .120 iterations/second, which totals .0597 iterations/second, whereas with one instance I was getting about .064 iterations/second. I actually had better results when idle with HT off, but it took a much bigger hit when I was using the PC. Drew |
From VERY unreliable memory my per iteration time INCREASED when I ran two instances of Prime95, not decreased as you have experienced.
I will experiment with this again after Christmas: I have a 10,000,000 digit prime candidate due to complete LL testing on Christmas day. Incidentally, if one runs two instances of Prime95, do they each require their own User/Computer ID? I'm guessing they do. |
| All times are UTC. The time now is 11:26. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.