112 points · by KubikPixel · 4y ago · 28 comments
It's like trying to read the amount of gas left in the tank by looking at the odometer. Distance and fuel remaining are related, but there's no 1-to-1 connection going on there.
Different cores having different speeds is a difficult problem to solve for reporting CPU usage. The author seems to have missed the latest Intel CPUs which also have a performance/effeciency core setup, but I bet those suffer from the same "problem" as well.
Sure, but Activity Monitor has separate CPU and Energy graphs, and the author here appears to be talking specifically about the Energy graph ("According to Activity Monitor’s Energy pane") rather than the CPU one.
You also have hardware control chips like the T1/T2 that could help narrow this down even further.
I would get it for PC's, but here, it's quite different.
These are just rough estimates and can be wildly inaccurate (just like in the OSX post we're discussing). AFAIK there's no facility for actual measurement.
> On server hardware (where software-queriable power meters in the power supply are commonplace)
Are you certain these are actual meters and not just estimates done in software?
> My CPU is currently using 95W
Are you currently stressing the CPU (compiling, rendering, ...)? If you are not, the 95W figure seems suspect. (FWIW, my entire system, fans and all, uses 25W at the wall when idle. The CPU is Intel 9700k, no dGPU).
But why would they? There's no benefit for them.
https://support.apple.com/en-gb/guide/activity-monitor/actmn...:
- In the Activity Monitor app on your Mac, click Energy (or use the Touch Bar).
To display more columns, choose View > Columns, then choose the columns you want to show.
The energy use of individual apps and their processes is displayed in the upper part of the Activity Monitor window.
- Energy Impact: A relative measure of the current energy consumption of the app (lower is better).
Yes, but you could (or should) get one from Activity Monitor's energy usage graph (under the "Energy" tab).
https://devblogs.microsoft.com/oldnewthing/20210629-00/?p=10...
https://aaron-margosis.medium.com/task-managers-cpu-numbers-...
https://illuminati.services/2021/03/17/windows-10-task-manag...
Damn, that's a lot more efficient!
If your task is short lived, or constrained by I/O, affining it to E cores is going to be better so that you don't have to "race to a stop-light".
But, to take an extreme example: having a 10w CPU awake for 24hrs vs a 30w one for 7 hours is going to be less energy efficient.
But chips like the M1 with its E and P cores (or ARMs BIG.little designs) significantly change the playing field, and race-to-idle makes less sense.
Two of the places you can look to understand why running on an E core for longer is better than running on a P core for shorter, is power consumption as frequency increases, and number of computational units in each core.
Power consumption in CPU generally increases exponentially with clock frequency. So double the frequency, if 4x the power (as a very rough guiding principle), so going slow and steady can be more power efficient.
Additionally E cores will have fewer computational units (ALUs and other basic computing blocks) compared to a P core. Running a core generally means you’re powering all of it computational units, regardless of if they’re actually doing any work (modern CPU have very good power gating, but there’s a limit). So running a core with less silicon is more efficient, because portion of powered silicon doing useful work is larger.
Put all of the above together, throw in sophisticated power gating, CPU clock scaling, various on die peripherals (like media engines, crypto engines etc) and all of a sudden, simple strategies like race-to-idle stop being a good approach.
But, OTOH, if it's happening in the background while you're already using the computer, then those parts were probably going to be on anyways, so I suppose it's fairly context-dependent.
Whilst its true that all intel macs have identical cores, the latest intel architecture also has Efficiency cores that are different from the performance cores.
https://superuser.com/questions/1677692/what-are-performance...
I wonder if Xcode Instruments could be used to profile energy usage instead?
(Well, actually, for the stuff I do I almost certainly want to leave it to the OS to decide when to use which core.)
This allows the system to more quickly reach a very power efficient state, compared to leaving a weak stove on to cook a large pot of chili.