GPU Acceleration and Battery Life During Video Playback on Windows 8.1
This is what I have been doing for the past few days: draining the battery of my new Dell Venue Pro 11, a Windows 8.1 tablet (the real deal, not RT). I wanted to find out how good Windows has become at battery-efficient video playback and how that is affected by GPU acceleration.
Measuring Video Playback Battery Life
Have you ever asked yourself how battery life during video playback is measured? Apparently, hardware testers configure a video to play in a loop and ping the device from another computer. When the battery dies, the pings are not answered any more and, voilà, you have got your result. In another variant, a batch file is on the device to be tested. The batch file regularly writes the current time to some file.
I did something else: I installed uberAgent on the tablet. With a full Windows 8.1 in its flash memory the Venue 11 Pro is perfectly capable of running advanced diagnostic tools. uberAgent already monitors GPU, CPU and memory usage by default, but for this experiment I also wanted to see how the battery got drained over time. There is a performance counter for remaining battery capacity and uberAgent can easily be configured to collect arbitrary counters. To get the remaining battery capacity in mWh I added the following to uberAgent’s configuration file:
Perf counter = \BatteryStatus(ACPI\PNP0C0A\1_0)\RemainingCapacity
Please note that on other systems you may have to replace 1_0 in the path with 0_0.
Running the Tests
With uberAgent configured I muted the sound and manually set the screen’s brightness to the minimum to get consistent results. Then I played a 1080p MP4 movie trailer in a loop until the tablet went to hibernate at two percent remaining battery capacity. I did that three times with differently configured apps. With uberAgent on the tablet collecting and sending performance data to a Splunk server every 30 seconds figuring out later exactly what was going on is a breeze. This graph shows the battery drain over time:
At first, the three lines may look similar, but in the first configuration, the device played video for 465 minutes, in the second for 625 minutes and in the third only for 440 minutes. Those are actually spectacular results, especially compared to the only other publicly available Windows 8.1 video playback battery life test, where the best result Anandtech measured on a Sony Vaio Pro 13 was 473 minutes.
So, which were the contenders?
- VLC 2.1.3 with hardware accelerated decoding set to automatic: 465 minutes
- Windows 8.1 Xbox Video App (version 2014-01-31): 625 minutes
- VLC 2.1.3 with hardware accelerated decoding disabled (default): 440 minutes
VLC and the Windows 8.1 Video app are as different as two programs that serve the same purpose can be. While the former is extremely flexible and plays just about everything the latter is very limited in capabilities and format support (basically H.264 only). When it comes to efficiency, however, the simple Video app is 34% ahead. Why is that?
GPU Usage
My initial theory was that the Video app was delegating more decoding work to the GPU, leaving less for the CPU. Let us have a look at GPU compute usage during playback (measured by uberAgent):
GPUs have multiple engines serving different purposes like 2D acceleration, 3D acceleration, video decoding, and so on. Unfortunately, there is no documentation available that tells us which engine does what. But we can deduce that.
VLC uses engine 0 equally heavily regardless of GPU acceleration (tests 1 and 3). Engine 1, however, is only used with GPU acceleration enabled. The Video app uses both engines, but engine 0 to a far lesser extent.
Engine 0 probably is related to painting pictures on the screen while engine 1 helps with decoding video. It is striking how much lower the Video app’s engine 0 values are.
CPU Usage
With the screen brightness at a fixed value the other component relevant to battery life is CPU usage. Let us take a look at CPU usage during video playback (measured by uberAgent):
This can only be called dramatic. VLC does require less CPU power when GPU acceleration is enabled (21% vs. 38%), but part of that efficiency gain is counterbalanced by the increased GPU usage. That is the reason why enabling GPU acceleration only increases battery life by 6%.
Microsoft’s Video app, on the other hand, is extremely efficient. Its CPU usage is at an incredible 1.3% on average.
Conclusion
GPU acceleration does not necessarily improve battery life a lot. It all depends on the efficiency of the implementation. And there can be vast differences: as the Video app demonstrates a modern Intel Bay Trail tablet can play Full HD video at practically no utilization at all. Battery life is accordingly excellent. This would not be possible without the GPU doing nearly all the work.
VLC is less efficient even though it has optional GPU support built-in. Its great advantage is that it can play nearly every video format in existence – on a tablet. From my experience, I can say that the same is not true for video players on Android or Apple tablets. With more effort put into VLC’s efficiency and stability (it crashed twice while in GPU mode) this flexible video player can become even better than it is today.