首页天道酬勤,

,

张世龙 05-12 16:08 131次浏览

使用lscpu命令可以查看CPU的基本信息。 如下所示,该服务器使用两个物理套接字,每个套接字有六个内核,每个内核有两个线程(超线程),因此总共有2 * 6 * 2=24个逻辑CPU。

Architecture: x86_64

在线处理器(s )列表:0- 23

萨德(s ) per core: 2

酷睿(s ) Per套接字: 6

模型: 62

Stepping: 4

BogoMIPS: 5187.39

在cat /proc/cpuinfo中也可以看到一些信息。 在此为套接字、核心和线程设置id。

同一套接字的物理id相同

cpu cores表示此插槽上的酷睿数

如果cpu cores=siblings,则未启用超线程

如果cpu cores=2 * siblings,则超线程处于启用状态

cpuinfo的示例如下所示。 (因为再也找不到原文的引用了,所以直接贴在这里) ) ) )。

example 1:单处理器,1 core,no Hyperthreading

处理器: 0

模型名称: amd duron (TM )处理器

cache size : 64 KB

example 2:单处理器,1核心,Hyperthreading is enabled。

Notice how we have 2 siblings,but only1core.thephysicalcpuidisthesameforboth :

处理器: 0

型号名称:英特尔奔腾4 CPU 2.80GHz

cache size : 1024 KB

物理id :0# same物理id

siblings : 2

酷睿id :0# same酷睿id

cpu cores : 1

处理器: 1

型号名称:英特尔奔腾4 CPU 2.80GHz

cache size : 1024 KB

物理id :0# same物理id

siblings : 2

酷睿id :0# same酷睿id

cpu cores : 1

example3.单套接字四核

noticehoweachprocessorhasitsowncoreid.thenumberofsiblingsmatchesthenumberofcoressotherearenohyperthreadingsiblings.alsononots kessensethough,when considering4coressharethatl2cache。

处理器: 0

模型名称: Intel Xeon r CPU e 5410 @ 2.33 GHz

cache size : 6144 KB

物理id :0# same物理id

siblings : 4

酷睿id :0# different酷睿id

CPU酷睿s : 4

processor : 1

model name : Intel(R) Xeon(R) CPU E5410 @ 2.33GHz

cache size : 6144 KB

physical id : 0 # same physical id

siblings : 4

core id : 1 # different core id

cpu cores : 4

processor : 2

model name : Intel(R) Xeon(R) CPU E5410 @ 2.33GHz

cache size : 6144 KB

physical id : 0 # same physical id

siblings : 4

core id : 2 # different core id

cpu cores : 4

processor : 3

model name : Intel(R) Xeon(R) CPU E5410 @ 2.33GHz

cache size : 6144 KB

physical id : 0 # same physical id

siblings : 4

core id : 3 # different core id

cpu cores : 4

Example 3a. Single socket Dual Core

Again, each processor has its own core so this is a dual core system.

processor : 0

model name : Intel(R) Pentium(R) D CPU 3.00GHz

cache size : 2048 KB

physical id : 0 # same physical id

siblings : 2

core id : 0 # different core id

cpu cores : 2

processor : 1

model name : Intel(R) Pentium(R) D CPU 3.00GHz

cache size : 2048 KB

physical id : 0 # same physical id

siblings : 2

core id : 1 # different core id

cpu cores : 2

Example 4. Dual Single core CPU, Hyperthreading ENABLED

This example shows that processer 0 and 2 share the same physical CPU and 1 and 3 share the same physical CPU. The number of siblings is twice the number of cores, which is another clue that this is a system with hyperthreading enabled.

processor : 0

model name : Intel(R) Xeon(TM) CPU 3.60GHz

cache size : 1024 KB

physical id : 0 # different physical id

siblings : 2

core id : 0 # same core id

cpu cores : 1

processor : 1

model name : Intel(R) Xeon(TM) CPU 3.60GHz

cache size : 1024 KB

physical id : 3 # different physical id

siblings : 2

core id : 0 # same core id

cpu cores : 1

processor : 2

model name : Intel(R) Xeon(TM) CPU 3.60GHz

cache size : 1024 KB

physical id : 0 # different physical id

siblings : 2

core id : 0 # same core id

cpu cores : 1

processor : 3

model name : Intel(R) Xeon(TM) CPU 3.60GHz

cache size : 1024 KB

physical id : 3 # different physical id

siblings : 2

core id : 0 # same core id

cpu cores : 1

Example 5. Dual CPU Dual Core No hyperthreading

Of the 5 examples this should be the most capable system processor-wise. There are a total of 4 cores : 2 cores in 2 separate socketed physical CPUs. Each core shares the 4MB cache with its sibling core. The higher clock rate (3.0 GHz vs 2.3GHz) should offer slightly better

performance than example 3.

processor : 0

model name : Intel(R) Xeon(R) CPU 5160 @ 3.00GHz

cache size : 4096 KB

physical id : 0 # different physical id

siblings : 2

core id : 0 # different core id

cpu cores : 2

processor : 1

model name : Intel(R) Xeon(R) CPU 5160 @ 3.00GHz

cache size : 4096 KB

physical id : 0 # different physical id

siblings : 2

core id : 1 # different core id

cpu cores : 2

processor : 2

model name : Intel(R) Xeon(R) CPU 5160 @ 3.00GHz

cache size : 4096 KB

physical id : 3 # different physical id

siblings : 2

core id : 0 # different core id

cpu cores : 2

processor : 3

model name : Intel(R) Xeon(R) CPU 5160 @ 3.00GHz

cache size : 4096 KB

physical id : 3 # different physical id

siblings : 2

core id : 1 # different core id

cpu cores : 2

, ,