日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux的cpu信息怎么理解,理解Linux下的CPU信息:lscpu cpuinfo

發布時間:2023/12/10 linux 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux的cpu信息怎么理解,理解Linux下的CPU信息:lscpu cpuinfo 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

通過lscpu命令,可以看到CPU的一些基本信息。如下所示,可以很清楚的看到這臺服務器使用兩個物理socket,每個socket上有6個core,每個core上有兩個線程(超線程),所以一共有2 * 6 * 2 = 24個邏輯CPU。

Architecture: x86_64

CPU op-mode(s): 32-bit, 64-bit

Byte Order: Little Endian

CPU(s): 24

On-line CPU(s) list: 0-23

Thread(s) per core: 2

Core(s) per socket: 6

CPU socket(s): 2

NUMA node(s): 2

Vendor ID: GenuineIntel

CPU family: 6

Model: 62

Stepping: 4

CPU MHz: 2601.000

BogoMIPS: 5187.39

Virtualization: VT-x

L1d cache: 32K

L1i cache: 32K

L2 cache: 256K

L3 cache: 15360K

NUMA node0 CPU(s): 0-5,12-17

NUMA node1 CPU(s): 6-11,18-23

通過cat /proc/cpuinfo同樣可以看到一些信息,這里會給socket、core和線程設置id。

同一個socket的physical id相同

cpu cores表示此socket上的core數量

如果cpu cores = siblings,表明沒有開啟超線程

如果cpu cores = 2 * siblings,表明開啟了超線程

相同的physical id,相同的core id,但是不同的processor id,表明是同一個core上的邏輯CPU(超線程)

cpuinfo示例如下所示(原文引用已經找不到了,直接貼在這里)

Example 1: Single processor, 1 core, no Hyperthreading

Processor : 0

model name : AMD Duron(tm) processor

cache size : 64 KB

Example 2: Single processor, 1 core, Hyperthreading is enabled.

Notice how we have 2 siblings, but only 1 core. The physical CPU id is the same for both: 0.

processor : 0

model name : Intel(R) Pentium(R) 4 CPU 2.80GHz

cache size : 1024 KB

physical id : 0 # same physical id

siblings : 2

core id : 0 # same core id

cpu cores : 1

processor : 1

model name : Intel(R) Pentium(R) 4 CPU 2.80GHz

cache size : 1024 KB

physical id : 0 # same physical id

siblings : 2

core id : 0 # same core id

cpu cores : 1

Example 3. Single socket Quad Core

Notice how each processor has its own core id. The number of siblings matches the number of cores so there are no Hyperthreading siblings. Also notice the huge L2 cache - 6 MB. That makes sense though, when considering 4 cores share that L2 cache.

processor : 0

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

cache size : 6144 KB

physical id : 0 # same physical id

siblings : 4

core id : 0 # different core id

cpu cores : 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

總結

以上是生活随笔為你收集整理的linux的cpu信息怎么理解,理解Linux下的CPU信息:lscpu cpuinfo的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。