Understanding Linux /proc/cpuinfo
http://www.richweb.com/cpu_info
A hyperthreaded processor has the same number of function units as an older, non-hyperthreaded processor. It just has two execution contexts, so it can maybe achieve better function unit utilization by letting more than one program execute concurrently. On the other hand, if you're running two programs which compete for the same function units, there is no advantage at all to having both running "concurrently." When one is running, the other is necessarily waiting on the same function units.
A dual core processor literally has two times as many function units as a single-core processor, and can really run two programs concurrently, with no competition for function units.
A dual core processor is built so that both cores share the same level 2 cache. A dual processor (separate physical cpus) system differs in that each cpu will have its own level 2 cache. This may sound like an advantage, and in some situations it can be but in many cases new research and testing shows that the shared cache can be faster when the cpus are sharing the same or very similar tasks.
In general Hyperthreading is considered older technology and is no longer supported in newer cpus. Hyperthreading can provide a marginal (10%) for some server workloads like mysql, but dual core technology has essentially replaced hyperthreading in newer systems.
A dual core cpu running at 3.0Ghz should be faster then a dual cpu (separate core) system running at 3.0Ghz due to the ability to share the cache at higher bus speeds.
The examples below details how we determine what kind of cpu(s) are present.
The kernel data Linux exposes in /proc/cpuinfo will show each logical cpu with a unique processor number. A logical cpu can be a hyperthreading sibling, a shared core in a dual or quad core, or a separate physical cpu. We must look at the siblings, cpu cores and core id to tell the difference.
If the number of cores = the number of siblings for a given physical processor, then hyperthreading is OFF.
/bin/cat /proc/cpuinfo | /bin/egrep 'processor|model name|cache size|core|sibling|physical'
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
siblings : 2
core id : 0
cpu cores : 1
processor : 1
model name : Intel(R) Pentium(R) 4 CPU 2.80GHz
cache size : 1024 KB
physical id : 0
siblings : 2
core id : 0
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
siblings : 4
core id : 0
cpu cores : 4
processor : 1
model name : Intel(R) Xeon(R) CPU E5410 @ 2.33GHz
cache size : 6144 KB
physical id : 0
siblings : 4
core id : 1
cpu cores : 4
processor : 2
model name : Intel(R) Xeon(R) CPU E5410 @ 2.33GHz
cache size : 6144 KB
physical id : 0
siblings : 4
core id : 2
cpu cores : 4
processor : 3
model name : Intel(R) Xeon(R) CPU E5410 @ 2.33GHz
cache size : 6144 KB
physical id : 0
siblings : 4
core id : 3
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
siblings : 2
core id : 0
cpu cores : 2
processor : 1
model name : Intel(R) Pentium(R) D CPU 3.00GHz
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 1
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
siblings : 2
core id : 0
cpu cores : 1
processor : 1
model name : Intel(R) Xeon(TM) CPU 3.60GHz
cache size : 1024 KB
physical id : 3
siblings : 2
core id : 0
cpu cores : 1
processor : 2
model name : Intel(R) Xeon(TM) CPU 3.60GHz
cache size : 1024 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
processor : 3
model name : Intel(R) Xeon(TM) CPU 3.60GHz
cache size : 1024 KB
physical id : 3
siblings : 2
core id : 0
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
siblings : 2
core id : 0
cpu cores : 2
processor : 1
model name : Intel(R) Xeon(R) CPU 5160 @ 3.00GHz
cache size : 4096 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
processor : 2
model name : Intel(R) Xeon(R) CPU 5160 @ 3.00GHz
cache size : 4096 KB
physical id : 3
siblings : 2
core id : 0
cpu cores : 2
processor : 3
model name : Intel(R) Xeon(R) CPU 5160 @ 3.00GHz
cache size : 4096 KB
physical id : 3
siblings : 2
core id : 1
cpu cores : 2
Understanding Linux /proc/cpuinfo的更多相关文章
- [转]linux /proc/cpuinfo 文件分析
在Linux系统中,提供了proc文件系统显示系统的软硬件信息.如果想了解系统中CPU的提供商和相关配置信息,则可以通过/proc/cpuinfo文件得到.本文章针对该文件进行简单的总结. 基于不同指 ...
- linux /proc/cpuinfo 文件描写叙述
processor :系统中逻辑处理核的编号.对于单核处理器.则课觉得是其CPU编号,对于多核处理器则能够是物理核.或者使用超线程技术虚拟的逻辑核 vendor_id :CPU制造商 cpu fami ...
- Linux CPU数量判断,通过/proc/cpuinfo.
Linux CPU数量判断,通过/proc/cpuinfo. 相同 physical id :决定一个物理处理器 如果“siblings”和“cpu cores”一致,则说明不支持超线程,或者超线程未 ...
- Linux proc目录下 几个系统文件下的各项参数 (cpuinfo,uptime,meminfo,stat,loadavg)
参考链接: Linux 操作系统内核基本实验.pdf http://max.book118.com/html/2015/0919/25787869.shtm Linux下cpuinfo文件各项参数的详 ...
- Linux下查看CPU信息[/proc/cpuinfo]
最近在研究linux系统负载的时候,接触到一些关于CPU信息查看的知识,和大家分享一下.通过对/proc/cpuinfo文件中的参数的分析,也学到了不少东西. 在linux操作系统中,CPU的信息在启 ...
- linux cat /proc/cpuinfo
#cat /proc/cpuinfo processor : 0 #逻辑处理器的唯一标识符 vendor_id : AuthenticAMD #CPU厂商ID信息,如果处理器为英特尔处理器,则vend ...
- Linux /proc、/dev Principle
目录 . /proc简介 . 内核机制相关 . 进程信息 . 硬件设备相关 . 系统信息 . /dev简介 . 内存相关 1. /proc简介 在linux的根目录下有一个/proc目录,/proc文 ...
- /proc/cpuinfo zz
/proc/cpuinfo文件分析 在Linux系统中,提供了proc文件系统显示系统的软硬件信息.如果想了解系统中CPU的提供商和相关配置信息,则可以通过/proc/cpuinfo文件得到.本文章针 ...
- 2017-07-02(free uptime cat /proc/cpuinfo uname lsb_release)
free -b 字节为单位显示 -k KB为单位显示,默认显示就是KB -m 以MB为单位显示 -g 以GB为单位显示 free -m free 显示说明 uptime 跟top命令第一行内容相同 c ...
随机推荐
- iOS开发数据库篇—SQLite的应用
iOS开发数据库篇—SQLite的应用 一.简单说明 在iOS中使用SQLite3,首先要添加库文件libsqlite3.dylib和导入主头文件. 导入头文件,可以使用库中的函数(是纯C语言的) 二 ...
- Ajax全接触
AJAX即“Asynchronous Javascript And XML”(异步JavaScript和XML) 通过在后台与服务器进行少量数据交换,AJAX 可以使网页实现异步更新.这意味着可以在不 ...
- wamp环境下phpmyadmin拒绝访问
You don't have permission to access /phpmyadmin on this server. 找到 alias/phpmyadmin.conf 的配置文件 将 &l ...
- iPhone6搜索如何打开?详细使用方法
iphone6搜索功能在哪?怎么用呢?当iPhone6中安装了太多的应用或者联系人太多时,我们就可以使用iPhone6搜索功能就能快速找到,但是还有很多朋友对于iphone6搜索功能在哪,怎么用还不太 ...
- hbm配置文件 generator节点各种解释
今天犯了个错误 generator节点class属性有这么几个值(主键生成策略方案): assigned:由用户指定主键值 sequence:由oracle序列生成 increment:对类型为lon ...
- Pycharm使用问题# 程序界面出现方框字符
Pycharm 程序至今依旧存在国际化问题,有时会出现程序界面有方框的现象,windows和linux好像都会出现,如下图:
- USACO2016Splitting the Field分割牧场
Description FJ的N头奶牛分别位于他二维的牧场的不同位置.FJ想用一个矩形栅栏围住这些牛(牛可以在栅栏边上),并使这个栅栏尽可能小.这个栅栏的边与x轴或y轴平行.不幸的是,FJ上个季度的牛 ...
- redis 配置应用(摘)
Redis可以在没有配置文件的情况下通过内置的配置来启动,但是这种启动方式只适用于开发和测试. 合理的配置Redis的方式是提供一个Redis配置文件,这个文件通常叫做redis.conf. redi ...
- SQL convert datetime
格式: CONVERT(data_type,expression[,style]) 说明: 此样式一般在时间类型(datetime,smalldatetime)与字符串类型(nchar,nvarcha ...
- css-九宫格自适应的实现
高度自适应使用padding 或 padding-bottom + 百分比来实现: 宽度自适应使用width + 百分比来实现. 下面是实现九宫格自适应的代码: <!DOCTYPE html&g ...