# Threads vs "Hyperthreading" ??

Kiers

Distinguished
Nov 25, 2008
27
0
18,530
Perusing ark.intel.com while shopping for an old cpu, came across instances like this:

CPU: G630
Cores: 2
Threads: 2
Hyperthreading: NO.

Question: what in #$$% do they mean? isn't that contradictory?

Is hyperthreading different from having multiple threads (ie 2) per core?
 
Solution
When there are 2 cores/2 threads, that means there is 1 thread per 1 core. Then, you look at an i3 that has Hyperthreading technologies, It has 2 cores/ 4 threads. which means that there is 2 threads per 1 core. It isn't contradictory. HT is multiple threads in a single core.
hyperthreading is different than having more than one thread. Hyperthreading uses one core to process two threads. Whenever there is free time on the cpu core, hyperthreading will push another, separate thread to be processed. This generally increases performance by about 20% vs no hyperthreading.
 

Kiers

Distinguished
Nov 25, 2008
27
0
18,530


So what is the point of having the spec say "# threads: 2" and yet NO hyperthreading??

Unless....there is a difference between what is pushing the new threads: cpu itself, or OS am i correct?
 

griptwister

Distinguished
Oct 7, 2012
1,437
0
19,460
When there are 2 cores/2 threads, that means there is 1 thread per 1 core. Then, you look at an i3 that has Hyperthreading technologies, It has 2 cores/ 4 threads. which means that there is 2 threads per 1 core. It isn't contradictory. HT is multiple threads in a single core.
 
Solution

Kiers

Distinguished
Nov 25, 2008
27
0
18,530


OK! ark.intel.com page for G630 was confusing me!
http://ark.intel.com/products/53483/Intel-Pentium-Processor-G630-3M-Cache-2_70-GHz

There, under definition of "thread" intel says:
"A Thread, or thread of execution, is a software term for the basic ordered sequence of instructions that can be passed through or processed by a single CPU core"

and under definition of hyperthreading (which is labelled "NO" for this CPU) is,
"Intel® Hyper-Threading Technology (Intel® HT Technology) delivers two processing threads per physical core. Highly threaded applications can get more work done in parallel, completing tasks sooner."

Are you saying "2" threads is 2 threads in TOTAL?
The definition quoted under "threads" is PER CORE.
 

DryCreamer

Distinguished
Jan 18, 2012
464
0
18,810


Kiers,

Hyperthreading is a technology that Intel puts on its i3 and i7 CPU processors.

The Pentium G630 and the i5 Quad core DO NOT use Hyperthreading, that's why it says 'no' when you look it up.

They are technically 'real' threads but they are not cores because they don't have access to additional resources like a 'true' CPU core. Its basically like each core has a 3rd hand to do some extra stuff.

Hyperthreading is available on i3 and i7 desktop CPUs, as well as most Xeon server CPUs and mobile i3, i5, and i7 CPUs.

They show up as a 'core' in Windows or other operating systems, so an i3 will 'look' like a 4 core, but its really 4 threads, 2 cores with 2 additional threads from the Hyperthreading tech in the CPU.

Dry

Dry
 

DryCreamer

Distinguished
Jan 18, 2012
464
0
18,810
its easy to mistake a core for a thread, but their are some fundamental differences between a core and a thread. someone else might be able to explain it better than me. but it has to do with other things like resources in the CPU, cache, and x86 integer execution units (I might have made that last part up)

If I was going to explain it, I would explain it like this:

A HYPER THREAD in Intel has the ability to 'do stuff' but it can't do as much as a CORE, its more like a helper.

Dry
 
Intel Hyperthreading is Intel's implementation of SMT. SMT allows for a single core to execute more then one thread at a time. Hyperthreading is very light on implementation, being little more then an extra register stack (the bare minimum you need for a CPU); the other CPU resources (ALU, etc) are not duplicated, making the benefit of HTT minimal in comparison to other SMT implementations.

The reason the G630 can run two threads at a time is because it is a dual core processor, having two full separate cores on the CPU die.

By contrast, and i3 CPU, with hyperthreading, would be listed as a two core, four thread processor, due to HTT allowing two threads to run per core.
 


Each core handles 1 thread at a time. The G630 is a dual core CPU. Since it has 2 cores, the CPU can handle 2 thread at any given time.




HT is a technology, or perhaps "methodology" is a better term, to get more performance out of their CPUs. Each core is not always processing something every nano-second. When it is not processing anything the core simply sit there and waits for the next instruction to process. HT takes advantage of this. When the core is waiting it is able to process something else, thus technically it can process 2 threads.


Think of HT as a "bad boss". You are one of the "cores" (Core #1) in the office (the CPU), and you just got off your lazy ass to get water from the water cooler with the intent on going back to your cage to continue working. You meet up with your co-worker (Core #2) who had the same idea, but instead of just going back to your cages, the two of you decided to chat a little bit. Not too long the boss "HT" walks by and notices that both of you are not doing any work. Being such a great boss "HT" decides to give you more work to do on top of the work you are currently doing. Fearing that "HT" might give even more work to do the two of you quickly go back to your cages so that you can finish both assignments. Congratulations Core #1, you are now Hyper Threaded!!!