Questions on hyper-threading and cores

kaio37k

Distinguished
Apr 3, 2013
239
0
18,680
I would like to know if what I understand about CPU's and hyper-threading is correct.
Sorry if they are noob questions.
Thanks

PLEASE ANSWER ALL QUESTIONS IN MOST DETAIL POSSIBLE!

1. What is the difference between a Core and a thread?

2. A core and a thread are *essentially* the same thing only ones kind of a "Pseudo-core"?

3. If hyper-threaded CPU's are better for multi-tasking then does that split the power from the cores? If so would that make a CPU with only four cores stronger for low-density tasks like a single game running at a time? (essentially higher concentration power for the individual cores)

4. When people describe "nearly identical" CPU's as being very different in performance due to architecture, what does that mean? What is this architecture?

5. Theoretically speaking, If I have a Dual-core processor running at 1GHz, my CPU total power would therefore be 2GHz? And if I added 4 cores to this then it would be 4GHz toal power?

6. If a CPU is not hyper-threaded but is dual core, does that mean that it has 2 threads?

7. Why is it that gaming and computer technology is as far as it is but games are jsut now starting to pick up on all four core of a quad?

And finally,

8. Is there such thing as just threading? as oppose to "Hyper-threading".
 
Solution

1. A core is a processor. Dual core = 2 processors side by side. Quad = 4 processors, etc. A thread is a "chunk" of program code that can be run in parallel to other threads (making use of multiple cores).


2. See 1. A core is hardware, a thread is software designed to make use of multiple cores.

ryan27968

Honorable
Apr 25, 2013
834
0
11,360
a core is when a cpu is essentially split into 2 or more cores, to allow multiple processes to run at the same time. hyperthreading is technology that allows two "threads"(or processes) to run on 1 core, making a 2 core processor into a 4 core. a thread is one process (or calculation). hyperthreading and dual cores splits the power between all the cores. however, afaik, if only one thread is being used, the first core gets all the speed, as it does not need to be split. a dual core processor at 2ghz will have 1ghz per core afaik. architecture is sort of the specific "style" that processors work. a arm processor is designed to work in a low power, low heat "style" while also giving less performance. intel and amd use compatible "styles" but they are not exactly the same. intel processors will run faster, cooler, and more efficiently, while amd processors will run hotter and less efficiently, but they are cheaper. hope this helps.
 

kaio37k

Distinguished
Apr 3, 2013
239
0
18,680


So, if a 1 core CPU has 2 threads its a double threaded single core CPU?
and do all CPU's have atleast 1 thread?
 

ryan27968

Honorable
Apr 25, 2013
834
0
11,360


yes. is a 1 core cpu is running 2 threads, it is using hyperthreading.
all cpus can run 1 thread.
 

BSim500

Honorable
Apr 6, 2013
269
0
10,960

1. A core is a processor. Dual core = 2 processors side by side. Quad = 4 processors, etc. A thread is a "chunk" of program code that can be run in parallel to other threads (making use of multiple cores).


2. See 1. A core is hardware, a thread is software designed to make use of multiple cores.


3. Hyper-threading works by trying to fill in the small "gaps" that occur in cores when processing code. Not all code loads each core 100%, and hyper-threading is designed to make use of that by giving a 10-20% boost (depends on code & game though).


4. Not sure which ones you mean? Two CPU's both at 3GHz can perform very differently. Eg, Intel's are much more efficient per GHz than AMD's.


5. Theoretically, yes. In practise, adding cores does not scale anywhere near 100%. Some software does scale well, eg, video editing will run almost twice as fast on a quad than a dual. And yes, you could say a 1Ghz quad will give similar performance to a 4GHz single core for video encoding. But in much general usage & games, the scaling is less than 100%. Going from 1 to 2 cores gives a big 80% boost. Going from 2 to 4 may give only a 5-50% boost (depends on game). Going from 4 to 8 may give 1-20% boost, etc.


6. Yes. Like the Intel Pentium's have 2 cores that can run 2 threads. i3's are Hyper-Threaded and have 2 cores that can run 4 threads. i5's have 4 cores but no HT and can run 4 threads. And i7's have 4 cores and are Hyper-Threaded and can run 8 threads


7. Partly because it's very difficult to write really efficient multi-threaded code (especially for games) and partly because consoles have stagnated the past few years (many modern games are written for consoles and ported to PC's).


8. Threading is software - writing code chunks that can be run in parallel (not all can, eg, one code chunk may have to wait for another to complete because it relies on a calculation that has to finish before another starts). Hyper-threading is a hardware technology on intel chips that allows cores to run 2 threads at once.

Edit: Just to add - Here's an example of threadable code:-
1. A = 5+2
2. B = 7x2

These can be easily threaded - one core will run A and calculate the answer A=7 at the same time as another core can run B and calculate the answer B=14.

But here's an example of non-threadable code:-
1. A = B+2
2. B = 7x2

These can't be easily threaded - because A needs B to finish its calculation before it can start otherwise it doesn't know what "B" is for its own calculation. One core will run B and calculate the answer B=14, whilst the other core has to wait for B to finish before it can calculate A=16 (14+2). This isn't multi-threaded because there's only 1 calculation being done at once. Computers do millions of these per second, and this is a simple example of why it's impossible for many games / general apps to scale anywhere near 100% (ie, doubling cores doesn't doesn't performance, it may only add 10-50%).
 
