Last Week on My Mac: Power throttle

0

Little attention seems to have been paid to Power Modes for Apple silicon chips, the topic that has occupied me for much of last week. Although we’ve been aware that High Power mode is largely about more aggressive use of cooling fans to extend periods performing highly demanding tasks without overheating, little has been known about what changes in Low Power mode, and in which models it’s available.

I’ve spent a great deal of time over the last four years rummaging around in Apple silicon CPU cores trying to understand how they’re controlled by macOS, both in terms of core allocation and in their management. It turns out that Low Power mode, at least in M4 Pro chips running macOS Sequoia, is more complicated and interesting than other behaviours I’ve seen over that time. The big surprise in the last week came when I ran core-intensive tests in Low Power mode.

Many conventional processors normally run at their intended ‘clock speed’ or frequency, some can also be run for short periods at a higher boost frequency, and all should have their frequency reduced to limit heat production, usually known as thermal throttling. CPU cores in Apple silicon chips have a maximum frequency, but are often run slower. In the case of the P cores in an M4 chip, they can be shut down altogether at 0 MHz, idle at 1,260 MHz, peak at 4,512 MHz, or run at any of 17 intermediate frequencies.

Frequency, with the related supply voltage, determines a core’s rate of instruction execution, power use, and heat production. If Low Power mode does really use significantly less power, then one powerful mechanism for achieving that is to reduce P core frequency, but that has the consequence that processing will also slow down.

This graph shows power used by CPU cores when running 1-14 demanding test threads in Low Power mode. When in Automatic mode (shown here), each additional thread up to a maximum of ten required about 3 W when run on P cores. In Low Power mode, for 1-5 threads, each required significantly less power, at 2.5 W. There was then a transition at 6 threads, and from 7 threads upwards power use was constrained to about 14 W, rather than climbing to the peak of over 32 W measured in Automatic mode.

This suggests Low Power mode applies two different regimes of cluster frequency management: for 1-5 threads, P core cluster frequency is fixed at 3,624 MHz, lower than in Automatic mode, and accounting for the difference in power use. With more threads, frequency is progressively reduced to as little as 2,616 MHz to limit CPU core power use to about 14 W regardless of how many threads are run.

These two frequency controls are applied in different ways. The upper limit on P core frequency at 3,624 MHz is imposed immediately threads are being loaded, before they’re even run, but the 14 W limit comes into force more gradually. That allows power use to rise to more than 20 W at first, then for the frequency to be steadily reduced until power use reaches 14 W, although the intent could be to limit core temperature rather than power.

One way to tell these apart is to look at the dynamics of frequency management in each of the two line segments, here using 4 threads to characterise the first, and 8 threads for the second. Sampling periods for measurements need to be as short as possible, here the 24 millisecond (0.024 seconds) minimum available in the powermetrics command tool.

This graph shows CPU core power use, core frequency and ‘total active residency’ for 4 threads run in Low Power mode. If you’re unfamiliar with the last of those, there’s an explanation at the end of this article.

Core frequency rose to reach its 3,624 MHz limit within 0.1 second of the start of the test, before test threads were even running on the cores, and before the red power line reached its peak of just over 11 W. This frequency is therefore set by macOS as a rule when Low Power mode is active, and reduces power use across all P cores.

Those four threads ran in a single cluster of five P cores, the fifth core handling the code wrapping the test, powermetrics and other overhead. When running 8 threads, five fully occupy one cluster, leaving three to run on the second. As a result, the graphs contain separate lines for frequency and total active residency of the two clusters. I’ve divided them up to aid their understanding.

This shows cluster frequencies and total active residencies, with the first P cluster in black, and the second in red. By about 0.1 second, the test app and macOS are preparing to run the eight threads. Cores in the second P cluster are already running the code to do that, and that cluster frequency is brought up to the limit of 3,624 MHz. Just as the threads are about to start running on both clusters, the frequency of the first cluster is rapidly raised to 3,624 MHz as well.

Over the following 0.2 seconds, frequencies of both clusters are steadily reduced to 3,096 MHz, then hunt between 2,987 and 3,096 MHz. Just before 0.9 seconds, threads are moved across from the second cluster to the first, to ensure their load has been shared.

This graph shows cluster frequencies with CPU core power. With the early high limit of 3,624 MHz, power exceeds 20 W for about 0.05 seconds before being reduced by reducing frequencies, reaching a steady value of around 14 W at 0.4 seconds, and hunting below that.

Assuming that this second behaviour is regulated by macOS during Low Power mode, it’s consistent with a control system that is regulating power use or a related variable such as temperature, by adjusting cluster frequency. If you like, it’s a form of power throttling to keep the CPU at a point set by the Power Mode, in this case well below the power that can normally be handled, so the Mac’s cooling fans aren’t required to spin up, increase noise, and draw more power themselves. The penalty is that when more than five test threads are run simultaneously, time required to complete them increases. This is the familiar trade-off between performance and efficiency.

What I don’t know is how common these two behaviours are to other Apple silicon Macs. Apple’s most recent list of models that support Low Power mode omits many that have Low Power available as an option, including most if not all notebooks (including Intel models, which presumably work differently), and some desktops. I can’t believe that Apple doesn’t know which models support these behaviours, so hopefully its support note will be updated to correct the information it provides.

Explainer

Residency is the percentage of time a core is in a specific state. Idle residency is thus the percentage of time that core is idle and not processing instructions. Active residency is the percentage of time it isn’t idle, but is actively processing instructions. Down residency is the percentage of time the core is shut down. All these are independent of the core’s frequency or clock speed.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.