转载CPU相关总结

Posted gqtcgq

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了转载CPU相关总结相关的知识,希望对你有一定的参考价值。

What is the difference between Processor, Core, Logical Processor ?

 

Processor : It’s the physical components that comes with server, responsible of all processing operations, a server can have more than one processor (1, 2…), we talk so about a multiprocessor server (bi-processor in case of 2).

 

Core : Inside your physical processor, you can have more than one operations unit, called Core. We can say that a core is like a processor, so 1 Processor with two Cores is like 2 processors with 1 Core (I insist is like not equal). Today all processors are multi-core, and for servers, we usually find 4 or more cores processors (aka Quad Core or more).

 

Logical Processor : As explained before, we have processors and cores. Normally a Core can handle one thread (aka operation) in the same time (processor time slot). But when the technology Hyper-Threading is activated and supported, the Core can handle two threads in the same time than one (it’s more complicated but i’m touching the point). The number of thread in a machine is the number of logical processor. So if you want to know how much logical processor do you have, just count the total number of threads.

 

So how to count that:

 

Cores Count = Processor Count * CoresCountPerProcessor

 

Logical Processor Count = CoresCount * ThreadCount

 

 

#lscpu 
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                32
On-line CPU(s) list:   0-31
Thread(s) per core:    2
Core(s) per socket:    8
Socket(s):             2
NUMA node(s):          2
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 45
Stepping:              7
CPU MHz:               2599.928
BogoMIPS:              5199.94
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              20480K
NUMA node0 CPU(s):     0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30
NUMA node1 CPU(s):     1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31

 

According to your lscpu output:

 

You have 32 cores (CPU(s)) in total.

You have 2 physical sockets (Socket(s)), each contains 1 physical processor.

Each processor of yours has 8 physical cores (Core(s) per socket) inside, which means you have 8 * 2 = 16 real cores.

Each real core can have 2 threads (Thread(s) per core), which means you have real cores * threads = 16 * 2 = 32 cores in total.

 

 

https://buildwindows.wordpress.com/2012/12/13/virtualization-processor-core-logical-processor-virtual-processor-what-does-this-mean/

https://unix.stackexchange.com/questions/145247/understanding-cpu-while-running-top-command

以上是关于转载CPU相关总结的主要内容,如果未能解决你的问题,请参考以下文章

汇编第二天 段的总结

cpu设计和实现(总结篇)

cpu设计和实现(总结篇)

精心收集的 48 个 JavaScript 代码片段,仅需 30 秒就可理解!(转载)

线上异常排查总结相关文章

分享几个实用的代码片段(附代码例子)