Why Does Windows Have Terrible Battery Life?

I've become a huge fan of touch computing. I believe that most things we think of as "computers" will be de-facto tablets, either in our pocket, in our hands, possibly even mounted on our wrists or forearms.


This is a companion discussion topic for the original blog entry at: http://www.codinghorror.com/blog/2013/10/why-does-windows-have-terrible-battery-life.html

What makes it even stranger is that OS/X is just now getting low-level power saving features that Windows already has, like timer coalescing. I’m expecting a 10-15% battery life increase from OS/X Mavericks due to a slew of new power-saving features - that Windows has been using for a while.

That said, part of the issue is probably drivers. I’d like to see battery life differences between OS/X and Windows on a hackintosh laptop to get a truer picture.

Honestly, I expected more in Windows 8 (and definitely in 8.1). But you have to remember that Apple has a big head start here. They ripped out big chunks of OS/X and rewrote or replaced power-hungry features for iOS. And they’ve spent years pulling those features back into OS/X. Microsoft is still early in that process.

I get the feeling the main graph in this article is missing a line indicating satisfactory battery life.

If, for example, 4hrs of battery life turns out to be “enough for anybody” then there’s little reason to put effort into extending it.

I’m not arguing the main point, but in a graph like the one above, there’ll always be a “worst”, and it’s not necessarily also going to be “bad”.

The “timer tick” processing is huge. From the other side… Many years ago I had a text compressor and dictionary/index generator - small but brute force as I only would have to run it once - on an overclocked AMD (233Mhz to show the age) In C. Under Linux, the processor would overheat, windows not. Same code (gcc). Everything would stay cached under linux, under windows the timer tick rescheduler would dump enough out so it had to reload code and data. I don’t know what was going in and out and on how many ticks, but it was repeatable.

I examined this issue when I got my Surface RT and saw that Microsoft left a lot of unnecessary stuff in Windows RT that hurts battery life. A clean boot of the OS shows that over 700 threads are running. Some of these threads wake up constantly and touch the disk. The two main culprits seem to be a process which makes sure that the Windows system files are not corrupted and another which checks some other type of security. If a Surface RT had a disk activity light, you would see it blink constantly even with no user or network activity. These should be unnecessary since the file system is now locked down and malware can’t write over the system files. Microsoft needs to fix this issues if they really want to compete with the other tablet vendors.

First, you’ve got to try the Yoga 13. I’m loving it. And the next iteration gets even better battery life.

Traditionally, the big killer of battery life on Windows hasn’t been kernelspace or system code, it’s been userland apps. Apps which engage in polling, for example, forcing the system to spin up a CPU or–worse–access disk. Load up procmon on an idle system, watch the stuff that scrolls by while you’re not directing it to do anything. That’s the stuff that’s usually eating your battery.

Even the userland apps that Microsoft puts out vary in quality. Their helper application for Intellimouse polls, for example.

Finally, no two web browsing experiences are alike. Google Maps brings my HD4000-based laptop to its knees in Chrome. Some web browsing apps churn JS at a high rate to deal with events or polling. If you’re going to try to measure differences in battery life based on your experience web browsing, you need to make sure you’re recreating the same conditions. (And that’s going to be hard…browsing Facebook at noon during the shutdown crisis is probably going to be more taxing than the same activity at 3AM on a slow news week.)

I’m curious if Microsoft’s solution to their out of date browser performance issues of “Throwing hardware at it” - where IE9+ gets a serious performance boost by using the GPU for JavaScript computation, font rendering, animations, Canvas, SVG, Flash, and all kinds of things has an adverse effect on battery life?

Besides that Windows has always been a beast for me… A 100% new, fresh, clean system is always trying to run a zillion things and every application feels the need to install “pre-warming” startup utilities cough Adobe Reader, Office, Quicktime, Skype, VPN Clients, 3rd party MFGR Utilities that no one -EVER- uses!..

I still love Windows as a workhorse to get things done but the idea of it ever being lite on battery use is something I just gave up on.

