Non-Hypertheading Processor for Intel

galaxymark1994

Honorable
Apr 22, 2016
83
3
10,545
Hi! I've read some article about the hyperthreading processor of intel , but my main question is , what's the purpose of those threads on a processor that does not support HT feature (example G4400 2cores 2 threads). it says "Intel® Hyper-Threading Technology (Intel® HT Technology) uses processor resources more efficiently, enabling multiple threads to run on each core" , so what's the purpose of the 2 threads on the Pentium G4400 or i5-6500's 4threads? thanks
 
Solution
Let's just put hyperthreading and "threads" aside for a second...

So you're aware that all modern CPUs have multiple "cores". The CPU core is the bit that does the actual work. You feed it work to do, it completes that work and returns the result/answer. Having more cores allows a CPU to work on more things at once. So a dual core CPU can be processing two separate workloads simultaneously, while a quad core CPU can work on four workloads. Theoretically then, the quad core CPU can finish the work in half the time it would take a dual core CPU.

The problem is that for a multi-core CPU to be effective, they need workloads the can be processed independently of one-another and, many workloads simply cannot easily be split up into multiple...
Let's just put hyperthreading and "threads" aside for a second...

So you're aware that all modern CPUs have multiple "cores". The CPU core is the bit that does the actual work. You feed it work to do, it completes that work and returns the result/answer. Having more cores allows a CPU to work on more things at once. So a dual core CPU can be processing two separate workloads simultaneously, while a quad core CPU can work on four workloads. Theoretically then, the quad core CPU can finish the work in half the time it would take a dual core CPU.

The problem is that for a multi-core CPU to be effective, they need workloads the can be processed independently of one-another and, many workloads simply cannot easily be split up into multiple smaller workloads. Often, the work a CPU is processing is using data that was produced by previous results from that workload, and the results produced will, in turn, be used in the next stage of the work. In that case extra cores are useless. There's no work for them to do because all the work has to be processed in a linear fashion, meaning it must be done on a single core. This is what we would call a "single-threaded" workload.
Also, it's usually more complicated for software developers to code multi-threaded programs. Developer time = development money, so sometimes that optimisation work doesn't get done.
Some workloads on the other hand are easily multi-threaded. Video transcoding, where a video file is converted into a different format, is an example of this. Because the entire video file is literally sitting there ready to process, it's straightforward to split the file up into pieces, use however many cores you have on hand to process them, and then put them back into the correct order again for the final file. A good video encoder will scale almost perfectly with extra cores.

So that's cores & single vs multi-threaded workloads.

"Simultaneously Multithreading" is the generic term used by AMD and others
"Hyperthreading" - Intel's brand name for basically the same thing
These are about schedulers. At a basic level a CPU scheduler prepares the work for a CPU core to do. Both AMD & Intel's current implementation of SMT/HT allocates two schedulers to each CPU core. If a workload is sufficiently multi-threaded (can be split into enough separate independent units of work), then those schedulers ensure the CPU cores are better utilised. Essentially what happens is that as soon as a CPU core finishes a task, the spare scheduler already has the next unit of work lined up and ready to go so the CPU gets started on it straight away, at which point the scheduler can begin prepare the next unit of work. So while there's no more cores to actually do the work, HT/SMT makes better use of those cores by doing a better job at keeping them busy more of the time. Again - critically - this only works when each scheduler can prepare an independent workload... which means the work has to be sufficiently multi-threaded.

Couple of key TL DR Principles:
- Cores are better than threads: so a 4C 4T CPU (like the i5 6500) is better (all else being equal) than a 2C 4T CPU (like an i3-6100). That's because while HT/SMT makes better use of the cores you have, it's nowhere near as good as just having more cores.
- You need multi-threaded workloads to actually make use of additional cores & threads
- The more cores/threads your CPU has, the more specialised the workloads you need to actually make effective use of those extra resources. So a G4400 (dual core, dual thread - no HT), will feel quite slow in lots of tasks compared to an i5 6500 (quad core, quad thread - no HT). But if you double the cores again and go to a i7 6900K (eight core, 16 thread - with HT), you need to look at specific workloads that are highly threaded to see the difference. Yes, theoretically, it's more than twice as fast, but it won't "feel" much faster because not many workloads will use all those additional resources.
 
Solution