10 ms·
Power Wastage on an Idle Laptop
- ryanolsonx 11y agoI wonder if anyone will do an analysis like this for Mac
- pkaye 11y agoOn (recent) Macs, they have the Energy Impact numbers on the Activity Monitor. It can give a metric on which applications are taking up the most energy. However it doesn't show many of the system processes...
- msbarnett 11y agoView Menu -> All Processes. It's only showing you Applications from the last 8 hours by default.
- Someone 11y agoThe menu of the battery status indicator also shows a summary of this, if there are applications that are using lots of power (see https://support.apple.com/en-us/HT202776 https://support.apple.com/en-us/HT202776)
- masklinn 11y agoFor those interested in the way Energy Impact is computed: https://blog.mozilla.org/nnethercote/2015/08/26/what-does-the-os-x-activity-monitors-energy-impact-actually-measure/ https://blog.mozilla.org/nnethercote/2015/08/26/what-does-th... In 10.9 it was a simple function of on-CPU time and wakeups with each wakeup counted as 500µs of CPU time, in 10.10 a bunch of new counters were added (with machine-specific conversions to CPU time estimates) variables were added to the mix: whether the process was in "background" QoS, the number of disk read/writes, GPU usage and network activity (in packets#)
- Bud 11y agoYou kinda don't need to, because unlike Microsoft and Lenovo, Apple doesn't load down its computers with undisclosed crapware that the user neither needs nor requested.
- mwcampbell 11y agoBut unless Mac OS X becomes as strict about background processes as iOS, third-party applications can still waste energy.
- Angostura 11y agoApple did some lovely stuff with OSX Mavericks that at least tries to mitigate this http://arstechnica.com/apple/2013/10/os-x-10-9/12/ http://arstechnica.com/apple/2013/10/os-x-10-9/12/
- icefox 11y agoAfter they added the menu telling me which 3rd party apps were wasting energy I reported bugs to them all and within about a year they had all removed whatever polling code and they dropped dramatically in power usage, today Google Chrome is the only 3rd party app that I use from time to time that drains my battery.
- gmac 11y agoIf you really can’t figure out how to avoid polling then be smart about it. Waking up every second may seem very conservative, but if every long running program does it then your CPU may get woken up dozens of times per second. My understanding was that this shouldn't be true since Windows 7 (and on Mac, since Mavericks): https://en.wikipedia.org/wiki/Timer_coalescing https://en.wikipedia.org/wiki/Timer_coalescing
- brucedawson 11y agoThe rules on timer coalescing are complex and they depend on the details of the timers. So, the timers may get coalesced, but it's hardly guaranteed, especially if the different wakeup frequencies are slightly different. I suspect very few programs are using SetCoalescableTimer, but I'll add that as a suggestion.
- ldom66 11y ago"I have a special set of skills and if you violate these rules then I will hunt down your process and kill it." Great writing
- lorenzk 11y agoIt's a quote from 96 hours: "Bryan: [...] But what I do have are a very particular set of skills, skills I have acquired over a very long career. Skills that make me a nightmare for people like you. If you let my daughter go now, that'll be the end of it. I will not look for you, I will not pursue you. But if you don't, I will look for you, I will find you, and I will kill you." Source: http://www.imdb.com/title/tt0936501/quotes http://www.imdb.com/title/tt0936501/quotes
- sandebert 11y agoTypo? It's from Taken.
- cellularmitosis 11y agoLooks like you are both correct: https://de.wikipedia.org/wiki/96_Hours https://de.wikipedia.org/wiki/96_Hours
- kyberias 11y agoHow does that link prove anything?
- ajford 11y ago> "96 Hours (Originaltitel: Taken)"
- cellularmitosis 11y agoThe first four words on that page are "96 Hours (Originaltitel: Taken)". I don't speak any german, but I have a pretty good idea of what that means.
- evmar 11y agoIf you're on Linux and jealous: a similar (but different in a lot of ways too) tool for doing an analysis like this is called "powertop".
- jsnell 11y agoI've never gotten useful results from powertop. The model it builds to correlate system events vs. observed power usage always diverges with reality very quickly. In the good case it'll just do something a little silly like conclude that the CPU fan is the ultimate source of all power consumption. In the bad case it'll be something like think that a pair of linux veths uses 3kW (not a typo) of power.
- Svenstaro 11y agoI've gotten pretty good results on my all-Intel laptop.
- _yy 11y agoThe estimates may be off, but the raw data it reports (context switches, wakeups etc.) is accurate.
- deleted 11y ago[deleted]
- jkot 11y agoI have good experience with powertop.
- smcl 11y agoI was the same - mixed results at best. I figured that manually playing with this all the time was the wrong solution and installed TLP instead which seems to work pretty nicely. Not sure if it is mentioned in the linked article, so if not then check it here: http://linrunner.de/en/tlp/docs/tlp-linux-advanced-power-management.html http://linrunner.de/en/tlp/docs/tlp-linux-advanced-power-man...
- deleted 11y ago[deleted]
- TheTravCav 11y agoI can just imagine a sql server team meeting where they discuss sql server's effect on laptop battery life. Given sql server's intended environment, I almost wonder if its activity is intentional.
- brucedawson 11y agoPower consumption is a concern even in data centers, but yeah, the power cost of this inefficiency is probably inconsequential in situations where sqlservr is actually being used. But, VS installed and started sqlservr on millions of developer machines so they should have paid some attention to this issue. Super sloppy.
- teh_klev 11y ago> Super sloppy. You don't need to install SQL Server Express, just pay a bit more attention to what you're installing.
- brucedawson 11y agoWhat if I need it occasionally? Should I stop and start the server process as needed? If so, why? Why shouldn't it just behave reasonably? Computers should be our slaves.
- tfiner 11y agoSo true, if only more users realized this. I for one really appreciate your work this. Users don't understand that computer resources like CPU time and battery level are really their property. It is an awful like paying a hidden poor quality tax. It is not unreasonable to expect software to not waste CPU and battery time.
- fowl2 11y agoit's also installed by millions of other applications - a sony laptop I had once shipped with some "music management" app installed by default that used it.
- neves 11y agoI didn't make a real trace, but was impressed when I saw the amount of CPU was being wasted for the the three cloud drives that I had: Microsoft OneDrive, DropBox and Google Drive. They all offer some free extra space when you login from a new machine and I accepted all of them. When I disabled them all my machine were much more responsive.
- ino 11y agoFor this reason on my MBA I've uninstalled Google Drive and now i only use Dropbox on demand, as in I start it every now and then to sync the files and then make it quit.
- brucedawson 11y agoGood advice. It's a shame because it is quite possible to make those programs power efficient. Sloppiness.
- revelation 11y agoYou'd be amazed at the amount of disk IO wasted by these programs, then. Can somebody tell the Dropbox developers that right after boot is the exact wrong time to kill disk performance with a massive number of very random, very short reads? Jesus. People want to use their newly booted PC, not wait for Dropbox to realize nothing has changed after all while it chokes the browser being started. I figure they don't notice because they have two PCIE 512GB SSD disks in a raid0 in their dev boxes. They need to test this stuff with spinning rust.
- steven777400 11y agoI'm a developer for a large organization and every year or two I snag a laptop on the way out of the bottom of the replacement cycle. When I have it out people sometimes come by and are shocked, "You're a developer, what are you doing with that thing? It must be the oldest laptop in the whole agency!" And I tell them, "Exactly. If I make my app run well on this laptop, I know for sure it will run acceptably on every machine here."
- Kenji 11y agoDon't forget to disable Windows Defender which does lots of realtime scanning and hogs CPU resources and disk IO. A complete piece of trash that automatically deletes false positives. Never have I been so disappointed with Windows 10 than after upgrading and seeing this thing enabling itself and running. (To the downvoters: I would love to hear feedback about why I'm mistaken here. Windows 7 didn't need such an authoritarian defender (auto-deleting things, scanning, etc.) and it felt just as safe)
- tomaskafka 11y agoI see Defender as a symptom - as it monitors the files, it only checks files that some other process opens. Go solve a problem of second process regularly accessing files on idle PC.
- brucedawson 11y agoI hope that you are correct. That was also my assumption but I have not validated it.
- zokier 11y agoI would have liked to see bit more discussion/analysis on CPU power states, wakeups and frequency scaling. My understanding CPU usage might not be always perfect proxy for energy usage.
- brucedawson 11y agoYeah, I thought about that, but I wasn't sure I could say anything authoritatively enough beyond "CPU consumption wastes power, and so does waking up". Apple's energy monitor seems to use that for its model so I guess it's not too bad.
- phillc73 11y agoAs an aside, because I'm genuinely curious, can anyone explain the modern English trend of adding "age" suffix to some words? E.g. Wastage, Usage. The title of this post would read just as well as "Power Waste on an Idle Laptop". I also see "Usage" quite a lot on GitHub Readme pages, where I think "Use" would suffice. Many words seem to be shortened for common use. E.g. Photograph to photo. Why extend the length of other words?
- castis 11y agohttps://en.wiktionary.org/wiki/-age https://en.wiktionary.org/wiki/-age has some information on the subject. Seems the convention was created to turn nouns into verbs?
- phillc73 11y agoThanks. Of the six potential uses, I think this one is most relevant: "Forming nouns indicating a process, action or result. E.g. blockage, slippage, shrinkage" Yet in this case the extension to "wastage" still feels somehow redundant. For example, I wouldn't say "Household wastage in modern society".
- sp332 11y agoI would use "waste" to refer to the physical result, a bunch of trash or whatever. "Wastage" to me is the act, the production of waste.
- brucedawson 11y agoThe meaning are subtly different. I think I used it correctly, but I could well be wrong. http://www.ourcivilisation.com/smartboard/shop/gowerse/abc/waste.htm http://www.ourcivilisation.com/smartboard/shop/gowerse/abc/w...
- phillc73 11y agoGenuinely wasn't meant to be a pointed criticism. I was curious to learn more about the use, which I just found different to what I'm used to. I guess in this case I would read "wastage" as the reduction of available power over time. That is, the power was wasting away. Rather than the "waste" of power (frivolous use) by too many CPU cycles. Anyway, English, wonderful language.....
- hauget 11y agoIf you're on a Mac and using OSX, I highly suggest checking out Turbo Boost switcher https://github.com/rugarciap/Turbo-Boost-Switcher https://github.com/rugarciap/Turbo-Boost-Switcher It's given me at least an hour more of battery life on my aging Macbook Pro 13 (2011). Another handy tool on OSX is CoconutBattery which is basically the closest I've found to PowerTop for monitoring power usage (I know ActivityMonitor somewhat shows power usage BUT it makes my fans & CPU spin like crazy when it's gathering info!)
- astrange 11y agoTry "powermetrics" on the command line.
- perlgeek 11y agoI can imagine many valid use cases for an RDMS waking up regularly, and a laptop really isn't the environment it was originally developed for. The really questionable thing is automatically installing it along with Visual Studio.
- brucedawson 11y agoWaking up every minute is fine. Spending 1.5 s of CPU time doing nothing... I think I could improve on that. That's enough CPU time to drag down overall performance slightly when the machine is not idle.
- fowl2 11y agoA slightly easier option is "powercfg -energy" - does a 1 minute sample and spits out a little html report. Also includes some info about driver/firmware limitations, wake up sources, supported power states etc.