I read an article on Ars on timer coalescing in Mavericks, but as mentioned above, didn’t Microsoft implement this in Windows 7?

http://arstechnica.com/apple/2013/06/how-os-x-mavericks-works-its-power-saving-magic/

Just curious; would you happen to know any similar battery life tests done with Win 8, OS X and Linux (say Ubuntu)?

The Windows Timer Resolution could perhaps provide a good explanation for this phenomenon:

http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/

This is tangential, but I was wondering - what do you do with all your old hardware?

Ages ago, I noticed that Windows was never quiet. My box had a HD light, and it was constantly flickering. When I inquired about this on Win tech sites, I received no satisfactory answer. At the time, I was concerned with HD life. Seem to recall I saw some HD activity also in Linux (Mint), even while no user apps were running. Hugely gratifying to see this recognized as a real OS design issue.

I wonder what conditions this test was run under. The Windows 8 native app life cycle has apps that aren’t in the foreground suspended. There are only a few small allowed activities for background tasks under that app life cycle… the generally are audio and background downloads.

Was desktop IE used here, or Metro? What other apps were running in the background?

This is to me the main reason the Surface gets much better batter life than the Surface Pro. The pro runs full windows, with all the background stuff allowed… while the Surface is native apps only which are all suspended and there is very little background activity happening.

BOb

@Michael Mol: “Traditionally, the big killer of battery life on Windows hasn’t been kernelspace or system code, it’s been userland apps.”

+1

Windows 8 runs a boatload of user-mode services by default, and many of them engage in some type of polling or timer-based activation. All that background activity drains the battery even if no “apps” are running. Running procmon on an “idle” system is truly an eye opening experience.

Step 1: http://en.wikipedia.org/wiki/Vertical_integration
Step 2: 35+ years
Step 3: Profit

It would be more surprising if 35 years of tight hardware/software integration did not yield such benefits. No one in the industry has Apple’s consistent history of designing their own hardware for their own software, and writing their own software for their own hardware. Sure everyone is doing it now, but they’re all at a three-decade disadvantage in experience.

Maybe just open up an Air, tap into the battery leads and power the thing from a lab supply with a shunt resistor inserted between + and load. Then just measure the voltage drop with a scope or a cheap micro with ADC (i.e. teensy, it has a differential ADC). It should give you a pretty good picture of what’s going on.

Is it fair to compare Wacom pen-computing devices (Surface Pro) to non? (Asking because I don’t really know).

The device has to constantly produce an electromagnetic field that the pen interferes with.

Except this isn’t true at all. I know this is going to get downvoted past anyone seeing it here, but here’s the Vaio clearly beating MBA efficiency. It’s really all about OEM part selection (panel, cpu/GPU, chips you wouldn’t even think of on the motherboard, dimms, etc etc)

http://images.anandtech.com/graphs/graph7417/59018.png

http://www.anandtech.com/show/7417/sony-vaio-pro-13-exceptionally-portable/4

AND, he picked two separate tests off of Anandtech, they’re both “light” workloads but Anand regularly updates the tests to be more realistic. Just sloppy journalism here.

Comparing Windows and OS X on the same hardware seems like the ideal comparison since it reduces the number of variables, but it actually turns out to be bad science, I believe. Apple supplies the Windows drivers for their hardware and they have no incentive to provide best-of-breed Windows drivers for their hardware. In order to sabotage the Windows results they merely have to not spend a lot of effort on optimizing their Windows drivers.

Still, there is clearly something wrong. However I find this line frustrating:

I just wish somebody could explain to me and
Anand why Windows is so awful at managing idle power

Wait. Isn’t it Anand’s job to figure this sort of stuff out? He should use xperf (http://randomascii.wordpress.com/category/xperf/) to find out where CPU time is going, and Intel’s Power Gadget (http://software.intel.com/en-us/articles/intel-power-gadget-20) to estimate power draw, and then write an awesome article explaining why Windows is drawing more power. I would love to read that article.

If Anand and other tech journalists don’t have someone on staff who can do this type of investigation then they need to think about finding someone, IMHO.