KM seems to be using a fair bit of energy, even when I'm not explicitly running macros. Anyone else?
Not for me.
But remember that the numbers are relative rather than absolute, and it'll really depend on what you're doing with KM. A "Pause Until" in a macro will have an energy impact, scripts in a "Execute Shell Script" Action will be included, remote triggers need the network connection kept alive, even a simple "Display Dialog" or "Prompt for User Input" will spike the number.
And if you've a lot of context-dependent Group activation -- especially if palettes come and go -- then every app (or even window) switch will cause significant activity.
Have you got a bunch of macros that run on login/wake? That would exaggerate KME's impact early in your working day -- 40% of total power used now might be only 10% in 6 hours' time.
Generally, the only time you get high CPU usage out of Keyboard Maestro Engine is when it is actively performing a task.
It will do this if you are executing a macro (especially bad can be Pause Until since this will continuously check things). Check the Keyboard Maestro status Cancel submenu to see what macros are currently running, as well as the recently executed macros (select the All Macros group and sort the macros by macro execution).
If will also do this if there is an action editor displayed in the Keyboard Maestro editor which is live evaluating an expression. Eg, an If Then Else action. Since the displayed "(currently true)" or "(currently false)" condition is updated every second, even if the macro is not executing, if the condition is displayed in the Keyboard Maestro editor, it is still performing the test and if the test takes some processing time, that will use CPU.
Cancel the appropriate macros, add timeouts if necessary so they don’t recur, and don't leave the Keyboard Maestro editor displaying such an action (quit it, or undisclose the actions, or deselect the macro).
I just checked and no macros with any conditional pauses have run today. I also don't usually have live condition results turned on, and haven't used the Editor today anyway.
I do have a couple of macros that run on wake, but they abort early if I'm not in my studio (I'm not). I also have a macro that triggers when any application activates (to recall its window position once per session), but it doesn't contain any conditional pauses.
I won't worry too much about it, but it did strike me as odd.
But what have you done today?
All those numbers really tell you are that, for example, KME has used 1.5 times as much "power" as Brave. But if Brave hasn't done much, KME hasn't done much more.
They don't mean that KME has used ~20% of your battery in the last 12 hours. You'll see that kernel tasks aren't included in the list (presumably on the basis that the user can't [shouldn't?] Quit them to save battery), including stuff like sysmond and backupd -- it may be that you've browsed one web page, run two macros, and the rest of your actual power usage has been Time Machine and Spotlight indexing!
I'm in the middle of refurbishing my flat, so today I've...
- edited and printed a Google Sheets document (of all the building snags left to run through).
- Googled a few parts and accessories I still need to buy.
- Spent about 30min updating KMDeck.
- Come on the forum to whine about power usage.
My TM drive isn't plugged in and I doubt Spotlight would have much to do today as I haven't created, moved or removed any files.
Just for comparison, my KM Energy Impact is 0.2 and 12 hr Power is 11.09 at idle (no macros running).
How long has this been an issue? Have you restarted the Mac recently?
I just noticed my battery draining a bit faster than usual in the last few days. I "upgraded" to Tahoe last week, so I wonder if that's a factor?
That'll cause a (background) Spotlight re-index, so it could be still chugging away at that.
Oh wow, even a week on? OK I'll let it do its thing and check back in later. Thanks Nige.
It smells like it, doesn’t it.
Could that implicate KM in the eyes of Activity Monitor, though?
Surely not… even under Tahoe..? ![]()
![]()
Restart if you haven’t done so since the “upgrade”, if only as a test and to rule it out as a fix.
Again, that's activity relative to the other "user" apps. If KME is doing the same as usual (background periodics, etc) but not much else is happening, that number will be high. Same amount of KM action while the user is hammering web pages, working away in Logic, and rendering from Da Vinci -- that number will be low.
"It depends."
Computer speed, amount of data, number of photos, whether external drives are being indexed, how long the machine's been awake during the last week, etc, etc. I'd usually expect it to be finished by now, but mdworker activity is the first thing I'd check in the weeks after an upgrade (rather than update). T'was ever thus, not just a Tahoe thing.
That’s true of the percentage number, of course, but is there not general agreement that the “12 hr Power” figure is higher than one would expect? (That is not to assert that any such expectations are fully informed, but just that this does not appear to be just a matter of dividing the cake.)
Would excessive mdworker activity not make KM’s percentage look relatively better rather than worse? That’s unless Activity Monitor conflates the statistics somehow…
Aye, this is what was looking at, particularly when you consider that Brave isn't that well optimised for power usage and will usually be the highest scorer.
That is, apparently, a 12-hour average of the "Energy Impact" number -- so still relative to other apps. And the whole lot is relative to something, though I've no idea what -- it's obviously not "% of energy used" -- and everything I've found on the web is frustratingly vague.
Mind you, everything -- including Activity Monitor's "Help" -- also says that the 12hr power column "only appears on Mac laptops". Tell that to my iMac!
Yes, I think it's high -- KME on my iMac is 0.59 out of ~120 on the 12-hour average -- but that doesn't mean it is, that might just be how usage has been for the last 12 hours. You could probably get some really wacky figures if you Quit everything but Safari and Finder, closed all windows in both of those, then ran a macro that executed system_profiler every minute for 12 hours.
So worth checking there aren't background macros running amok, endlessly looping, recurrently triggering, and so on -- maybe something that's got broken by Tahoe (a new data point in this) -- but not in itself necessarily "bad".
Same usage pattern, previously low impact, now very high -- that would be a cause for concern.
That, and other kernel tasks, aren't included in the energy impact stats.
Another factor that just came to mind is that we've just had the networking redone here and the mesh isn't great. I've noticed my phone often hangs on to a weaker signal from another room rather than switches to a nearer one. The same might be happening to my mac, although I generally don't move it around much. Perhaps it's working harder than usual to cling on to my wifi signal, and this is draining the battery faster...?
Yes… Perhaps you also saw this old article which explores the whole subject of “energy impact” and which concludes in the update at the end that, under OS X 10.10 and 10.11:
the formula used to compute “Energy Impact” is machine model-specific, and includes the following factors: CPU usage, wakeup frequency, quality of service class usage, and disk, GPU, and network activity.
Well, even if the formula has been changed since then, the lesson is indeed that figures are for narrow comparative purposes only. That’s rather disappointing!
I think that means that your idea about mdworker doesn’t apply (and as I mentioned, I think if it did it would make KM’s energy usage look relatively better)—but I may have missed a nuance to your argument there, and either way… well, the conclusion overall seems to be to not worry too much about what Activity Monitor says, other than when processes go crazy?
Do you have any macros that would relate to that situation?
As for energy use across the board, I suppose your best guide would be an electricity power usage meter, by which I mean those units that are plugged into the mains socket before the Mac.
