Reading view

There are new articles available, click to refresh the page.

Last Week on My Mac: What do those CPU frequencies mean?

Having waded through dozens of CPU core frequencies for all current members of the M-series families of chips, you might be wondering what they mean for someone considering buying a new Mac. Is the M5 going to prove any faster than an M4, or should they wait until M5 Pro or Max variants become available?

All else being equal, a core that runs at a higher frequency should process instructions more quickly than a similar core running at a lower frequency. But these figures only apply to the CPU cores, and much of their most demanding code is now run on other co-processors and components, including the GPU and neural engine (ANE).

The M5 has specific enhancements to its GPU to accelerate its performance when running compute tasks that can be common in AI and other advanced code. That GPU runs Metal code, and because that’s compiled and prepared by the CPU cores, to obtain maximum performance from its enhanced GPU the CPU cores also need to perform well. CPU cores play other key roles in supporting specialist components, so matching their performance is essential to avoid bottlenecks and achieve balance. One consistently important factor is the speed of memory access: the faster everything goes, the faster data has to be moved around, and that’s why minimising movement using Unified Memory can prove so important, as is the M5’s faster bandwidth of 153 GB/s, compared with 120 GB/s in the base M4.

There’s also more to CPU core performance than just frequencies. Cores can execute instructions out of order, predict load addresses and values, and pull other tricks to ensure that best use is made of every clock cycle. For the M5, Apple has singled out claimed improvements in multithreaded performance, enabling a single core to run multiple threads significantly faster.

Looking just at CPU cores, the table above compares all the M-series chips released to date, ignoring ‘binned’ and other cut-price sub-variants. Columns labelled Σfn are a crude indicator of performance capacity for the whole CPU, obtained by totalling numbers of cores multiplied by their frequency,
(P x fP) + (E x fE)
where P and E are the numbers of P and E cores, and fP and fE are their respective maximum frequencies. It’s here worth mentioning what a monster the M3 Ultra is in comparison to any other M-series chip.

Because M5 core frequencies don’t currently include Pro or Max variants, those given are starting points. I’d expect to see P cores in the M5 Pro and Max variants reach a maximum frequency of at least 4.7 GHz, although their E cores may be restricted to a lower maximum than the 3.05 GHz of the base variant, to ensure they achieve good economy, as for the M4.

Base variants in Apple’s M-series chips have the fewest P cores in each family, only 4, typically half the number of their Pro variant. Although those should be ample for much of the time, when there are too many high priority (Quality of Service) threads running for user apps, some may overflow to be run on the E cores instead. This is where those frequency tables come into play, as those E cores will be run at higher frequencies to compensate. As the maximum frequency of the E cores in an M5 (3048 MHz) is significantly higher than that of a base M4 (2892 MHz), the base M5 should run those overflowed threads faster.

Another important aspect of the M5 that isn’t clear yet is which version of the Arm Instruction Set Architecture (ISA) it supports. The M4 surprised us with its support of the Armv9.2A ISA, and this year’s A19 and M5 chips are believed to support 9.4A or possibly 8.7. This is particularly relevant to security, as either of those should bring support for Arm’s Enhanced Memory Tagging Extension, which is required to support Apple’s new Memory Integrity Enforcement (MIE), already announced for the A19. Early reports are that the M5 does indeed support the required ISA and its extension, ready for the implementation of MIE in the coming months, if it’s not already built into macOS 26 Tahoe.

Like much else in the base M5 chip, frequencies and features are largely evolutionary, but its enhanced support for GPU compute, faster memory and improved multithreaded performance should deliver substantial improvements. If it’s also the first Mac chip to support Apple’s new security feature MIE, the base M4 is outclassed.

Updated CPU core frequencies for all current Apple silicon Macs

Thanks to your overwhelming response to my appeal for information about CPU core frequencies in M3 Ultra and M5 base chips, this article updates the data to cover those new models in addition to all previous M-series chips.

Performance (P) and Efficiency (E) CPU cores in Apple silicon Macs are run at a range of different frequencies so they can deliver optimum performance with a minimum power and energy use. Cores are grouped into clusters of 2-6, and macOS sets the frequency of each cluster according to workload, Quality of Service, power mode and thermal status. Maximum frequencies differ according to the family, variant within that family, and between E and P cores. Current values are:

  • M1 E 2064 MHz or 2.1 GHz; P 3228 MHz or 3.2 GHz;
  • M2 E 2424 MHz or 2.4 GHz; P 3696 MHz or 3.7 GHz;
  • M3 E 2748 MHz or 2.7 GHz; P 4056 MHz or 4.1 GHz;
  • M4 E 2892 MHz or 2.9 GHz; P 4512 MHz or 4.5 GHz.
  • M5 E 3048 MHz or 3.0 GHz; P 4608 MHz or 4.6 GHz (base variant only).

