Hyperthreading affect non multithreaded performance?

anxiousinfusion

Distinguished
Jul 1, 2011
1,035
0
19,360
It sounds like hyperthreading essentially 'halves' a core into two virtual cores. This will make a ~3.0 ghz physical core seem like a ~1.5 ghz virtual core. But if I am running an application that doesn't utilize hyperthreading, does this mean it will only have half the power to work with? Is hyperthreading a feature that is enabled and disabled?

I'm just trying to weight the i5 against the i7...
 
Solution
To answer your question directly - yes, you can disable hyper-threading in the BIOS (on all the motherboards I've used, at least).

However, there's virtually no point in doing so. It doesn't chew up half the core. It allows the core to keep busier, by allowing it to deal with two threads instead of one. It uses execution units that are not otherwise occupied.

Feel free to benchmark the CPU with hyperthreading on and off - I'd be curious to see the results. On a single-threaded workload I suspect it will make exactly zero difference. There are four cores in the i7 CPU, so there are already enough spare threads to handle the background load of the operating system, so the single-threaded load will get the undivided attention of one core...
You are doing the core math in reverse, never seen it done that way but its still equally wrong. In the same way that 4 cores @ 3GHz each is not 1 core at 12GHz, a 3GHz hyper threaded core is not 2 cores at 1.5GHz.

hyperthreading_image1.gif

That image shows it pretty well. In the event of all programs there are places where data dependencies show up and you have to wait for A*B=C to finish before you can do A+C, hyper threading slips instructions from another thread in during those pauses so that each portion of the CPU spends less time sitting there doing nothing, if there is only one thread running on the core it will behave exactly as if hyperthreading was disabled as there is nothing to interleave into the spaces. In the event that two threads are happening on a core, the one in the primary logical core gets priority and the one in the second core fills in the spaces when it can, this slows down the second thread quite a bit but your overall throughput is increased significantly even though the latency of thread 2 has increased.
 

compulsivebuilder

Distinguished
Jun 10, 2011
578
1
19,160
To answer your question directly - yes, you can disable hyper-threading in the BIOS (on all the motherboards I've used, at least).

However, there's virtually no point in doing so. It doesn't chew up half the core. It allows the core to keep busier, by allowing it to deal with two threads instead of one. It uses execution units that are not otherwise occupied.

Feel free to benchmark the CPU with hyperthreading on and off - I'd be curious to see the results. On a single-threaded workload I suspect it will make exactly zero difference. There are four cores in the i7 CPU, so there are already enough spare threads to handle the background load of the operating system, so the single-threaded load will get the undivided attention of one core whether you have hyperthreading on or off.

Cute diagram, hunter315 - I hadn't seen that one before.
 
Solution