Solution

kaio37k

Distinguished
Apr 3, 2013
239
0
18,680


wow that really cleared thing up, thanks! One last question, If there were two CPU's with identical specs EXCEPT one had hyper-threading,
Would they both perform equally in a game?
 

ryan27968

Honorable
Apr 25, 2013
834
0
11,360


most likely, yes.
 

BSim500

Honorable
Apr 6, 2013
269
0
10,960

A good example of that is a Pentium vs an i3 or an i5 vs an i7 both running at the same clock speed. If the game wasn't heavily multi-threaded, then they would probably perform the same. This is true especially of older games which don't run faster.

Here's some HT vs non-HT benchmarks:-
http://www.techbuyersguru.com/CPUgaming.php

Some games are faster, others the same. It's hard to say because it genuinely is dependant on the game.
 

ryan27968

Honorable
Apr 25, 2013
834
0
11,360
this is the reason a intel will have better performance than an amd with ecactly the same specs, or even eith the amd having better specs. some amd processors with 3.2 ghz and 8 cores are whipped by intel 3ghz 4 core processors. it comes down to architecture and resources.
 

Luke Cool

Honorable
Nov 22, 2013
9
1
10,510
1. What is the difference between a Core and a thread?

In all CPUs, each core has its own execution engine. The execution engine controls the L"x" cache, and thread traffic (including returns and request).
A thread is an execution sequence (programing code).

2. A core and a thread are *essentially* the same thing only ones kind of a "Pseudo-core"?

No, A processor "thread" is an execution sequence active in a processor core.

3. If hyper-threaded CPU's are better for multi-tasking then does that split the power from the cores? If so would that make a CPU with only four cores stronger for low-density tasks like a single game running at a time? (essentially higher concentration power for the individual cores)

In a hyper-threaded core, the execution engine shares resources, and controls thread traffic independently for two logical processors. Hyper-threading has a great deal in common with a multi core processor; its usefulness depends on the operating system and the program that will use them. Most programs are simple and are only written to use one core. But some programs and games are very complex and demanding, and are written to fully utilize hyper-threading and/or any number of cores they have excess to. Windows 7 and 8 are very hyper-threading and multi core processor friendly, Vista XP 2000 and 98 support and manage this extra resource poorly. For Windows 7 and 8, I recommend the use of at least a 2 core processor. These operating systems manage 2 cores well; they free up one core by running background programs in the second core. If you have Windows 7 and 8 and run mostly simple programs, you will see little to no difference between a 2 core 3.2 gigahertz CPU, and an 8 core 3.2 gigahertz CPU. If you are a gamer or power user, you most likely will make good use of the extra cores/processors. The simple answer to your question is; Generally, Hyper-threaded and multi core processors do improve performance; but the degree of benefit depends on how well your programs and the operating system are written to efficiently manage that specific extra resource.

4. When people describe "nearly identical" CPU's as being very different in performance due to architecture, what does that mean? What is this architecture?

The processor is made up of billions of transistors, these form gates counters, an execution engine, cache, and other parts. The architecture is the way these parts are configured to work with each other. The more expensive processors have a more highly refined architecture.

5. Theoretically speaking, If I have a Dual-core processor running at 1GHz, my CPU total power would therefore be 2GHz? And if I added 4 cores to this then it would be 4GHz toal power?

If you have five cars moving down the road at 50mph, you will be able to carry more passengers if you want to, but you can still only carry them at 50mph. That is not the same as a 250mph car. Also see the answer for question 3.

6. If a CPU is not hyper-threaded but is dual core, does that mean that it has 2 threads?

A hyper-threaded or dual core CPU each can simultaneously run two threads, but they are not the same. Each has its own unique set of advantages.
***A hyper-threaded processor's cores each contain an execution engine that manages, and shares its resources between, two logical processors. On a hyper-threaded core, you have two thread paths through this core, each path is able to use only about half of the cores processing power. With hyper-threading inabled, a 30% performance improvement is possible, but more than 10% is likely.
***A regular processor's cores each contain an execution engine that manages a single physical processor. On a dual core processor, you have one thread path through each core, each path is able to use 100% of the cores processing power. With use a a second core, an 80% performance improvement is possible, but more than 40% is likely.


7. Why is it that gaming and computer technology is as far as it is but games are jsut now starting to pick up on all four core of a quad?

The domino effect.
Step 1- Invent hyper-threading.
Step 2- Create the hardware
Step 3- Develop an Operating System that knows what it is and how to use it.
Step 4- Programmers must develop the code and write progams and games that know what the newer technology is and how to best use it.
The future looks good for Hyper-threaded and multi core processors, more and more progams and games are being written to efficiently manage those extra resources. But these technologies are continuously improving and evolving, causing a return to step 1 (Reinvent hyper-threading).

And finally,

8. Is there such thing as just threading? as oppose to "Hyper-threading".

Yes, threading is used in a single core containing a single logical processor.
Hyper-threading is used in a single core containing two logical processors.