I have read at a lot of places that i5 does not have hyperthreading and that i7 is i5 + hyperthreading. If it is true, how come many i5 processors have more threads than cores(4 cores and 8 threads) as per intel website.?
If i5 has no hyperthreading why it has more threads than cores
cpuhyper-threadingintel-core-i5multi-core
Related Solutions
Why is there no option inthe BIOS?
I assume the reason why Dell and friends often do not add an option to disable this is because it rarely is a good idea. On average it will make your computer slower (or from a different point of view, it will make competitors computers relative faster).
Having said,that, lets look at some imaginary examples:
What does HT do?
1 core, no hyper-threading
- 1 CPU bound process is running, and can run and maximum speed. Lets call this speed 1, or 100%
- 2 CPU bound processes running. The CPU will have to switch between both. Effective speed on both processes is roughly halved. (The sum of both speeds is still equal to the first example.)
- 3 CPU bound processes running. The CPU will have to switch between all three. Effective speed on both processes is roughly a a third. (The sum of both speeds is still the same ( 3 x 0.33 = 1 ).
2 cores, no hyper-threading
- 1 CPU bound process *0 is running, and can run and maximum speed for that core. (speed 100%) (The other core is idle).
- 2 CPU bound processes running. Both can run at maximum speed for their core. (speed 200%)
- 3 CPU bound processes running. Usually you get 3 tasks running at about 2/3rd efficiency. (The sum of the speeds is still '2'. Roughly 2 because you loose a bit due to extra overhead and cache misses). (speed 200%, or maybe 190%)
Now cores with hyper-threading . These act as two cores, but not two complete cores. What Intel defines as hyper-threading has changed a bit over time, but usually it comes down to this. A CPU fetches data from memory and computes. If it does not need the memory bus then a second part of the CPU can do limited work. Since not all hardware is duplicated you do not get two full cores. However with limited extra hardware (10%?) you gain on average 30% speed. *1
1 core, with - 1 CPU bound process is running, and can run and maximum speed. (100%) - 2 CPU bound processes running. The CPU will have to switch between both. However it has some extra hardware. Net speed will be about 30% faster (say speed 133% for a single core)
Etc.
So much for the introduction to HT.
Are these fictional %'s real?
No. First of all you will loose efficiency due to overhead. (10 tasks on one CPU will not run slower than just one task with no context switches and all of the cache for its data).
Secondly I totally ignored turbo boost since that would complicate the explanation.
What did my friend possibly mean to say?
Lets look at your 4 core 8 treads CPU like this:
Core 1, CPU 1 (real)
Core 1, CPU 2 (with HT)
Core 2, CPU 3 (real)
Core 2, CPU 4 (with HT)
Core 3, CPU 5 (real)
Core 3, CPU 6 (with HT)
Core 4, CPU 7 (real)
Core 4, CPU 8 (with HT)
If I run two tasks I do not want both of them on CPU1 and CPU2 (since they share an actual core) and the nett result is near half of the possible speed. This might be what your friend meant.
While true I think that you do not need to worry. The windows scheduler is smart enough to allocate processes first to CPUs 1,3,5,7 and only then to 2,4,6,8.
*0 A CPU bound process is a process which is limited by the CPU. If a process is waiting for diskIO and the CPU is idle then you get totally different results.
*1 Please take those numbers with a grain of salt. They are not precise. They will vary per CPU generation and even per CPU model. They will vary per program. And what Intel calls hyper-threading has changed since early CPU generations. However they do give a rough idea.
One core, with or without hyper-threading, can simulate any number of virtual cores, simply by timeslicing. However, this produces all kinds of problems because the operating systems expect that code running at the same time will actually interleave. Overprovisioning can lead to performance drops so great the system can appear frozen with operations literally taking thousands of times longer than they should.
Best Answer
It depends a lot on the processor generation and engineering choices for the processor.
From experience each generation has broadly followed:
This is a bit anecdotal, but to say that no i5s have hyperthreading is provably false. It is just that the i5 is the space between the low end and the high end. You can see the above mix particularly in the 5th generation processors.
The line between i3 and i5 has also shifted over the years and I am sure there have been i3s with hyperthreading in some generations.
What I mentioned above should be taken with a grain of salt though, as there are even i7 processors which might lack hyperthreading and ones which might have low core counts, particularly in the mobile markets.
If you want to find out whether any given processor has hyperthreading then you should check https://ark.intel.com/ for the processor.
Any processor which states a thread count higher than the core count has hyperthreading.