mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Information & Answers (https://www.mersenneforum.org/forumdisplay.php?f=38)
-   -   Hyperthreading (https://www.mersenneforum.org/showthread.php?t=13311)

Primeinator 2010-04-17 19:32

Hyperthreading
 
Hello,

I have a question regarding hyperthreading on quad-core processors. What is the most efficient way to utilize this new processor for LL testing? How many workers should I run to get the most throughput without overly 'damaging' my computer's performance on other tasks? Thanks!

Kyle

lycorn 2010-04-17 20:01

The most efficient way is not using hyperthreading at all.
As to the per core assignments, the large mem bandwidth of the i7 platforms shall allow you to run 1 LL per core without a significant performance degradation. Although I never tried it, some people has reported that an even better setting is 2 LL worker windows (2 tests), each using 2 threads.

Primeinator 2010-04-17 21:14

But using 2 threads each would be using hyperthreading, would it not? How would I go about setting up these different scenarios you've listed?

CADavis 2010-04-17 22:58

I would suggest run 4 workers, each with only 1 thread, and tell let Prime95 to "run on any CPU" for each test. That way each one will always land on a "real" core.

Primeinator 2010-04-17 23:18

[QUOTE=CADavis;212205]I would suggest run 4 workers, each with only 1 thread, and tell let Prime95 to "run on any CPU" for each test. That way each one will always land on a "real" core.[/QUOTE]

Thanks!

sdbardwick 2010-04-18 00:40

[quote=CADavis;212205]I would suggest run 4 workers, each with only 1 thread, and tell let Prime95 to "run on any CPU" for each test. That way each one will always land on a "real" core.[/quote]
That will not guarantee that each thread uses a physical core. It depends on how the OS enumerates each core; I've witnessed things like core-0=physical, core-1=virtual, core-2=physical, core-3=virtual, core-4= physical, core-5= virtual, core-6=physical, core-7= virtual as well as stranger permutations. I have not seen core-0 be anything but physical.

EDIT: Above is under Windows only; can't speak to *nix. I [I]suspect[/I] that odd enumerations relate to not having the proper CPU "driver" in some Windows situations.

CADavis 2010-04-18 01:26

Well what I meant is that it will allow Windows to move the thread around to any core, and since the OS sees 8 "cores" but only 4 thread, it works in my experience.

lycorn 2010-04-18 13:10

[quote=Primeinator;212192]But using 2 threads each would be using hyperthreading, would it not? How would I go about setting up these different scenarios you've listed?[/quote]

No. You would be running 2 tests, each using 2 cores. That is different from hyperthreading, where each core is used by 2 threads.
To set this up, go to Test->Worker windows, then choose Number of worker windows to run:[B]2[/B], and CPUs to use (multithreading): [B]2[/B]. You may leave the affinity setting at "Run on any CPU".

Try this versus other suggested settings, and draw your own conclusions. Keep us posted.

retina 2010-04-18 14:01

[QUOTE=sdbardwick;212219]That will not guarantee that each thread uses a physical core. It depends on how the OS enumerates each core; I've witnessed things like core-0=physical, core-1=virtual, core-2=physical, core-3=virtual, core-4= physical, core-5= virtual, core-6=physical, core-7= virtual as well as stranger permutations. I have not seen core-0 be anything but physical.[/QUOTE]I am not convinced by the virtual/physical description you give here. Hyperthreading means that one CPU core can run two program threads "simultaneously"[sup]1[/sup]. But those two threads each run on a virtual CPU core (i.e. two virtual cores running one thread each). And two virtual cores exist on one physical CPU.

So the numbering would be closer to this:[sup]2[/sup]

OS CPU-0 : physical core 0 - virtual core 0
OS CPU-1 : physical core 0 - virtual core 1
OS CPU-2 : physical core 1 - virtual core 0
OS CPU-3 : physical core 1 - virtual core 1
OS CPU-4 : physical core 2 - virtual core 0
OS CPU-5 : physical core 2 - virtual core 1
OS CPU-6 : physical core 3 - virtual core 0
OS CPU-7 : physical core 3 - virtual core 1

I don't think you can distinguish between the two virtual cores, they are pretty much identical. So to call one a physical core and the other a virtual core is misleading. They are both virtual cores running on a single physical core.

So for the above numbering, running four threads on 1, 3, 5 & 7 is just the same as 0, 2, 4 & 6, or any other combination that only uses one of each virtual core pair.

[sup]1[/sup] Not really simultaneously of course. Each of the two virtual cores executes the instructions alternately with the other. They compete with each other to use the same resources of one physical core.

[sup]2[/sup] Of course the OS/physical/virtual numbering depends upon how the actual OS numbers things, I just followed the description in the quote above.

CADavis 2010-04-18 15:07

[QUOTE=retina;212302]
I don't think you can distinguish between the two virtual cores, they are pretty much identical. So to call one a physical core and the other a virtual core is misleading. They are both virtual cores running on a single physical core.

So for the above numbering, running four threads on 1, 3, 5 & 7 is just the same as 0, 2, 4 & 6, or any other combination that only uses one of each virtual core pair.
[/QUOTE]

yeah this is what I was getting at.

jasong 2010-04-19 04:01

I'm not an expert, but I'm pretty sure you get a pretty big increase in speed(especially in Linux with only the DCing stuff running) if each instance gets it's own physical core. And when I say gets it's own physical core, I'm talking about using a command that forces it to only use one particular core.

joblack 2010-04-19 15:31

[quote=Primeinator;212192]But using 2 threads each would be using hyperthreading, would it not? How would I go about setting up these different scenarios you've listed?[/quote]

I'm sure the processor tries to distribute the load equally to all 'real' cpus'. Tesets have shown that hyperthreading will decrease your mprime performance even if you only use the real core count.

Primeinator 2010-04-24 21:43

Using the setting "smart assignment" yields the fastest result. It is nearly 65% faster than assigning a core per CPU and is 2-3% faster than using the setting "Run on any CPU."

Rhyled 2010-05-20 15:15

Benchmarking says run 1 thread per physical core
 
[quote=lycorn;212295]No. You would be running 2 tests, each using 2 cores. That is different from hyperthreading, where each core is used by 2 threads.
To set this up, go to Test->Worker windows, then choose Number of worker windows to run:[B]2[/B], and CPUs to use (multithreading): [B]2[/B]. You may leave the affinity setting at "Run on any CPU".

Try this versus other suggested settings, and draw your own conclusions. Keep us posted.[/quote]

Being an engineer rather than a mathematician, I ran benchmarks to figure out the best configuration of cores and hyperthreading. My results indicate that the best use of a Core i7 is to turn Hyperthreading off, and use one core per prime candidate.

It's not a huge influence, however. We're talking performance drops in the 3-4% range. The following information applies to a Core i7-920 running Windows 7 64-bit OS. How far they extrapolate to other processors/systems is anyone's guess.

Hyperthreading slowed down computation by 3%. It also increased cpu power consumption by 15%. I.e., I could run with hyperthreading on to process 8 candidates simultaneously, but the total time would be 3% greater than doing 2 sets of 4 sequentially. Hyperthreading gets turned off.

Putting multiple physical cores on the same candidate sped up processing for that candidate considerably, at the expense of total calculation power for several candidates run simultaneously. Total drops are anywhere from 4% (using 2 cores/candidate) to 11% (all 4 cores) to 20+% (8 cores under hyperthreading). You can check this yourself by using the Prime95 benchmark task under the Options menu. The benchmarks are based on using 1-n cores on the same test candidate, not multiple versions.

Some tasks benefit from hyperthreading, Prime95 isn't one of them.


All times are UTC. The time now is 20:16.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.