8核处理器和4核处理器

The advent of economical consumer grade multi-core processors raises the question for many users: how do you effectively calculate the real speed of a multi-core system? Is a 4-core 3Ghz system really 12Ghz? Read on as we investigate.

经济型消费级多核处理器的出现为许多用户提出了一个问题:如何有效地计算多核系统的实际速度? 4核3Ghz系统真的是12Ghz吗? 在我们进行调查时请继续阅读。

Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-drive grouping of Q&A web sites.

今天的问答环节由SuperUser提供,它是Stack Exchange的一个分支,它是Q&A网站的社区推动组织。

问题 (The Question)

SuperUser reader NReilingh was curious how to the processor speed for a multi-core system is actually calculated:

超级用户阅读器NReilingh好奇如何实际计算多核系统的处理器速度:

Is it correct to say, for example, that a processor with four cores each running at 3GHz is in fact a processor running at 12GHz?

例如,一个具有四个运行于3GHz的内核的处理器实际上是运行于12GHz的处理器,这是否正确?

I once got into a “Mac vs. PC” argument (which by the way is NOT the focus of this topic… that was back in middle school) with an acquaintance who insisted that Macs were only being advertised as 1Ghz machines because they were dual-processor G4s each running at 500MHz.

我曾经遇到一个“ Mac vs. PC”的论点(顺便说一下,这并不是本主题的重点……那是在中学时代),他认识一个人,因为Macs是双重的,因此它们只被宣传为1Ghz机器。 -处理器G4各自以500MHz运行。

At the time I knew this to be hogwash for reasons I think are apparent to most people, but I just saw a comment on this website to the effect of “6 cores x 0.2GHz = 1.2Ghz” and that got me thinking again about whether there’s a real answer to this.

当时我知道这很麻烦,原因是我认为这对大多数人来说都是显而易见的,但是我在该网站上仅看到“ 6核x 0.2GHz = 1.2Ghz”的评论,这让我再次考虑有一个真正的答案。

So, this is a more-or-less philosophical/deep technical question about the semantics of clock speed calculation. I see two possibilities:

因此,这是关于时钟速度计算语义的一个或多或少的哲学/深层技术问题。 我看到两种可能性:

  1. Each core is in fact doing x calculations per second, thus the total number of calculations is x(cores).实际上每个内核每秒执行x次计算,因此计算总数为x(内核)。
  2. Clock speed is rather a count of the number of cycles the processor goes through in the space of a second, so as long as all cores are running at the same speed, the speed of each clock cycle stays the same no matter how many cores exist. In other words, Hz = (core1Hz+core2Hz+…)/cores.时钟速度实际上是处理器在一秒钟内经历的周期数的计数,因此,只要所有内核都以相同的速度运行,则无论存在多少个内核,每个时钟周期的速度都保持不变。 换句话说,Hz =(core1Hz + core2Hz +…)/核心。

So what is the appropriate way to denote the total clock speed and, more importantly, is it even possible to use single-core speed nomenclature on a multi-core system?

那么,表示总时钟速度的合适方法是什么?更重要的是,甚至有可能在多核系统上使用单核速度术语吗?

答案 (The Answer)

SuperUser contributors Mokubai helps clear things up. He writes:

超级用户贡献者Mokubai帮助您解决问题。 他写:

The main reason why a quad-core 3GHz processor is never as fast as a 12GHz single core is to do with how the task running on that processor works, i.e. single-threaded or multi-threaded. Amdahl’s Law is important when considering the types of tasks you are running.

四核3GHz处理器从来没有像12GHz单核那么快的主要原因是与该处理器上运行的任务的工作方式有关,即单线程或多线程。 在考虑您正在运行的任务类型时, 阿姆达尔定律很重要。

If you have a task that is inherently linear and has to be done precisely step-by-step such as (a grossly simple program)

如果您的任务本质上是线性的,并且必须逐步完成,例如(一个非常简单的程序)

10: a = a + 1
10: a = a + 1
20: goto 10

Then the task depends highly on the result of the previous pass and cannot run multiple copies of itself without corrupting the value of 'a' as each copy would be getting the value of 'a' at different times and writing it back differently. This restricts the task to a single thread and thus the task can only ever be running on a single core at any given time, if it were to run on multiple cores then the synchronisation corruption would happen. This limits it to 1/2 of the cpu power of a dual core system, or 1/4 in a quad core system.

然后,该任务在很大程度上取决于前一遍的结果,并且无法运行其自身的多个副本而不会破坏'a'的值,因为每个副本将在不同的时间获取'a'的值并以不同的方式写回。 这将任务限制为单个线程,因此该任务只能在任何给定时间在单个内核上运行,如果要在多个内核上运行,则将发生同步损坏。 这将其限制为双核系统的cpu功率的1/2,或四核系统的1/4。

Now take a task such as:

现在执行以下任务:

10: a = a + 1
10: a = a + 1
20: b = b + 1
30: c = c + 1
30: c = c + 1
40: d = d + 1
50: goto 10
50: goto 10

All of these lines are independent and could be split into 4 separate programs like the first and run at the same time, each one able to make effective use of the full power of one of the cores without any synchronisation problem, this is where Amdahl’s Law comes into it.

所有这些线路都是独立的,可以像第一个程序一样分成4个单独的程序,并同时运行,每个程序都可以有效利用其中一个内核的全部功能而不会出现任何同步问题,这就是阿姆达尔定律进入它。

So if you have a single threaded application doing brute force calculations the single 12GHz processor would win hands down, if you can somehow make the task split into separate parts and multi-threaded then the 4 cores could come close to, but not quite reach, the same performance, as per Amdahl’s Law.

因此,如果您有一个单线程应用程序进行蛮力计算,那么单个12GHz处理器将胜出,如果您能够以某种方式将任务拆分为单独的部分并使用多线程,那么4个内核可能会接近但不能完全实现,表现与阿姆达尔定律相同。

The main thing that a multi CPU system gives you is responsiveness. On a single core machine that is working hard the system can seem sluggish as most of the time could be being used by one task and the other tasks only run in short bursts in between the larger task, resulting in a system that seems sluggish or juddery. On a multi-core system the heavy task gets one core and all the other tasks play on the other cores, doing their jobs quickly and efficiently.

多CPU系统为您提供的主要功能是响应能力。 在努力工作的单核计算机上,系统似乎很呆滞,因为大部分时间可能被一个任务占用,而其他任务仅在较大的任务之间短暂运行,从而导致系统显得呆滞或摇摇欲坠。 在多核系统上,繁重的任务获得一个核心,而其他所有任务则在另一个核心上发挥作用,从而快速高效地完成工作。

The argument of “6 cores x 0.2GHz = 1.2Ghz” is rubbish in every situation except where tasks are perfectly parallel and independant. There are a good number of tasks that are highly parallel, but they still require some form of synchronsation. Handbrake is a video trancoder that is very good at using all the CPUs available but it does require a core process to keep the other threads filled with data and collect the data that they are done with.

“ 6核x 0.2GHz = 1.2Ghz”的论点在每种情况下都是垃圾,除非任务是完全并行和独立的。 有很多任务是高度并行的,但是它们仍然需要某种形式的同步。 Handbrake是一种视频转码器,非常善于使用所有可用的CPU,但是它确实需要一个核心进程来保持其他线程充满数据并收集处理完的数据。

  1. Each core is in fact doing x calculations per second, thus the total number of calculations is x(cores).实际上每个内核每秒执行x次计算,因此计算总数为x(内核)。

Each core is capable of doing x calculations per second, assuming the workload is suitable parallel, on a linear program all you have is 1 core.

假设工作负载适合并行运行,则每个内核每秒可以执行x个计算,在线性程序上,您只有1个内核。

  1. Clock speed is rather a count of the number of cycles the processor goes through in the space of a second, so as long as all cores are running at the same speed, the speed of each clock cycle stays the same no matter how many cores exist. In other words, Hz = (core1Hz+core2Hz+…)/cores.时钟速度实际上是处理器在一秒钟内经历的周期数的计数,因此,只要所有内核都以相同的速度运行,则无论存在多少个内核,每个时钟周期的速度都保持不变。 换句话说,Hz =(core1Hz + core2Hz +…)/核心。

I think it is a fallacy to think that 4 x 3GHz = 12GHz, granted the maths works, but you’re comparing apples to oranges and the sums just aren’t right, GHz can’t simply be added together for every situation. I would change it to 4 x 3GHz = 4 x 3GHz.

考虑到数学原理,我认为认为4 x 3GHz = 12GHz是一个谬论,但是您正在将苹果与橘子进行比较,并且总和是不正确的,不能简单地将GHz每种情况相加。 我将其更改为4 x 3GHz = 4 x 3GHz。

Have something to add to the explanation? Sound off in the the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.

有什么补充说明吗? 在评论中听起来不对。 是否想从其他精通Stack Exchange的用户那里获得更多答案? 在此处查看完整的讨论线程 。

翻译自: https://www.howtogeek.com/127950/how-do-you-calculate-processor-speed-on-multi-core-processors/

8核处理器和4核处理器