As Pro and Max variants may have higher frequencies than base variants, it’s likely that future M5 Pro or M5 Max chips will be able to run their P cores at a higher maximum frequency than today’s base M5 chip.

The full table of frequencies reported by powermetrics is:

This is available for download as a Numbers spreadsheet and in CSV format here: mxfreqs1025

Earlier this year I published a detailed analysis of frequencies in the M1 to M4 families. The only addition to those is the M3 Ultra, whose frequencies are the same as those of the M3 Max, so they haven’t changed. The remainder of this article concentrates on the base variant in each family, from M1 to M5, the chips that power the most popular models and set the standard for what most folk will experience.

Frequency range

Over the last five years and five families of chips, their frequencies have increased steadily, as shown in the charts below. Each bar in those charts spans the range of frequencies from minimum (idle) to maximum, for the base variant in that family.

Idle frequency in E cores has risen from 600 MHz to 972 MHz, a rise of over 60%, and their maximum frequency has risen from 2064 MHz to 3048 MHz, a rise of nearly 50%.

P cores have seen more substantial change. Their idle frequency has risen from 600 MHz to 1308 MHz, a much larger rise of nearly 120%, and their maximum frequency has risen from 3204 MHz to 4608 MHz, just under 50%. The M5 is notable for its greater rise in idle frequency, and lesser rise in maximum frequency.

Frequency steps

Rather than macOS set an arbitrary frequency, it selects one from a list of steps that are distinctive to that family and variant. Looking at the table of frequency steps it might be easy to assume those numbers are chosen arbitrarily, but when expressed appropriately I think you can see there’s more to them.

To look at frequency steps and the frequencies chosen for them, let me explain how I have converted raw frequencies to make them comparable.

First, I work out the steps as evenly spaced points along a line from 0.0, representing idle, to 1.0, representing the core’s maximum frequency. For each of those evenly spaced steps, I calculate a normalised frequency, as
(FmaxFstep)/(FmaxFidle)
where Fidle is the idle (lowest) frequency value, Fmax is the highest, and Fstep is the actual frequency set for that step.

For example, say a core has an idle frequency of 500 MHz, a maximum of 1,500 MHz, and only one step between those. Its steps will be 0.0, 0.5 and 1.0, and if the relationship is linear, then the frequency set by that intermediate step will be 1,000 MHz. If it’s greater than that, the relationship will be non-linear, tending to a higher frequency for that step. The following charts compare those normalised frequencies with steps evenly spaced between idle and maximum frequencies.

This chart shows normalised frequencies and steps for E cores in base M1 and M5 chips, the latter in red. It shows how, over those five years, the number of steps (available frequencies) has increased. In the M1, the frequency selected in the middle of its five steps was half-way between idle and maximum. Not only does the M5 have more intermediate frequencies available, six instead of three, but frequencies used in the upper half of its steps are higher than in the M1 (when normalised).

This tends to boost higher frequencies used for running threads that can’t be accommodated on P cores, while running background threads at slightly lower frequencies than would be expected when at frequencies close to idle, as they are.

These curves have undergone evolution across different families, as shown here in a composite of the curves for all five families. The red curve of the M5 deviates more from the M1’s straight line of identity than any of the others, particularly at the top end.

The equivalent comparison between frequencies of P cores in M1 and M5 chips shows a different picture. The M1 is again the simpler, being linear until it reaches a step of 0.8, while the M5 has higher frequencies in all except the top few values.

Shown here alongside curves for all earlier families, the red curve for the M5 has higher frequencies for every step apart from the last few.

Taken with the trends seen in the frequency ranges (bar charts above), these demonstrate that the M5 is designed to improve performance by increasing the frequencies used to run threads with higher Quality of Service, as opposed to background threads.

Conclusions

  • CPU core frequencies in the M3 Ultra are the same as the M3 Max.
  • The base M5 continues the trend for higher frequencies in both E and P cores, with a marked rise in P core idle frequency.
  • More subtle changes in intermediate frequencies boost them for higher frequencies of E cores, where they’re likely to improve performance of threads overflowed from P cores.
  • Intermediate core frequencies continue to be selected to optimise performance and power use.

Updating CPU frequencies for Apple silicon Macs

Apple silicon chips are designed to minimise the power and energy they use without compromising their performance. One of the many tricks they use is to run the cores in their CPUs at variable frequencies, and in more recent models to shut down those cores they don’t need. At the start of the year, thanks to the many who contributed information about their Macs, we were able to assemble a table of CPU core frequencies for all the M-series chips then available. Those demonstrated that frequencies differed between families such as M1 and M2, and between models within each family such as M2 Pro and Max, as well as between P and E cores.

