8 ms·
What Does the OS X Activity Monitor’s “Energy Impact” Actually Measure?
- qiushihe 11y agoThe first sentence of the article: > Activity Monitor is a tool that was introduced in Mac OS X 10.9. Activity Monitor was introduced with OS X 10.3 (https://en.wikipedia.org/wiki/Activity_Monitor https://en.wikipedia.org/wiki/Activity_Monitor). And was significantly revamped with OS X 10.9 to receive the various energy related measurements.
- nnethercote 11y agoI'm the author of the post. You're right. I corrected the first paragraph. Thank you for the suggestion.
- icefox 11y agoI'm surprised that the author hasn't mentioned the positive effect it has had. After upgrading the OS and seeing the new menu entries I reported a number of applications that would show up as using a lot of energy and within a few releases there was a change note usually mentioning some simple fix which dramatically reduces the wake up's of the application or removing a long running animation that didn't add any value. This little menu addition has probably helped the battery life for macbook users more than any other change.
- wmf 11y agoI suspect that's the real reason why Apple is weighting wakeups heavily and exaggerating the energy impact: it shames developers into making their apps more efficient.
- anologwintermut 11y agoExcept Chrome, which on every laptop I've ever used seems to decrease battery life by about a 1/3rd compared to Safari and is always marked as using significant power. (Currently 10.9.5 with chrome 44 on a 2014 macbook air, but I've had the issue on newer computers at work)
- icefox 11y agoIf your a developer at Google that is looking for a 20% time project here is your opportunity! Make some fixes, write it up and post about it somewhere and we will up vote your story and give you sweet HN karma. :)
- UnoriginalGuy 11y ago20% time is more or less axed[0]. [0] http://www.businessinsider.com/google-20-percent-time-policy-2015-4 http://www.businessinsider.com/google-20-percent-time-policy...
- CardenB 11y agothats not really true.
- bigiain 11y agoAt least for me, that's partly because Chrome makes it _so_ easy to "overuse" it. I'm right now writing this comment in a window with 29 tabs open, I have three other chrome windows with 22, 17, and 14 tabs open respectively. It's sitting there at 42.3 in the Energy Impact column and 32.23 in the Avg column - but to be fair it's got a whole bunch of stuff going on (two separate gmail instances and a fair few other javascript-heavy webapps as well). I've probably go more bogomips going on in this one browser window that all the machines I learnt to program on were capable of between them...
- brobinson 11y agoI'm at 47.91 average impact for FF 40.0 with uBlock Origin and Ghostery, no Flash installed. Doing local web development and poking around some news sites to read about all these market crashes. Only a few tabs open at a time for me.
- arm 11y agoHmm… comparing that to the amount of tabs and windows I have open in Safari right now (which is actually pretty low for me since I usually have more than 250 tabs open) seems to make Chrome look even worse… Specifically (running Safari v7.1 on OS X v10.9.5), I have 18 windows open containing 2, 18, 26, 16, 2, 12, 17, 13, 21, 6, 2, 2, 1, 1, 2, 1, 1, and 4 tabs for a grand total of 147 tabs. Oh, and I forgot to mention, it’s also downloading two files in the background right now. It’s showing up with 13.2 in the Energy Impact column and 4.47 in the Avg column. (Oh, and since I already have it open, I may as well mention that Firefox 39.0 shows up as around 14.7 in the Energy Impact column (although it keeps spiking to 23.9 every few seconds) and 2.99 in the Avg column with 2 tabs open in 1 window with no downloads).
- nnethercote 11y agoExposing power consumption data is a great idea. Exposing inaccurate and opaquely-computed power consumption data is a less great idea.
- agumonkey 11y agoLet's see if Cobra Effect will kick in.
- mtmail 11y agoAdding info because I didn't understand the reference. https://en.wikipedia.org/wiki/Cobra_effect https://en.wikipedia.org/wiki/Cobra_effect "The cobra effect occurs when an attempted solution to a problem actually makes the problem worse. This is an instance of unintended consequences."
- agumonkey 11y agoThanks. Cobra effect often kicks in when someone tries to rig the game positively causing people to recreate the problem to benefit from it.
- Angostura 11y agoWhat makes you think it is inaccurate?
- nnethercote 11y agoBecause I'm the author of the post that this comment thread is about, and one of my primary conclusions in the post is that "Energy Impact" is inaccurate.
- Someone 11y agoI am not sure they are weighting wakeups heavily. "but with a “tax” of 500 microseconds for each wakeup" could be a reasonable estimate of the time the OS needs after wakeup before it can hand over the CPU to the process that did the wake up. That time isn't spend in the process that wakes up the system, but can be attributed to it.
- nnethercote 11y agoThe article discusses this. Look again at the first table. Compare the power values (measured in Watts) which climb slowly, vs. the "Energy Impact" values which climb incredibly quickly. If "Energy Impact" was a good measure it would correlate closely with real power consumption. It doesn't.
- ejdyksen 11y agoI could have sworn I read somewhere that Activity Monitor also included GPU usage in its measurements—naturally, using the GPU more uses more power/battery.
- kitsunesoba 11y agoI imagine that other things like WiFi usage, disk usage, and possibly even port usage could be factored in as well.
- bigiain 11y agoI'd also guess backlight.
- untog 11y agoCan apps control backlight level? I can't recall using one that's ever tried.
- astrange 11y agoThey can't really on LEDs, though on OLED black is cheaper than other colors. But unnecessary animations (like blinking text cursors) cause the entire graphics hardware stack to wake up all the way to the display, which is a serious power cost.
- nitrogen 11y agoThe original CGA/EGA/VGA text modes had a hardware cursor blinking option; I find blinking cursors useful, so it'd be interesting if modern GPUs added a low-power animation loop feature.
- astrange 11y agoTheir power cost is actually a pretty recent development. It used to be that it didn't matter because the display refreshed every frame no matter what, but in the last few years laptop displays added panel self-refresh. If the screen becomes static for a little while, the host side can stop driving it entirely and it'll keep the same picture up. I'd guess it wouldn't be hard to keep two frames in memory, so you could get one blink at a time.
- travjones 11y agoTake home point: "In fact, POWER* is a unitless measure because it is a semi-arbitrary combination of two measures with incompatible units." *POWER = "Energy Impact."
- nnethercote 11y agoFor 10.9, POWER and "Energy Impact" appear to be the same. For 10.10 "Energy Impact" has changed.
- kevinchen 11y agoSince the formula is Power = ((used_us + IDLEW * 500) * 100.0) / elapsed_us If you believe that each idle wake costs you on average the same energy as 500us of computation, then the units are compatible right?
- grecy 11y ago> Recent Intel hardware provides high-quality estimates of processor and memory power consumption ... But the big problem is that they are machine-wide measures that cannot be used on a per-process basis. Would it not be possible for the OS to poll the CPU for these power consumption stats, and attribute the value returned to the currently running process? Over time, I think it would be possible to see how much power the Intel CPU thinks each process is using.
- nnethercote 11y agoIf you poll with high frequency you'll be causing lots of additional wake-ups which will badly skew what you're measuring.
- pjc50 11y agoIdeally you'd do an accounting update on task switch, along with all the other housekeeping. Then you don't need to do any polling. There's a "process accounting" infrastructure which perhaps could be adapted for this.
- cbsmith 11y agoWakeups are a bit tricky to actively measure, because with the Power Nap feature, the actual # of wakeups triggered by a particular application is a bit trickier to measure and varies based on what other activities are going on the system. In general, from the get go, it is a bit of a myth that you can really know how much of a power budget is a consequence of a particular application. You can get a rough sense of relative impact on the overall power budget, but even that can be seriously skewed by a LOT of factors. At best, you can get a sense of, "if I sampled at the moment power stores hit a multiple of X, how often would I see the system doing something on behalf of each app that was draining power at that moment". Even that, is bloody hard to pull off, but it is your best "rough" approximation of what is going on.
- digitalengineer 11y agoIs there anything like this for iOS? I'd love to know the consumption of energy (and data) for all my iOS apps!
- shalmanese 11y agoPower: Settings->General->Usage->Battery Usage Data: Settings->Cellular, scroll to the bottom
- rainforest 11y agoWork in bootstrapping energy consumption exists in academia; for example Pathak et al[0]. The changes in 10.10.4 could be an implementation of something along the same lines, by fitting a model to the measured power consumption. As comex notes in the comments on the article, there appears to be a table of weights for various features, presumably obtained by regression. [0]: http://research.microsoft.com/en-us/people/mzh/eurosys-2012.pdf http://research.microsoft.com/en-us/people/mzh/eurosys-2012....
- AnthonBerg 11y agoSurely we can also measure actual heat and actual electricity usage? If not per program obviously, then as a reference or benchmark or calibration.
- AnthonBerg 11y agoDownvote? Let me rephrase: There are temperature and battery charge sensors in the machines. We can use these to better calibrate the "virtual" energy usage metrics.
- DasIch 11y agoThese only help you determine the state of the entire system. They provide no information about the impact individual applications or processes have especially not relative to each other.
- kec 11y agoYou can't use temperature to accurately model power consumption, if for no other reason than that it's too heavily influenced by environmental factors. "Battery charge" sensors are problematic because they're hard to keep in calibration without interrupting normal operation of the system.