为什么所有CPU内核都具有相同的速度而不是不同的速度?

为什么所有CPU内核都具有相同的速度而不是不同的速度?

If you have ever done much comparison shopping for a new CPU, you may have noticed that cores all seem to have the speed rather than a combination of different ones. Why is that? Today’s SuperUser Q&A post has the answer to a curious reader’s question.

如果您曾经为新CPU做过很多比较购买,则可能已经注意到,所有内核似乎都具有速度,而不是不同内核的组合。 这是为什么? 今天的“超级用户问答”帖子回答了一个好奇的读者的问题。

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

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

问题 (The Question)

SuperUser reader Jamie wants to know why CPU cores all have the same speed instead of different ones:

超级用户阅读器杰米(Jamie)想知道为什么所有CPU内核都具有相同的速度而不是不同的速度:

In general, if you are buying a new computer, you would determine which processor to buy based on the expected workload for the computer. Performance in video games tends to be determined by single core speed, whereas applications like video editing are determined by the number of cores. In terms of what is available on the market, all CPUs seem to have roughly the same speed with the main differences being more threads or more cores.

通常,如果您要购买新计算机,则应根据计算机的预期工作量来确定要购买的处理器。 视频游戏的性能往往取决于单核速度,而诸如视频编辑之类的应用程序则取决于核心数。 就市场上可用的产品而言,所有CPU似乎都具有大致相同的速度,主要区别在于更多的线程或更多的内核。

For example:

例如:

  • Intel Core i5-7600K, base frequency 3.80 GHz, 4 cores, 4 threads

    Intel Core i5-7600K,基本频率3.80 GHz,4核,4线程
  • Intel Core i7-7700K, base frequency 4.20 GHz, 4 cores, 8 threads

    Intel Core i7-7700K,基本频率4.20 GHz,4核,8线程
  • AMD Ryzen 5 1600X, base frequency 3.60 GHz, 6 cores, 12 threads

    AMD Ryzen 5 1600X,基本频率3.60 GHz,6核,12线程
  • AMD Ryzen 7 1800X, base frequency 3.60 GHz, 8 cores, 16 threads

    AMD Ryzen 7 1800X,基本频率3.60 GHz,8核,16线程

Why do we see this pattern of increasing cores, yet all cores having the same clock speed? Why are there no variants with differing clock speeds? For example, two “big” cores and lots of small cores.

为什么我们看到内核增加的这种模式,但是所有内核都具有相同的时钟速度? 为什么没有时钟频率不同的型号? 例如,两个“大”核心和许多小核心。

Instead of, say, four cores at 4.0 GHz (i.e. 4×4 GHz, 16 GHz maximum), how about a CPU with two cores running at 4.0 GHz and four cores running at 2.0 GHz (i.e. 2×4.0 GHz + 4×2.0 GHz, 16 GHz maximum)? Would the second option be as equally good at single threaded workloads, but potentially better at multi-threaded workloads?

与其说有四个4.0 GHz的内核(即4×4 GHz,最大16 GHz),而是有两个内核在4.0 GHz下运行而四个内核在2.0 GHz(即2×4.0 GHz + 4×2.0)下运行的CPU,不如说。 GHz,最大16 GHz)? 第二种选择在单线程工作负载上是否同样好,但在多线程工作负载上可能更好?

I ask this as a general question and not specifically with regard to the CPUs listed above or about any one specific workload. I am just curious as to why the pattern is what it is.

我问这是一个普遍的问题,而不是上面列出的CPU或任何一种特定的工作负载。 我只是好奇为什么这种模式是真实的。

Why do CPU cores all have the same speed instead of different ones?

为什么所有CPU内核都具有相同的速度而不是不同的速度?

答案 (The Answer)

SuperUser contributor bwDraco has the answer for us:

超级用户贡献者bwDraco为我们提供了答案:

This is known as heterogeneous multi-processing (HMP) and is widely adopted by mobile devices. In ARM-based devices which implement big.LITTLE, the processor contains cores with different performance and power profiles, i.e. some cores run fast but draw lots of power (faster architecture and/or higher clocks) while others are energy-efficient but slow (slower architecture and/or lower clocks). This is useful because power usage tends to increase disproportionately as you increase performance once you get past a certain point. The idea here is to get performance when you need it and battery life when you do not.

这被称为异构多处理(HMP),并被移动设备广泛采用。 在实现big.LITTLE的基于ARM的设备中,处理器包含具有不同性能和功耗配置文件的内核,即,某些内核运行速度快,但消耗大量功率(更快的体系结构和/或更高的时钟),而其他内核节能高效,但速度较慢(较慢的架构和/或较低的时钟)。 这很有用,因为一旦超过特定点,功耗就会随着性能的增加而成比例地增加。 这里的想法是在需要时获得性能,而在不需要时获得电池寿命。

