Opera Developer power saving - Magic or science?


Updated: June 17, 2016

I am not a great fan of Opera. I'm more of a ventilator. Oh, well. Anyhow, recently, this browser has come into my radar twice, first when I tested an olden version and then a more recent release. Me no impressum enough to really care or make any big changes in my production setup.

But then, I read about Opera Developer adding a new power saving mode, which promises huge improvements in battery life on laptops. As much as heady 50% compared to Google Chrome. That's a bold claim, especially for two browsers that share the same engine. Which made me power on my Lenovo G50 machine, boot into a Fedora instance with the Gnome desktop, and commence to start the experiment.

Power saving, turn on

More on the setup

All of the article I've read mention Windows 10 as the test bed. In fact, they all reference the claims by the Opera team, but haven't really offered any independent testing of their own. The thing is, power management and measurement is a tricky business, because it is very difficult to separate the browser from the operating system, at least in terms of the raw power usage and battery drain. Any given seconds, hundreds of processes are running and dying, there are lots of background tasks, the hardware does its stuff, and so, the whole thing is more of an arcane approximation than exact science.

Furthermore, what about Linux? Well, Fedora comes with a fairly new kernel, so we're looking at the latest and greatest in power management, and all major browser releases seem to be available for this particular distro. It will also help us understand better if Linux folks would ever need to care about this new power saving thingie.

Test conditions

What I decided to do is install Opera 39, Google Chrome Stable (v50), Google Chrome Unstable (v52), and use the already available Firefox 46. The specific revisions are less important at this point. We're not after nano-Watts, we wanna see if battery life can really be preserved in a meaningful manner when using Opera's power saving mode.

The power saving functionality comes in two neat forms - one, the saving mode, which becomes available once you unplug your laptop and starting running on chemical juice; two, you can also use the built-in ad-block to minimize the number of interruptions and the power bleed by third party sites, read ads, which often come in flashy [sic] formats. Once active, Opera will minimize activity in background tabs, reduce CPU wakeups, pause plugins and animations, and optimize video playback.

The idea sounds really novel, but are the actual gains really that significant to notice in day-to-day use? Well, let's expand on the experiment setup then, shall we. So we have our four browsers. We also have powertop, a commandline tool to measure power usage.

Powertop example

Then, what should we launch in a browser? I decided to go for four tabs, like four seasons, only less glamorous, including my own website, Youtube, a security forum, and the new tab page for whatever the particular product defaults to. And then, measure.

Tabs for the test

The cycle of testing included:

Each browser individually, sampled over a period of three minutes every 10 seconds with no other activity happening on the system at that time apart from whatever the distro would randomly do in the background. The browser would be in the foreground, with the new tab loaded.

In addition to the above, Opera Developer with the power saving mode on, but no ad-blocking used.

All four browsers loaded, with none of them in the foreground, again with power saving on and off in Opera Developer, with the same sampling frequency and duration like before.

Chrome Unstable and Opera Developer head to head, with power saving on/off, and each one in the foreground, all permutations, with samples taken over a period of three minutes.

Testing

This was a rather intriguing and frustrating experiment. I could guide you through the full hour of my work, but that would be slightly confusing and tedious. Instead, I will only focus on the highlights.

At first, it seemed like the power saving mode was providing significantly beneficial results, as much as 10%, which would be roughly 1W delta between the two states, regardless of what other browsers were doing. Then, there was an additional saving of 0.5-1W compared to Chrome, Stable or Unstable.

Power saving, turn on

Power saving turned on

After a little while, I noticed that the power saving differences started to narrow down, and in a few measurements, reverse. Powertop was highly sensitive to any activity on the laptop, including mouse cursor movements, my documentation of its work in a text editor file, and the alt-tabbing between different applications, most notably the terminal, gedit, and the browsers.

With all four browsers up and running, the results became even more blurred, and the total consumption did not change much, less than 0.5W on average compared to an idle system, which translates into about 5% saving. Perhaps my choice of tabs and websites was not aggressive enough, or perhaps the default power saving mode is quite aggressive already even though the overall battery life on the laptop, across pretty much all and any distro, is quite miserable.

I also tried to understand how much each browser was using on its own, but it's rather tricky. By default, powertop will display power consumption based on the number of events per second and the time they took. The values varied wildly between measurements. For example, Firefox:

Usage       Events/s    Category       Description
258.7 ms/s  136.7       Process        ...firefox
33.1 ms/s   85.9        Process        ...firefox
69.6 ms/s   106.7       Process        ...firefox
25.2 ms/s   36.7        Process        ...firefox

