2 basic questions about CPU

oudmaster

Distinguished
Jul 26, 2013
330
0
18,780
hi all
I have basic understanding of the CPUs ,,,
but
1- what are the numbers mean when we say I3, I5 and I7 ?
2- what is the different between Cores and Threads ?


thank you,
 
Solution
1.In the laptop space things are inconsistent, as it is generally accepted the the least computer savvy users will buy laptops and as a result the marketing team are given more control over the names so some models defy logic.

In the desktop space things are fairly straight forward. The i3 has two cores, the i5 has 4 cores, an the i7 has 4 cores and Hyperthreading which presents 8 threads to the computer (2 threads per core). Then you have i7 Extreme with 6 core and soon to be 8 core units which both present double the threads to the computer via hyperthreading.

2. Threads are (in software) a sequential list of instructions. A CPU core used to only accept one, but HyperThreadng from Intel changed that back in the P4 era to allow a...

Asellus

Honorable
Oct 25, 2013
21
0
10,510
Someone might be able to give a better answer, but I'll give it a try:

1. As far as I know, its just model names. The higher the number, the faster the CPU (in general). However, there is more that just this to be considered.

2. Wikipedia describes it quite well.
 

genz

Distinguished
1.In the laptop space things are inconsistent, as it is generally accepted the the least computer savvy users will buy laptops and as a result the marketing team are given more control over the names so some models defy logic.

In the desktop space things are fairly straight forward. The i3 has two cores, the i5 has 4 cores, an the i7 has 4 cores and Hyperthreading which presents 8 threads to the computer (2 threads per core). Then you have i7 Extreme with 6 core and soon to be 8 core units which both present double the threads to the computer via hyperthreading.

2. Threads are (in software) a sequential list of instructions. A CPU core used to only accept one, but HyperThreadng from Intel changed that back in the P4 era to allow a core to work whilst waiting for something. This is because, when compared to the rest of your PC, a CPU is extremely fast. Things like fetching data from memory take an eternity in CPU land, so by having two lists of instructions to work with, whenever a CPU must wait for data from elsewhere on the computer it can switch to the other list and work on that until that data arrives from RAM for example. Thing is, programs have to be written to be aware of the fact that half the threads on the CPU cannot run simultaneously to really see big benefits.

AMD of course have a different solution, they actually have 'modules' which bend the definition of cores. An AMD chip that will be sold as an 8 core/4 module actually has 8 cores, but some of the components within those cores are shared between 2 cores, making it had to determine if there are 4 cores with extra parts, or 8 cores with parts missing. Either way, the fact that they have actual extra hardware so all threads will process simultaneously means you can usually expect to see more of a result from multi-threading optimised applications, especially those that aren't really HT aware.
 
Solution

Asellus

Honorable
Oct 25, 2013
21
0
10,510


That is the speed per core. Otherwise that would be somewhat of a disadvantage to having more cores :). There is another post here, regarding that question, if you would like to read a bit more.
 

vmN