On desktop platforms, power consumption is much less of an issue, so this is not truly necessary. Most applications expect each core to have similar performance characteristics, and scheduling processes for HMP systems is much more complex than scheduling for traditional symmetric multi-processing (SMP) systems (technically, Windows 10 has support for HMP, but it is mainly intended for mobile devices that use ARM big.LITTLE).

在台式机平台上,功耗几乎不是问题,因此这并不是真正必要的。 大多数应用程序期望每个内核具有相似的性能特征,并且HMP系统的调度过程比传统的对称多处理(SMP)系统的调度要复杂得多(从技术上讲,Windows 10支持HMP,但它主要用于移动设备)。使用ARM big.LITTLE的设备)。

Also, most desktop and laptop processors today are not thermally or electrically limited to the point where some cores need to run faster than others, even for short bursts. We have basically hit a wall on how fast we can make individual cores, so replacing some cores with slower ones will not allow the remaining cores to run faster.

同样,当今大多数台式机和笔记本电脑处理器的散热或电气性能并没有受到某些内核比其他内核运行速度更快(即使是短脉冲)的限制。 从根本上讲我们可以使单个内核快得多,因此用较慢的内核替换某些内核将不会使其余内核运行得更快。

While there are a few desktop processors that have one or two cores capable of running faster than the others, this capability is currently limited to certain very high-end Intel processors (known as Turbo Boost Max Technology 3.0) and only involves a slight gain in performance for those cores that can run faster.

尽管有一些台式机处理器具有一个或两个内核,它们的运行速度比其他内核要快,但该功能当前仅限于某些非常高端的Intel处理器(称为Turbo Boost Max Technology 3.0),并且仅在可以更快运行的内核的性能。

While it is certainly possible to design a traditional x86 processor with both large, fast cores and smaller, slower cores to optimize for heavily-threaded workloads, this would add considerable complexity to the processor design and applications are unlikely to properly support it.

虽然可以设计既具有大型,快速内核又具有较小,较慢的内核的传统x86处理器,以针对线程密集的工作负载进行优化,但这将为处理器设计增加相当大的复杂性,并且应用程序不太可能正确支持它。

Take a hypothetical processor with two fast Kaby Lake (7th-generation) cores and eight slow Goldmont (Atom) cores. You would have a total of 10 cores, and heavily-threaded workloads optimized for this kind of processor may see a gain in performance and efficiency over a normal quad-core Kaby Lake processor. However, the different types of cores have wildly different performance levels, and the slow cores do not even support some of the instructions the fast cores support, like AVX (ARM avoids this issue by requiring both the big and LITTLE cores to support the same instructions).

假设有一个具有两个快速Kaby Lake (第7代)内核和八个慢速Goldmont (Atom)内核的处理器。 您总共将有10个内核,并且针对这种处理器优化的高线程工作负载可能会比普通的四核Kaby Lake处理器获得更高的性能和效率。 但是,不同类型的内核具有完全不同的性能水平,慢速内核甚至不支持快速内核支持的某些指令,例如AVX (ARM通过要求大型和LITTLE内核都支持相同的指令来避免此问题。 )。

Again, most Windows-based multi-threaded applications assume that every core has the same or nearly the same level of performance and can execute the same instructions, so this kind of asymmetry is likely to result in less-than-ideal performance, perhaps even crashes if it uses instructions not supported by the slower cores. While Intel could modify the slow cores to add advanced instruction support so that all cores can execute all instructions, this would not resolve issues with software support for heterogeneous processors.

同样,大多数基于Windows的多线程应用程序都假定每个内核都具有相同或几乎相同的性能水平,并且可以执行相同的指令,因此这种不对称可能导致性能不理想,甚至如果它使用较慢内核不支持的指令,则会崩溃。 尽管英特尔可以修改慢速内核以添加高级指令支持,以便所有内核都可以执行所有指令,但这不能解决异构处理器的软件支持问题。

A different approach to application design, closer to what you are probably thinking about in your question, would use the GPU for acceleration of highly parallel portions of applications. This can be done using APIs like OpenCL and CUDA. As for a single-chip solution, AMD promotes hardware support for GPU acceleration in its APUs, which combines a traditional CPU and a high-performance integrated GPU into the same chip, as Heterogeneous System Architecture, though this has not seen much industry uptake outside of a few specialized applications.

应用程序设计的另一种方法(更接近于您在问题中所考虑的范围)将使用GPU来加速应用程序的高度并行部分。 可以使用OpenCLCUDA之类的API来完成。 对于单芯片解决方案,AMD在其APU中促进了对GPU加速的硬件支持,该APU将传统CPU和高性能集成GPU与异构系统体系结构结合到了同一芯片中,尽管外界并没有看到太多的行业应用。一些专门的应用程序。



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

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

Image Credit: Mirko Waltermann (Flickr)

图片来源: Mirko Waltermann (Flickr)

翻译自: https://www.howtogeek.com/316572/why-do-cpu-cores-all-have-the-same-speed-instead-of-different-ones/