The usage was anywhere between 25 and 260 ms/s, a factor of 10. The number of events also varied a lot, between 36 and 136 per second, which means something like x4 difference between the best and the worst case snapshot.

With Chrome, it was more difficult to gage the usage, due to its multi-process nature. Opera seemed very light, with values in microseconds rather than milliseconds, and the number of events an order of magnitude (or two) less than Firefox. But then, there was no overall change in power utilization that would reflect in any way on this huge saving shown by powertop. So what gives?

Usage       Events/s    Category       Description
406.8 µs/s  2.3         Process        ...-developer/opera-
90.9 µs/s   1.0         Process        ...-developer/opera-
42.9 µs/s   0.7         Process        ...-developer/opera-

Results in more depth

Here's what we have, a few snippets. Four browsers, power saving on:

The battery reports a discharge rate of 9.37 W
The estimated remaining time is 1 hours, 39 minutes

The battery reports a discharge rate of 11.2 W
The estimated remaining time is 1 hours, 23 minutes

The battery reports a discharge rate of 10.1 W
The estimated remaining time is 1 hours, 31 minutes

The battery reports a discharge rate of 9.44 W
The estimated remaining time is 1 hours, 37 minutes

The battery reports a discharge rate of 9.37 W
The estimated remaining time is 1 hours, 37 minutes

And now with power saving off:

The battery reports a discharge rate of 9.68 W
The estimated remaining time is 1 hours, 33 minutes

The battery reports a discharge rate of 10.6 W
The estimated remaining time is 1 hours, 25 minutes

The battery reports a discharge rate of 10.1 W
The estimated remaining time is 1 hours, 28 minutes

The battery reports a discharge rate of 9.91 W
The estimated remaining time is 1 hours, 30 minutes

The battery reports a discharge rate of 9.86 W
The estimated remaining time is 1 hours, 30 minutes

The battery reports a discharge rate of 10.0 W
The estimated remaining time is 1 hours, 28 minutes

The battery reports a discharge rate of 9.79 W
The estimated remaining time is 1 hours, 30 minutes

And turned on again:

The battery reports a discharge rate of 9.57 W
The estimated remaining time is 1 hours, 31 minutes

The battery reports a discharge rate of 10.2 W
The estimated remaining time is 1 hours, 25 minutes

The battery reports a discharge rate of 9.74 W
The estimated remaining time is 1 hours, 29 minutes

The battery reports a discharge rate of 10.0 W
The estimated remaining time is 1 hours, 26 minutes

The battery reports a discharge rate of 9.40 W
The estimated remaining time is 1 hours, 31 minutes

The battery reports a discharge rate of 9.90 W
The estimated remaining time is 1 hours, 26 minutes

Only Chrome Unstable and Opera Developer, power saving on, Opera in the foreground:

The battery reports a discharge rate of 9.84 W
The estimated remaining time is 1 hours, 25 minutes

The battery reports a discharge rate of 9.98 W
The estimated remaining time is 1 hours, 23 minutes

The battery reports a discharge rate of 9.80 W
The estimated remaining time is 1 hours, 24 minutes

The battery reports a discharge rate of 9.99 W
The estimated remaining time is 1 hours, 22 minutes

Chrome in the foreground, power saving still on:

The battery reports a discharge rate of 9.99 W
The estimated remaining time is 1 hours, 22 minutes

he battery reports a discharge rate of 9.51 W
The estimated remaining time is 1 hours, 25 minutes

The battery reports a discharge rate of 10.3 W
The estimated remaining time is 1 hours, 18 minutes

The battery reports a discharge rate of 9.93 W
The estimated remaining time is 1 hours, 20 minutes

The battery reports a discharge rate of 10.8 W
The estimated remaining time is 1 hours, 14 minutes

Power saving off, Chrome in the foreground:

The battery reports a discharge rate of 11.3 W
The estimated remaining time is 1 hours, 10 minutes

The battery reports a discharge rate of 9.93 W
The estimated remaining time is 1 hours, 19 minutes

The battery reports a discharge rate of 9.98 W
The estimated remaining time is 1 hours, 18 minutes

The battery reports a discharge rate of 10.8 W
The estimated remaining time is 1 hours, 12 minutes

Idle system:

The battery reports a discharge rate of 9.29 W
The estimated remaining time is 1 hours, 20 minutes

