了解CPU信息 [英] Making sense of cpu info
问题描述
我通常知道,处理器数量越多,进程就越多(可以同时观看电影,玩游戏,在youtube上播放Firefox和播放辛普森的剧集),而计算机却不会变慢。但是我想知道如何理解linux命令cpuinfo和lscpu。
I generally know that the more the number of processors the more processes (watching a movie, playing some game, running firefox with youtube playing a Simpson's episode, all simultaneously) you can have simultaneously going without your computer slowing down. But I want to know how to make sense of the linux commands cpuinfo and lscpu.
lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 42
Stepping: 7
CPU MHz: 1600.000
BogoMIPS: 6800.18
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 8192K
NUMA node0 CPU(s): 0-7
和cpuinfo:
===== Processor composition =====
Processor name : Quad-Core AMD Opteron(tm) Processor 2354
Packages(sockets) : 2
Cores : 8
Processors(CPUs) : 8
Cores per package : 4
Threads per core : 1
===== Processor identification =====
Processor Thread Id. Core Id. Package Id.
0 0 0 0
1 0 1 0
2 0 2 0
3 0 3 0
4 0 0 1
5 0 1 1
6 0 2 1
7 0 3 1
===== Placement on packages =====
Package Id. Core Id. Processors
0 0,1,2,3 0,1,2,3
1 0,1,2,3 4,5,6,7
他们到底在告诉我什么。对我来说,双核意味着每个处理器两个核。我可以看到列出了8个CPU。但是线程和核心之间有什么区别。我可以看到每个内核有2个线程。什么是插座?我无法在Google那里解释问题的地方,但是有很多地方告诉您使用cpuinfo / lscpu。
What exactly are they telling me. A dual core to me means two core per processor. I can see 8 CPU(s) listed. But what is the difference between thread and cores. I can see 2 Thread(s) per core. And what is a socket? I could not google a place where things are explained but there are plenty of places which tell you to use cpuinfo/lscpu.
推荐答案
从技术上讲,您所谓的核心是物理核心,也就是套接字,也就是封装。
What you call "core" is technically a "physical core", aka socket aka package.
物理核心被虚拟地拆分为逻辑核心(由cpuinfo / lscpu简单列为核心。)
A physical core is "virtually splitted" into logical cores (listed simply as "core(s)" by cpuinfo/lscpu.
因此,您的系统有2个物理核心,每个物理核心又分为4个逻辑核心。
So your system has 2 physical cores, each one divided into 4 logical cores. This sums up into 8 logical cores.
tomshw上的类似问题:
< a href = http://www.tomshardware.co.uk/answers/id-1850932/difference-physical-core-logical-core.html rel = nofollow> http://www.tomshardware.co。 uk / answers / id-1850932 / difference-physical-core-logical-core.html
A similar question on tomshw: http://www.tomshardware.co.uk/answers/id-1850932/difference-physical-core-logical-core.html
超线程:
http://en.m.wikipedia.org/wiki/Hyper-threading
这篇关于了解CPU信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!