Since then Apple has released two new chips, the M3 Ultra available in the current Mac Studio, and most recently the base M5 that has recently been impressing so many. This article briefly reviews what we know about CPU core frequencies, and appeals for information about those two new chips.

The best way to discover which frequencies are supported by the P and E cores in the CPU of an Apple silicon chip is using the output of the command tool powermetrics. This lists frequencies for P and E cores, and this article assumes that those it gives are correct. Although it’s most likely that these frequencies aren’t baked into silicon, so could be changed, I’ve seen no evidence to suggest that Apple has done that in any release Mac.

Frequencies

If powermetrics is to be believed, then the maximum frequencies of each of the CPU cores used in each generation differ from some of those you’ll see quoted elsewhere. Correct values should be:

  • M1 E 2064 MHz or 2.1 GHz; P 3228 MHz or 3.2 GHz;
  • M2 E 2424 MHz or 2.4 GHz; P 3696 MHz or 3.7 GHz;
  • M3 E 2748 MHz or 2.7 GHz; P 4056 MHz or 4.1 GHz;
  • M4 E 2892 MHz or 2.9 GHz; P 4512 MHz or 4.5 GHz.

However, not all variants within a family can use those maximum frequencies. The full table of frequencies reported by powermetrics is:

This is available for download as a Numbers spreadsheet and in CSV format here: mxfreqs

Why those frequencies?

Depending on workload, thread Quality of Service, power mode, and thermal status, macOS sets the frequency for each cluster of CPU cores. Those used range between the minimum or idle, and the maximum, usually given as the core’s ‘clock speed’ and an indication of its maximum potential performance. In between those are as many as 17 intermediate frequencies giving cores great flexibility in performance, power and energy use. Core design and development uses sophisticated models to select idle and maximum frequencies, and evidently to determine those in between.

Looking at the table, it would be easy to assume those numbers are chosen arbitrarily, but when expressed appropriately there are patterns. Apple’s engineers have clearly put considerable effort into picking optimised frequencies for each of the families and variants within them. If you think this is fine detail and only the maximum frequencies count, then bear in mind that both P and E cores spend a lot of their time running at those intermediate frequencies.

How to report frequencies

If you have a Mac Studio M3 Ultra or MacBook Pro M5 you can add to this collection, please open Terminal and run the command
sudo powermetrics -n 1 -s cpu_power
which then prompts you for your admin password. A few seconds later the window will fill with a single set of measurements looking like this:
mcorefreqsx

All I’d like is a copy containing 3 lines from that:

  • Machine model at the top, to tell me which Mac it is, thus which chip.
  • E-Cluster HW active residency, which contains a list of frequencies for the E cores.
  • P-Cluster HW active residency, which contains a longer list of frequencies for the P cores.

To help, I have highlighted those three lines in the screenshot above.

Thank you.

人类大脑是单线程的吗?

作为人类,我不太愿意接受「大脑是单线程的」。但是很多时候我盘算着要做甲乙丙丁好多件事,但是最终发现只能一件一件去做,怎么解释?

这十来天我一直在做一款游戏。做游戏,怎么理解都可以,构思、编写、制作一款游戏,同时这个过程对我来说也是在做游戏,玩游戏。因为水平太差,一开始倒算平稳推进,但是到了这个游戏有了世界、人物、地图之类的功能划分,就时常在关闭程序时卡住,我把错误日志复制出来去查原因,发现是一种叫做死锁的问题。意思大致上就是,为了防止一个人物增加游戏世界里的某个物品数量时,另一个人物减少同一物品,没法清算到底结果是多少,所以给这个物品加了个锁,要增减都得先开拿到锁,把自己锁在里面才能操作,免得这个时候别人篡改数据。但是问题就是复杂逻辑里,有许多数据变动是嵌套的,最终导致:一个人把甲锁住,打算修改完乙才解锁;与此同时另一个人则是锁住了乙,打算修改完甲才解锁乙。两人僵持不下,谁也动不了。

上述例子里的人,就是所谓线程,设计合理的线程应该并行不悖。锁尽量开小一些,操作什么数据就只锁住那一个数据……总之,如果不愿意接受大脑是单线程的,大概就只能接受,大脑进化得不够好,锁太大,在思考游戏如何设计时,就完全无法同时完成博客构思。两件事的思绪其实同时都在飞,但是妳选择游戏这个线程,就同时锁住了思绪「产生、梳理、记录」三个区域,其他思绪可能还会随时迸发出来,但是迸发然后消散,总是无法完成最终想要的那个成品。这很让人恼火,但是,事情还是只能一件一件去做。

fin.

伪需求