8核处理器和4核处理器_如何计算多核处理器上的处理器速度?相关推荐

  1. linux查看处理器型号_如何在Linux上查看处理器型号/速度

    linux查看处理器型号 If you rely on somebody else for managed hosting of your Linux servers, you might not a ...

  2. mtk处理器和骁龙对比_联发科(MTK)智能手机处理器平台汇总(含基本参数对比)一览...

    联发科技曦力 A 系列让人为之赞叹,是性能卓越的多功能芯片组,拥有令人惊艳的相机功能,是打造性能优良且易操作的手机的基石. 联发科技曦力 P 系列运作灵巧且功能强大,为手机厂商提供打造出众的功能手机的 ...

  3. 超标量处理器设计——第四章_分支预测

    超标量处理器设计--第四章_分支预测 参考<超标量处理器>姚永斌著 4.1 简述 分支预测主要与预测两个内容, 一个是分支方向, 还有一个是跳转的目标地址 首先需要识别出取出的指令是否是分 ...

  4. 计算机几核的作用,电脑处理器最高几核_如何查看电脑属于几核(方法步骤教程)...

    描述 随着电脑硬件的发展,一台电脑的核数越来越多,电脑运行速度也越来越快.本文首先介绍了什么是几核及核数目是不是越多越好的解答,其次介绍了电脑处理器最高几核,最后阐述了如何查看电脑属于几核的步骤方法, ...

  5. 兼具A核和M核的多核异构处理器,A核与M核如何通讯?

    随着市场对嵌入式设备功能需求的提高,市面上出现了集成嵌入式处理器和单片机的主控方案,以兼顾性能和效率. 在实际应用中,嵌入式处理器和单片机之间需要进行大量且频繁的数据交换,如果采用低速串行接口,则数据 ...

  6. 开核有望?AMD Ryzen 5处理器确认8核阉割

    8核16线程的Ryzen 7上市半个月之后,AMD昨天在北京又宣布了Ryzen 5系列将于4月11日全球开售,其中有2款4核8线程.2款6核12线程的型号,售价在1299到1999元之间.现在问题来了 ...

  7. 2697v3只支持服务器内存,Intel发布至强E5-2600 v3处理器:18核36线程,支持DDR4内存...

    桌面版8核Haswell-E处理器发布之后,Intel也在今天开幕的秋季IDF会议上发布了Haswell-EP架构的至强E3-2600 v3系列处理器,相比前代v2家族最多12核心24线程,E5-26 ...

  8. 核心网upf作用_高性能5G核心网,动力从何而来? 核心网,是整个通信网络的大脑,是不可或缺的重要组成部分。 网络的管理控制、鉴权认证等关键功能,主要由核心网负责。核心网的... - 雪球...

    来源:雪球App,作者: 鲜枣课堂,(https://xueqiu.com/7282046183/152278945) 核心网,是整个通信网络的大脑,是不可或缺的重要组成部分. 网络的管理控制.鉴权认 ...

  9. 处理器后面的字母含义_英特尔CPU后缀新丁加入,后缀“F”的含义代表什么?...

    现在的处理器,一般型号后面会带些英文字母,比如U是标压的意思,比如K或者X一般意味着这款处理器可以超频.那么有些小白这时候就会问:"好物君那处理器后面带F是啥意思?难道是可以降频?" ...

最新文章

  1. 沉痛悼念游戏开发大神毛星云
  2. openstack-9:安装neutron网络服务
  3. python formatters 与字符串 小结 (python 2)
  4. Apache CXF实现Web Service(3)——Tomcat容器和不借助Spring的普通Servlet实现JAX-RS(RESTful) web service...
  5. 排序 - 冒泡法(改进)
  6. java实现的判断括号是否成对的代码,()[]{}都可以
  7. php 动态多维数组长度,php – 动态创建多维数组
  8. 文件完整性的检测与监控
  9. 科研网站大全,你值得拥有!
  10. 使用超级鹰模拟登录验证码报错的解决办法
  11. Hutool PinyinException: No pinyin jar found Please add one of it to your project问题解决
  12. iTEST平台成绩查询代码
  13. 错误Could not locate executable null\bin\winutils.exe in the Hadoop binaries的解决方案
  14. Scala进阶_函数式编程(过滤丶排序丶分组丶聚合)
  15. 奔腾的芯——英特尔公司
  16. openwrt上透明AP的实现
  17. 【techQA】如何在Mac OS 11 Big Sur or M1芯片Mac下开启蓝牙Apt-X
  18. 哈希表构造与处理冲突方法
  19. 定制Directives
  20. Qt QString 增、删、改、查、格式化等常用方法总结

热门文章

  1. ES6 ------ 基础(三)——Promise 基本使用
  2. python微信跳一跳
  3. OneNET 数据可视化 按键控制
  4. 串通招投标有哪些方法?电子化招投标系统怎么遏制串标?
  5. 在 Go 项目中基于本地内存缓存的实现及应用
  6. vlc搭建rtsp直播Demo ffmpeg + nginx + flv.js实现rtsp网页播放Demo
  7. 大前端-Vue源码分析
  8. 2017oracle官网下载旧版本JDK
  9. HDU 3371 Kruskal
  10. 苹果正式发布iOS 8.3,修复漏洞,性能提升