The battery reports a discharge rate of 9.27 W
The estimated remaining time is 1 hours, 18 minutes

So what do we have here?

The results are interesting. I didn't try to be all too methodical here. However, I did attempt to retain a modicum of science in my work. So we can see that in the two measurements with four browsers and power saving on, we had a 0.1W variation. But that's not quite correct. The actual STDEV was 0.79 W and 0.32 W, respectively. Likewise, for the measurements with power saving off, the deviation was 0.35 W, whereas the max. difference between the two modes (on/off) is 0.2 W in the best case, invalidating any improvements.

Poweer usage, table summary

It gets better, though. With only two browsers running, with the power saving on, we had the same result as with four browsers. And then, in a second test, we had WORSE results than with four browsers. The one notable difference is that Chrome Unstable was in the foreground, and this resulted in a 0.21 W increase compared to Opera Developer being in the foreground, with the power saving active, and 0.6 W, with the power saving turned off, which aligns with what the Opera team promises in terms of background activity. The STDEV values for the three scenarios were: 0.1 W, 0.48 W and 0.66 W, which again, makes all the results invalid in terms of improvements. One could claim, marginally, that there WAS a biggish and almost statistically noticeable difference with the power saving off and Chrome Unstable in the foreground, and this amounts to about 6% total power utilization.

The thing that seems certain is that the idle system does use less power than with browsers running, running at 9.28 W with a fairly stable measurement, but statistically almost as good as the four browser test with the power saving on. Which does not explain Firefox values in any way whatsoever. And then you have the urban myths, legends and whatnot saying how Chrome is a battery killer. Perhaps it is, and it seems to be more than the others. But I can't see the orders of magnitude differences that Firefox would need to have brought into the equation, not compared to Opera and not to Chrome.

What did we learn here?

Frankly, not much. And then, you may ask, what happens if you run Firefox with Noscript, which actually freezes everything and makes thing into static, quiet HTML. And what about adblocks? And then what kind of content do you need to be using and browsing to notice significant battery savings? How do you reliably measure browser-specific improvements unless we're talking hours of battery life and averaging hundreds of hours of work. Last but not the least, Windows. Maybe none of these lovely improvements come to bear in Linux in any shape or form, and I'm just chasing ghosts. But it's a valuable exercise.

It is also utterly unreliable. The total power usage on your laptop will depend on a million factors, including but not limited to: the specific kernel you're using and what kind of power management wizardry it has, whether your operating system has been optimized for your particular hardware, Intel versus ARM, Wi-Fi signal, overall activity, presence and intrusiveness of your security software, the number and type or running applications and processes, and so much more. In other words, you can all muddle it up beyond recognition, or in technical parlance, MUBAR.

Conclusion

I don't think you will appreciate the vague message of this article, but it's a worthy lesson in trying to validate complex yet bombastic claims revolving around the most precious resource on mobile devices: spice. I mean battery life. Opera Developer promises some rather ambitious power savings, and it seems that the functionality does work, well, in some cases, at least a little bit. But only when pitted against Chrome, in very specific scenarios. Otherwise, for most people, the difference will probably not be huge or hugely noticeable.

Nothing I've done here is really foolproof. I have not done a full design of experiment, I've not done independent power measurements, nor isolated browsers from the background noise of the system, nor ran super-long, extensive tests that would encompass even more use cases, Javascript-rich computation and such. Which reminds me. This power thingie is much like browser speed tests. An exercise in what can be done, but something that is ultimately not that relevant to most people. I hope Opera proves everyone wrong, but I don't think we'll be seeing miracles anytime soon. Hey, even the official blog post is a little vague on the results, and it focuses on shorter tests with a high degree of confidence. What is 'high' exactly? Exactly.

All in all, even though I don't like Opera as a browser, I laud this approach. It's somewhat scientific, and it's trying to tackle a core issue that most people face. There's a lot more to be done, especially in quantifying the results, before we can go hallelujah on this one. Anyhow, I hope you liked this thingie. It took me longer than I thought, so you might as well appreciate all the sweat and tears and electrons than went into this effort.

Cheers.

RSS Feed icon

del.icio.us del.icio.us stumbleupon stumble digg digg reddit reddit slashdot slashdot



Advertise!

Would you like to advertise your product/site on Dedoimedo?

Read more

Donate to Dedoimedo!

Do you want to
help me take early retirement? How about donating
some dinero to
Dedoimedo?

Read more

Donate