Honorable
Oct 27, 2013
1,666
0
12,160
Hyper-threading (Better called SMT, as Intel isn't the only one using this technology), isn't only in use for when a thread need to fetch data from the memory, as that process have been boosted by a far margin for each architecture update.

SMT lets two (or more) threads run simultaneously on a single core.
This is because in todays processors there are so many execution units, it is hard to keep them all working all the time.



AMD is running using a cluster-core technology (CMT).
CMT is used to be spaceefficient, by removing redundant parts.
CMT is hard to implement without having a messed up scheduling system. (A piledriver module is running with 3 different schedulers).

CMT and SMT isn't competing as they are in use for total different objects.

SMT is by increase performance efficiency and increase throughput by getting the most performance out of the already existing components, meanwhile CMT is by adding more components into the existing core to increase the performance and been spaceefficiency at the same time.

GHz simply indicated the amount of cycles per second. It can totally vary on the different architecture.
 

genz

Distinguished
Nobody said it was just for when a thread needs to fetch data from memory. That was just an example. And to be fair, when compared to a single threaded core that is the main advantage.

The argument that AMD is using CMT and Intel is using SMT is A. A little advanced for a self proclaimed noob like the OP, B. Not entirely that simple, like I said memory reads take an eternity and memory writes take longer in CPU land, so to be fair most threads are actually spending time idle whilst carrying out reads and writes. When those memory reads do come, they must be put into cache, which cannot be coherent between threads. This means that each core must split their cache in two, one for each thread, and as a result has half the cache per thread that it would usually have. Then there's the actual pipeline. Any and all micro code must be duplicated. Any and all pipelines must be duplicated. You are effectively building a second core inside the core in a lot of ways. Funny thing is AMD's scheduling is far more efficient than Intels and it shows on multithreaded benchmarks when you look at the advantage multiple cores have.

Finally, I will quote Ars directly. "AMD claims that in the real world, a single two-way SMT core works as well as 1.3 regular cores, because the threads don't wait on main memory but on execution resources to free up. In other words, in cases where main memory is not a bottleneck, the execution units quickly become oversubscribed and an SMT core quickly becomes a bit less efficient than a non-SMT core (i.e., it performs just like a single-core design, but it has extra hardware, so it's overall less efficient)."


See: http://arstechnica.com/business/2010/08/evolution-not-revolution-a-look-at-amds-bulldozer/

 

vmN

Honorable
Oct 27, 2013
1,666
0
12,160
No, both thread are running simultaneously, not only when a thread is been stalled.

It is true, that picking up something from memory takes a long time, but they have reduced the time by alot.

This is done by an improved fetch (CMT require this too, obviously).

Little example of how SMT works the best;

Lets say you have a processor with 2 ALUs and 2-128 bit SIMD.

You write 2 programs, where one is purely integer and the other is purely SIMD instructions.

SMT will allow both threads to be executed simultaneously, non waiting on the other.

You cannot calculated the effective of SMT, as it vary depending on the code.

AMDs scheduling is terrible, I dont understand how you can say otherwise.

Intels scheduler is a far bigger (But single, controlling all the pipelines, having more control), instead of 3 small, making things complicated.

How can you calculate how great a scheduler will work under heavy load? There will be something else been the greater limitation, I'm sure about that.




 

genz

Distinguished


That's a perfect world scenario, the reality is that most of the time, superscalar architectures are using both ALUs and SIMDs at the same time. I don't think I've ever met a program of any complexity with pure integer or pure SIMD instruction (or pure anything else of that matter). All modern CPUs are superscalar, and Intel are actually very good at taking advantage of their pipeline - which I assume is what you mean by having a good scheduler - to use as much of the core as possible and thus have a superior IPC speed to AMD.



You can calculate the effectiveness of SMT just like you can calculate the effectiveness of any CPU feature, hell computer feature period, because every aspect of your computer depends entirely on the code. Look at BF4. If you use that as a benchmark then AMD is as fast as Intel at a much better price, but we both know that's becasue the code is integer heavy to capitalise on console processor's chosen arch. SMT is good for trying to fill up any unused core resources with lower demand background threads whilst running an intensive single thread per core, and CMT is good for single demanding applications that are multi-threaded. Why? Both have two threads sharing the same L2 Cache, but AMD have more hardware attached to that same pair of threads, so an interwoven pair of decently intensive threads can work with each other without having to cache miss all the way down to L3 cache when passing data between each other.

As for the actual reasons that I think that the AMD scheduler is pretty smart. It's in the ordering. AMD wanted 1 FPU per module, basically making each pair of cores share one, so they pretty much built two cores with simple scheduling that passes on any FPU commands to a specific FPU scheduler so that the FPU can work on two core's instructions at once. This can be seen as either 0.5 of the FPU performance per core, or in single threaded applications it would be an extra 50% FPU performance. They know they cannot match things like the Intel QP and ringbus, nor the Uncore stuff, and it would take a lot of R&D to go the SMT route, so they ended up making with a module that can only be 70% utilised by a single thread unlike SMT, but has a smaller set of schedulers, no need for the yield issues or ego loss that having full 8 cores competing with Intel quads would present and that really made sure that where AMD has advantages, they stood tall, namely multitasking (by making the bulldozer L2 shared) and integer units (by doubling down with them in modules).

PS. The integer unit historic advantage on ATi is long documented but the last example I could think of was the Bitcoin advantage.