最近小半年来因为工作的问题作为销售外勤的我也经常需要用到电脑处理些许文档了,有几次遇到过临时紧急的需要弄一个文档的时候只能在外面找个网吧临时对付一下。有过几次这样的经历之后就有了买台笔记本放包里用的想法,加上去年已经解决了温饱问题,兜里有一点点可以支配的私房钱了,于是就正式的开始选购起了笔记本,原则就是轻便和能打开一些复杂的报表就可以了。

考虑到数码产品“买新不买旧,除非钱不够”的原则,最开始是打算买个 ThinkPad X 系列,毕竟这个牌子是我用上电脑就接触到的第一个品牌。但是看了下新款的价格,以及老款那种傻大黑粗的造型,最终是在同城论坛买了个 2020 款的丐版 M1 的MacBook Air。买来前两天还是有些不习惯的,因为很多在 Windows 上用得得心应手的快捷键到了 macOS 上就变了,但是 macOS 下的 Office 软件对应的快捷键和 Windows 下又是一样的,为了减轻本来容量就小的脑子的负担,只能把快捷键映射成和 Windows 下一样的操作。

恰好家里的台式机还是 10 年前的联想扬天一体机,i3 4130的性能已经不堪用了,打开个 5M 左右的 Excel 报表都要转半天。笔记本都升级了,台式机也升级一下吧,又花了 400 块在同城买了一台 8100T+16G+256G 的主机,又在京东花了 1399 买了个杂牌的 23.8 寸 4K 显示器。这个后面觉得买亏了,没有 VESA 接口上不了支架,同等价位下都可以买到底端品牌的 27“ 4K 了。不过作为穷人要有穷人的觉悟,用一句“又不是不能用“就能简单的安慰自己。现在作为天选打工人再也没有什么能够阻挡我随时随地的工作了。

正常用了一个多星期,在网上看了些视频说是乞丐版的 MacBook Air 剪辑视频会很卡,至少需要 16G 以上的内存才能流畅使用。为什么会有这样的需求呢,因为打算把娃每一年的视频和照片剪辑到一起,方便分享给家里人看。但是考虑到“买都买了”、“又不是不能用”的时候,只能从其它方面入手解决这个问题了。

新买的 i3 8100T 不是正好 16G 的内存嘛,可以用来 Hackintosh ,再认真的了解了一下之后现在的 Hackintosh 安装已经不像几年前用变色龙、Clover 那么复杂了。使用 Opencore 简单的配置一下就能启动起来,剩下的细节问题就看在不在乎了,如果不在乎所谓的“完美”配置,只要能启动就起来就是能正常使用的。于是又在小黄鱼上买了 200 块买了张“拆机”RX570 8G 显卡,其实都明白这是个 RX470 矿渣刷出来的,但是本着“又不是不能用”的心态,买家卖家都看破不说破了。其实说不定 i3 8100T 自带的核显 UHD630 都是够用的。这么配置下来性能强于 2018款的 Mac mini,约等于同配置的 2019 款的 iMac,而且我这个算上显示器还不到 2000 块,真是划算呢。

因为这台算上显卡 600 块买的这台主机没有 M.2 接口,上不了 NVME 的固态硬盘,又打算把主板处理器主板硬盘升级一下,打算升级到 i5 8500 和带 M.2 接口的主办以及 500G 的 NVME 硬盘,预计花费 700 左右。虽然 10 代处理器是最后能完美使用核显装黑苹果的处理器,但还是那个买新不买旧除非钱不够的原则只能考虑 8 代。

又在网上看到了 18-19 款的 MacBook Pro 下半身,想着有 4K 显示器了可以高一个来玩玩,预计又要花费 1500 左右。

这么一折腾的话目前家里的台式主机花了 600 ,显示器 1400,笔记本 3600,准备更新的配置的台式机预计花费 700,苹果无头骑士 1500,这样算下来我就得到了一台性能将就的 PC 机,1.5 台 Mac 电脑,总计将会花费 8000。

眼看着购物车里的东西越来越多,回过头来我只是想有个能移动处理工作的笔记本和同时能把熊孩子平时的照片视频素材剪到一起的工具而已。更何况都还没有用现有的设备尝试能不能完成自己的需求,因为下载好的“剪映”软件图标下到现在都还有个小蓝点(还没打开过),淘宝买的共享 ID 下载的 FCPX 也同样没有打开过(还没用过就不算用盗版吧)。

很突然的,我觉得应该打住了,都本命年的人了不应该由着自己的想法来,看是的看看自己的真实需求,不用用一些借口来创造伪需求。就像之前玩无线电、学钓鱼、骑摩托车一样,都是刚刚开始用就已经无限预算的想买买买了,更何况我到现在为止做什么都是三分钟热度。

及时的通过其它方式转移注意力,这两天又迷上了通过脚本来签到各种 APP 的玩法,换个其它东西吸引注意力之后就不会花太多的心思来想折腾电脑的问题了,毕竟只是工具。

❌