Using Viewing Statistics to Control Energy and Traffic Overhead in ...

2 downloads 26353 Views 2MB Size Report
We also present and experiment with an Android prototype that integrates eSchedule into a ..... energy, and 2) limiting that chunk size in order to reduce the.
This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination. IEEE/ACM TRANSACTIONS ON NETWORKING

1

Using Viewing Statistics to Control Energy and Traffic Overhead in Mobile Video Streaming Matti Siekkinen, Mohammad Ashraful Hoque, and Jukka K. Nurminen

Abstract—Video streaming can drain a smartphone battery quickly. A large part of the energy consumed goes to wireless communication. In this article, we first study the energy efficiency of different video content delivery strategies used by service providers and identify a number of sources of energy inefficiency. Specifically, we find a fundamental tradeoff in energy waste between prefetching small and large chunks of video content: small chunks are bad because each download causes a fixed tail energy to be spent regardless of the amount of content downloaded, whereas large chunks increase the risk of downloading data that user will never view because of abandoning the video. Hence, the key to optimal strategy lies in the ability to predict when the user might abandon viewing prematurely. We then propose an algorithm called eSchedule that uses viewing statistics to predict viewer behavior and computes an energy optimal download strategy for a given mobile client. The algorithm also includes a mechanism for explicit control of traffic overhead, i.e., unnecessary download of content that the user will never watch. Our evaluation results suggest that the algorithm can cut the energy waste down to less than half compared to other strategies. We also present and experiment with an Android prototype that integrates eSchedule into a YouTube downloader. Index Terms—Energy efficiency, mobile communication, video.

I. INTRODUCTION

V

IDEO streaming is one of the most used mobile services. Projections about its evolution in the near future consistently suggest substantial growth [1]. Video streaming is very resource hungry application, whereas smartphones are resource-constrained compared with the desktop equivalents. One of the major limitations is the battery capacity and, therefore, any solutions that optimize the energy efficiency of such services are important. The fraction of energy consumed by wireless communication during video streaming is significant. In fact, it can add up to more than half of the total energy consumed by a smartphone when streaming Manuscript received May 14, 2014; revised December 19, 2014; accepted March 11, 2015; approved by IEEE/ACM TRANSACTIONS ON NETWORKING Editor S. Sen. This work was supported in part by the Academy of Finland CUBIC project under Grant 277498 and Grant 278207 and by TEKES in the DIGILE Internet of Things program. M. Siekkinen and J. K. Nurminen are with the Department of Computer Science and Engineering, School of Science, Aalto University, Espoo 02150, Finland (e-mail: matti.siekkinen@aalto.fi; jukka.k.nurminen@aalto.fi). M. A. Hoque is with the Helsinki Institute for Information Technology, Helsinki FI 00014, Finland, and also with the Department of Computer Science, University of Helsinki, Helsinki FI 00014, Finland (e-mail: mohammad.a.hoque@helsinki.fi). Color versions of one or more of the figures in this paper are available online at http://ieeexplore.ieee.org. Digital Object Identifier 10.1109/TNET.2015.2415873

video. Furthermore, the network infrastructure is also stressed by the large traffic volumes. In this article, we propose an algorithm that optimizes this energy consumption by computing an optimal strategy for the delivery of the video content to a mobile client. We have identified two types of sources of energy waste in mobile video streaming: 1) idle energy expenditure caused by radio resource management which keeps the radio powered on for a period of time after all bytes of a transfer have been received and 2) energy spent in downloading content that the user will not watch because of abandoning the session, a very common phenomenon according to previous studies [2]. The origins of these two are contradictory: if video content is delivered to the smartphone in small chunks, the first type of energy waste dominates, specifically in the form of so called tail energy[3], but the amount of unnecessarily downloaded content is constrained. In contrast, delivering the video content in large chunks has an exactly opposite effect: the total tail energy is small whereas the risk of spending energy and network resources to download content that user will not watch is high. We design an algorithm called eSchedule that uses viewing statistics as input and determines chunk sizes corresponding to the optimal download strategy that minimizes the expected amount of energy waste for a given client. The underlying idea is that video clip specific statistics collected from all the previous viewing sessions enable predicting how another user will watch the video. The algorithm derives abandoning probabilities from the viewing statistics and uses them together with power models and latest estimate of the download rate of content to compute the expected value of the energy waste. The most energy efficient schedule does not always minimize the traffic overhead, i.e., the amount of content downloaded but never watched. Yet, traffic overhead is important for the video service providers that need to pay for the bandwidth that they consume as well as for users that have a limited data plan. For this reason, we also include a mechanism in eSchedule to explicitly control the traffic overhead and enable a controlled tradeoff between the energy and traffic overhead. Even though we use viewing statistics from a real service (YouTube), we do not address the issue of how to collect the viewing statistics. They can be provided by a video streaming service provider or by a mobile network operator. Furthermore, the statistics can be also context specific capturing temporal variations in the viewing patterns in addition to the patterns induced by the content itself. In summary, we make the following contributions. • We design eSchedule, an algorithm that computes optimal download strategy for a given mobile video streaming client by using viewing statistics. The algorithm also

1063-6692 © 2015 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination. 2

IEEE/ACM TRANSACTIONS ON NETWORKING

Fig. 1. Typical mobile video streaming strategies with different mobile video services. HD refers to high-definition videos (e.g., 720–1080 p). LD and SD refer to low and standard definition videos respectively (e.g., 240–480 p). The height of a rectangle represents the download rate and the width the download time.

includes mechanisms to explicitly control the traffic overhead and to adapt to consistently biased user behavior. We present two versions of eSchedule: one based on dynamic programming that produces an optimal schedule and another one based on a heuristic that may also produce suboptimal solutions by doing less computation. • We evaluate eSchedule using simulations and conclude that it can reduce the energy overhead by more than 50% and provides effective means to control the traffic overhead. Our results also suggest that 100 views are sufficiently many to predict viewing behavior accurately enough. • We implement an Android prototype based on the heuristic version of eSchedule. Our experiments confirm that the prototype works well, causes negligible computing overhead, and adapts to changing network conditions. This paper is organized as follows. In Section II, we give a technical overview of mobile video streaming with special focus on energy consumption. In Section III, we present our algorithm and describe simulation-based evaluation results in Section IV. In Section V, we showcase the Android prototype we have developed, after which we conclude the article. II. MOBILE VIDEO STREAMING A. Video Streaming Using HTTP Over TCP HTTP over TCP is currently the most commonly used protocol suite for delivering multimedia streaming content to mobile devices [4]. Fig. 1 shows the streaming strategies used by the streaming services to deliver content to mobile devices. In the beginning of a streaming session, the client prefetches content in an attempt to rapidly fill the playback buffer. The server typically sends the content using all the available bandwidth on the path which is why this phase is commonly referred to as Fast Start. After this phase, a number of strategies are used by different service providers. Whole video strategy simply downloads the entire video content as fast as possible in one go. Encoding rate streaming refers to the mechanism where the client receives content at the encoding rate of the content after the Fast Start phase. The delivery

rate control is a consequence of filled up buffer space and TCP flow control at the mobile client side [5]. Another alternative is that the server throttles the sending rate and delivers content at a rate faster than the stream encoding rate but clearly slower than the limit imposed by the amount of available bandwidth. A different option is to deliver the content in chunks. The ON–OFF techniques are exclusively governed by the client players. There are two types: In the first one, ON-OFF-S, the player uses a persistent TCP connection and generates chunked delivery by simply pausing to read from the TCP socket during an OFF period and relying on the TCP flow control. As the server has more data to send, the server-side TCP sends zero window probes (zwp) to which the client-side TCP responds with zero window advertisements (zwa) during an OFF period. In the other flavor, ON-OFF-M, the client player establishes a new TCP connection in the beginning of each ON period and closes the connection after having received a chunk of content. By analyzing the traffic patterns generated by using YouTube, Dailymotion, and Vimeo players with a Samsung Galaxy SIII 4G (Android Jelly Bean 4.1.2), we identified that YouTube exhibits all the streaming techniques in the Android platform with its combination of the browser and the native player, except ON-OFF-S. The Dailymotion and Vimeo applications use ON-OFF-S. When using ON-OFF-M, the YouTube player in Galaxy SIII buffers 100 s worth of content. When the buffer drains to 40 s, the player resumes downloading. Therefore, the duration of an OFF period is 60 s. The Dailymotion and Vimeo players buffer 20 MB of content. We refer the reader to [5] for a more detailed study on the differences between the video streaming services. B. Energy Consumption The content delivery strategies shown in Fig. 1 also illustrate how the wireless network interfaces of a smartphone are utilized. All the wireless interfaces employ some mechanisms which ensure that the radios are not completely powered on all the time. They maintain different operating modes, which also map to different power states. For example, Wi-Fi with power saving mode (PSM) [6] employs receive, transmit, idle, and sleep modes. The first three active modes draw ten times more power than the sleep mode during which the radio is powered off. In 3G and LTE networks, the Radio Resource Control (RRC) protocol manages the operating modes. In 3G, these modes correspond to the different transport channel allocations (CELL_DCH, CELL_FACH, CELL_PCH and IDLE) [7]. An LTE device can be either connected or in idle mode [8]. If discontinuous reception/transmission (DRX/DTX) is enabled in connected mode, the radio is periodically switched on only for a short period of time. The promotions to higher power modes are triggered by traffic demand and demotions to lower power modes are controlled by the network through inactivity timers. In cellular networks, the timers are pre-configured by the network operator, whereas in Wi-Fi they are client device specific. While waiting for a timer to expire, the network interface spends energy doing nothing useful. This spent energy is also known as tail energy [3]. Nevertheless, such timer control is necessary

This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination. SIEKKINEN et al.: USING VIEWING STATISTICS TO CONTROL ENERGY AND TRAFFIC OVERHEAD IN MOBILE VIDEO STREAMING

Fig. 2. Power trace of a Vimeo video streaming session using Galaxy SIII and 3G access.

in order to limit the frequency of mode changes in mobile networks because each promotion and demotion requires signaling between the UE and network and causes both communication delay and extra signaling traffic. Typical values of inactivity timers in cellular networks are several seconds, whereas Wi-Fi typically switches the radio to sleep mode after an inactivity period of 200 ms. Modern smartphones try to limit the amount of tail energy in 3G by using Fast Dormancy (FD) [9]. When using FD, the phone uses a shorter inactivity timer of 3–5 s [10] and make an explicit request to the network to change from CELL_DCH to CELL_PCH or IDLE. The RRC inactivity timer in LTE is typically 10 seconds. If DRX is enabled, then the corresponding inactivity timer is only a few hundred milliseconds [11]. We measured the total current consumed by Samsung Galaxy SIII 4G with the Monsoon Power Monitor (www.msoon.com) while streaming from YouTube, Dailymotion, and Vimeo via Wi-Fi, 3G and LTE. The smartphone and the target network both supported FD and the value of the inactivity timer was 5 s. However, the LTE network did not support DRX and the inactivity timer was of 10 s. The total current comprises the idle current, the playback current, and the current drawn by the wireless network interface for downloading. Towards the end of a video streaming session, there is always a period of time, at least as long as the amount of initially buffered video content, in which all of the video content have already been downloaded and the player continues to play the content still stored in the playback buffer. We leverage the fact that the transition to this phase is clearly visible in the power trace as the average power draw notably drops when the radio circuitry is (partially) switched off. Hence, we infer the playback plus idle current by identifying this transition through visual inspection of the power trace (see Fig. 2) and compute the average current draw during the phase when only playback of buffered content continues. Then, we compute the downloading current by subtracting this average playback current from the average current over the entire streaming session. Fig. 3 shows the downloading current averaged over the viewing duration. This measure tells us the magnitude of charge in coulombs (i.e., Joules normalized by voltage) spent per second of content viewed. Hence, the higher it is, the more energy is spent per each second of video that the user watches. The average playback current varied within 200–230 mA. Comparing that range with the downloading current numbers in

3

Fig. 3. Average current consumed by Wi-Fi, 3G and LTE interfaces during streaming sessions of a 597-s video to Galaxy SIII 4G using different streaming techniques.

the figure, we note that, in most cases, the downloading energy is a very significant part of the total energy. The encoding rate streaming forces the wireless radio to be powered on all the time and smartphone consumes the largest amount of energy. When the server throttles the sending rate, the client device finishes downloading the video earlier and consumes less current. ON-OFF-S also leads to larger energy consumption when using LTE or 3G access. The reason is that the TCP flow control messages do not let the inactivity timers to expire. By contrast, ON-OFF-M is more energy efficient. Compared to the other methods, whole video download draws very little current on average while the whole video is being watched. In the figure, we also show a case where the user abandons the session after watching 20% of the video. In that case, the average current is clearly higher because the device does unnecessary work in the beginning of the session by downloading content that is never watched. We also refer the reader to a more thorough measurement study presented in [12]. The measurement results and the analysis presented in this section point to the following four different factors which can negatively affect the streaming services for the energy consumption of mobile devices. 1) Downloading content at a rate lower than the maximum possible rate: The lower the downloading rate, the longer is the time interval between the packets1. Even though these intervals are small, the inactivity timers do not expire and the smartphone consumes energy. Therefore, the most energy efficient way to transmit/receive data at a given moment is to use the full network capacity. This holds for all the types of wireless access (Wi-Fi, 3G, LTE). 2) Auxiliary control traffic during periods when content is not being received: TCP flow control packets have significant effect on the energy consumption of smartphones. Although these packets are very small, they keep the wireless interface active and reset the inactivity timers before they expire. 3) Tail energy in noncontinuous content reception: If the player applies non-continuous downloading strategy, such as the ON-OFF-M, then a mobile device spends tail energy after each ON period. This energy adds up to a 1Some servers throttle the trasmission rate by sending small bursts of packets regularly [12].

This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination. 4

IEEE/ACM TRANSACTIONS ON NETWORKING

significant amount when using 3G or LTE access and when the OFF periods are short. 4) Downloading unnecessary content: Whole video download is energy efficient because the radio is powered on a minimal amount of time. However, users often abandon viewing before the video clip ends. Therefore, such aggressive prefetching leads to unnecessary consumption of energy to download content that the user will never watch. The first and second problems can be solved by alleviating server-side rate limits and by using non-persistent TCP connections. However, the third and fourth problems are contradictory: By downloading larger chunks to reduce the total amount of tail energy, the probability of downloading unnecessary content increases. We examine this tradeoff in the next section and propose an algorithm which optimally balances this tradeoff. III. OPTIMIZED PREFETCHING WITH ESCHEDULE A. Using Crowd-Sourced Viewing Statistics The fact that users do not always watch entire video clip transforms finding an energy optimal download schedule from using the trivial whole video download strategy into an optimization problem. The solution must strike a balance between two sources of energy waste: 1) prefetching content in large chunks in order to minimize the (more or less) fixed energy cost associated with each chunk, namely tail (and possibly head) energy, and 2) limiting that chunk size in order to reduce the amount of downloaded content that will never be viewed. A key question in devising a solution is to estimate at what point a user will abandon watching the video. We propose to use viewing statistics do to that. The idea is that statistics about previous viewing sessions make it possible to predict how another user will watch the video. It is natural that the viewing behavior depends on how interesting and “capturing” or engaging the video clip is and the content type. In addition, context specific statistics, such as knowledge about user abandoning caused by poor network connectivity [13], can further enrich the capability to predict the user behavior. YouTube collects statistics about the viewing behavior in the form of viewer retention for each video clip [14]. These statistics are computed based on continuous feedback sent by the YouTube client applications during video streaming sessions [15]. Fig. 4 shows examples of retention curves for some videos which we extracted from YouTube. Each curve always starts from one and shows, for a particular video clip, the fraction of the audience that is still watching at a given point of time. These examples highlight the fact that retention highly depends on the video clip: some retain most of the viewers until the end while others lose most of them at the very beginning. B. Energy-Optimal Prefetching We designed a download scheduler that takes viewing statistics presented in the form of viewer retention, such as those plotted in Fig. 4, as input. We name it eSchedule. We assume that a mobile device is able to tell the scheduler at each moment the type of the network that it uses for data communication. In addition, it includes parametrized power models of different communication technologies (i.e., Wi-Fi, 3G, and LTE

Fig. 4. Viewer retention graphs from YouTube videos.

including variants with and without DRX). Using the abandon probabilities computed from the crowd-sourced viewing statistics, the scheduler computes the optimal download schedule, which is a sequence of variable size chunks that is estimated to minimize the energy consumption. Intuitively, if the amount of tail energy is large, e.g., when using 3G, and the viewing statistics suggest that many users watched a large fraction of the video, the scheduler will choose to download a large chunk of content. Conversely, if the amount of tail energy is small, e.g., when using Wi-Fi, and the statistics indicate that the retention has been poor, the scheduler chooses small chunk sizes. Next, we model this approach as a stochastic optimization problem. We divide the video duration into discrete time steps. Then, we consider the video viewing as a discrete time stochastic process , where takes value one or zero and describes whether the user watches the video segment corresponding to the th time step, where . The viewer retention (also defined in discrete time steps) describes the joint probability of watching all the segments from the beginning till the th time step, i.e., . The algorithm computes for each schedule an expected value of energy waste. We define the energy waste as the total tail energy and energy spent downloading data which is not watched. Let us first consider a schedule that consists of a single chunk of length seconds, i.e., (we denote schedule as an n-tuple of chunk lengths). We obtain (1) for calculating the expected value of energy waste for that schedule. In the equation, is the rate at which content is downloaded (i.e., TCP bulk transfer capacity), is the power consumption while receiving data at the download rate, is the amount of tail energy spent after downloading a chunk carrying seconds worth of content, and is the expected value of the amount of content wasted due to user abandoning of the seconds long chunk whose playback starts from a discrete time step 0 (in seconds measured from the beginning of video).

(1) Computing the tail energy is straightforward given that the algorithm knows the power states and inactivity timer values for each radio interface. The tail energy depends on the chunk size because the inactivity timer values corresponding to a specific radio interface can exceed . The tail energy is added for a chunk even if the user abandons viewing in the middle of downloading it. When downloading a chunk containing seconds worth of content and whose playback starts from discrete

This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination. 5

SIEKKINEN et al.: USING VIEWING STATISTICS TO CONTROL ENERGY AND TRAFFIC OVERHEAD IN MOBILE VIDEO STREAMING

time step , the expected value of the unnecessarily downloaded content is calculated using (2). This equation consists of two parts: the first one corresponds to the phase during which the chunk is being simultaneously downloaded and consumed, and the second one to the phase during which it is only being consumed.

(2) is the encoding rate of the In the above equation, streaming. We also need the probability of the user abandoning viewing ( ). This probability needs to be re-evaluated each time the next chunk size is chosen by the scheduler during the streaming session. It is a conditional probability that can be directly computed from the viewer retention. The probability for a user to abandon during a discrete time step measured from the beginning of the video viewing is computed using viewer retention as follows:

(3) The download schedule would typically consist of a concatenation of video chunks that can be of different sizes. We denote such a download schedule as an n-tuple which consists of chunks having durations . The expected value of the energy waste of a download schedule , of which the playback of the first chunk begins from the time step , can be calculated using

of all the possible schedules, even for a video lasting only a few minutes (e.g., one minute video has more than two million possible schedules). However, we can use an algorithm that relies on dynamic programming which is an iterative approach based on solving subproblems and storing those results for reuse in later iterations. In this way, the optimal schedule is computed piece by piece and the computational complexity grows much slower as a function of the video duration. Specifically, we adapt the algorithm presented in [16] to our problem. The algorithm has computational complexity of where is the maximum number of chunks that the video can be divided into (i.e., video duration divided by the minimum chunk size ). We outline the computation of the optimal schedule in Algorithm 1. The first part iteratively determines the optimal partitioning points of the video that minimize the energy waste. The algorithm starts from the beginning of the video with a smallest possible chunk size and adds in each iteration a minimum increment to the considered piece of video. During each iteration, the optimal schedule for that piece of video is determined. Redundant calculations are avoided by storing the optimal schedule ( for the piece of video from beginning until time step ) and using the stored value in the subsequent iterations. The second part backtracks the identified partitioning points in order to output the schedule consisting of the sequence of optimal size chunks to download. Algorithm 1 eSchedule using dynamic programming define:

; ;

input:

to

for

step

do

to step

for

do ; then

if

; ;

while

do ;

(4) The energy optimal schedule is the one that minimizes the energy waste as calculated with (4). C. Scheduler Using Dynamic Programming Each chunk can be of any size ranging from a defined minimum to the remaining video duration. Consequently, the number of all possible schedules grows exponentially as the video length grows. Even if we limit the granularity of chunk sizes, e.g., multiples of five second, it is infeasible to use a brute force search approach by comparing the energy waste

; output ; Note that the optimal schedule depends on the download rate ( ) which varies with the network conditions of the mobile device. Therefore, it is necessary to recompute the download schedule for the remaining video content each time a previously downloaded chunk has been consumed, which increases the computational complexity to . Upon events of seeking forward or backward, the scheduler simply computes the next chunk size taking into account the viewer retention data when starting from the new position.

This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination. 6

IEEE/ACM TRANSACTIONS ON NETWORKING

D. eSchedule-h: Heuristic-Based Scheduler We also designed a heuristic-based algorithm eSchedule-h that can be used iteratively to compute a part of the schedule. The heuristic is the expected value of energy waste per unit of content downloaded in Joules per second

(5) The expected value is calculated using (4). The algorithm effectively performs a brute force search considering only a specific number of chunks which is limited by the look-ahead parameter ( ). In this way, the algorithm finds a locally optimal schedule, i.e., it minimizes energy waste for the next chunks to be considered, but finding a globally optimal schedule is not guaranteed. The look-ahead parameter enables a tradeoff between energy waste vs. computational complexity: the fewer chunks are looked ahead, the less computation is required but also the less likely the algorithm is to find the optimal schedule.

important for video service providers who need to also pay for their bandwidth. We add a condition to the eSchedule algorithm in order to control traffic overhead. The user specifies as input parameter the maximum fraction of wasted traffic , and the algorithm uses this as an upper limit for the estimated amount of unnecessarily downloaded content. Specifically, when computing the optimal schedule using (4), the algorithm rejects all schedules which do not satisfy

(6) In other words, if the estimated amount of unnecessarily downloaded content from the next chosen chunks of the energy-optimal schedule exceeds the user specified fraction of traffic overhead, the schedule is rejected. Note that, as we are computing a schedule for the content remaining at time step , also the already viewed content at the current viewing position ( which is simply ) must be considered.

Algorithm 2 eSchedule-h: use a simple heuristic

F. Adapting to Biased User Behavior

input:

The viewing statistics used with eSchedule are a result of a combined viewing behavior of a potentially large number of users. Therefore, not every user behaves according to the median one. A specific user may experience bad connectivity because of which he/she tends to abandon viewing videos early, as shown in [13]. In case a particular user behaves in a consistently biased way compared to the median user, at least for a certain number of viewing sessions, we can make eSchedule adapt to it as follows. The algorithm maintains a measure of bias in user behavior with respect to the average user by comparing the expected viewing time, i.e., the point in time where half of the users have dropped out, of a video computed from the retention data to the actual viewing time. Specifically, we update the bias each time after a viewing session using Exponentially Weighted Moving Average (EWMA) with parameter according to

; ;

while

do

for each

, do

if

then

output

The final algorithm using the heuristic is depicted in Algorithm 2. Each time a new video chunk download needs to be scheduled, i.e., every time the amount of content in the playback buffer goes below a minimum threshold, the algorithm finds such a concatenation of chunk sizes that minimizes the value of the heuristic and then selects the first chunk size ( ) as the next one and outputs it. Chunk sizes considered are limited by a given lower limit ( ). Also the sum of their durations should obviously not exceed that of the remaining video ( ). E. Controlling Traffic Overhead A download schedule that minimizes energy consumption does not always minimize unnecessary content download. The reason is the tail energy. Indeed, the larger the tail energy, the more favorable an aggressive buffering will generally be from the energy consumption perspective. Yet, limiting the amount of unnecessarily downloaded data is important for some mobile network users who have a quota in their data plan. It is equally

(7) is the actual time of abandoning the viewing, The variable and is the probability based on the retention data that a given user abandons by that time. Therefore, tracks the deviation from its anticipated value (0.5) so that a negative value of means that the user abandons earlier than a median user does and vice versa. We then use to adjust the abandoning probabilities according to (8) when calculating the download schedule. The rationale is that, if a user tends to abort a video session earlier than the average user, the algorithm increases the abandoning probabilities, and if the user tends to watch for a longer time than the average user, then we decrease the abandoning probabilities. The factor with which the probabilities are adjusted in the equation approaches

This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination. SIEKKINEN et al.: USING VIEWING STATISTICS TO CONTROL ENERGY AND TRAFFIC OVERHEAD IN MOBILE VIDEO STREAMING

zero when approaches 0.5 in which case the user has had the tendency to not abandon viewing at all ( ). On the other hand, the factor approaches infinity when approaches because of which we bound the new probability to maximum value of 1. The use of EWMA in the updating of filters out rapid fluctuations in user behavior and allows the algorithm to adapt only to more persistent biased behavior. The tradeoff incurred by the EWMA parameter is how much inconsistent behavior will be penalized: the larger the parameter, the larger the benefit for consistently biased behavior and the smaller the penalty for inconsistently biased behavior, and vice versa. G. Effect on Quality of Experience The different strategies affect the probability for having buffering event differently. The eSchedule trades off some of the resilience towards a buffering event to energy efficiency in the same way as the ON-OFF strategies do compared to the other strategies. As we describe in Section V-B, the prototype implementation of eSchedule takes a measure to avoid buffering events by starting download of a new chunk when there is still 5 s of content in the playback buffer. According to Wang et al. [17], such safety margin should be sufficient to avoid buffering events in most cases. IV. PERFORMANCE EVALUATION A. Simulation Setup We used Matlab to simulate video streaming sessions with the version of eSchedule based on dynamic programming. We collected viewer retention information from 16 different YouTube videos. The YouTube statistics are unavailable to others than the owner of the video because of which we could not use a larger set of real video viewing statistics. The durations of the videos are 1–11 min and they had been viewed from a few hundred to five million times. The average video encoding rate varies from 160 to 800 Kbps. The content includes illustrated discussions, music performances, advertisements, and martial arts exhibitions and lessons. We divided the set of videos into short and long ones. The ten short ones last less than 5 min and the six long ones more than 5 min. We simulated a large number of video streaming sessions for one user separately for both sets of videos. Simulated user behavior was such that for each session, the video is randomly selected from the set and the abandoning time of viewing is randomly drawn from a probability distribution following the viewer retention information of the selected video. For example, if the retention of a given video suggests that no user abandoned the video during the first ten seconds, then the simulator also never draws an viewing time shorter than ten seconds for that video. We compare eSchedule to four other approaches: 1) to oracle that knows the viewing time for each session and downloads the content corresponding to that duration in one shot; 2) to downloading whole video at once; 3) to ON-OFF-M (from here onwards, ON-OFF always refers to ON-OFF-M version) downloading 60-s chunks of content, which roughly corresponds to default YouTube Android app; and 4) to the algorithm used by GreenTube [18]. We use two metrics in the comparison: energy

7

TABLE I WNI TIMER CONFIGURATIONS AND POWER CONSUMPTION AT DIFFERENT STATES OF THE INTERFACE.

overhead and traffic overhead. Both of them are computed as a percentage by which the value exceeds the equivalent result of the oracle strategy as follows: we subtract the total energy consumed by oracle from the total energy consumed by other strategies for each streaming session and then divide it with the energy consumed by oracle. GreenTube resizes the download buffer size based on the user's viewing history stored locally in the smartphone. It uses the history to compute an expected value of viewing time and then determines a buffer size which will minimize the total energy consumed between the current and the end of the expected viewing time. We implemented this algorithm, including maintaining local viewing history of the simulated user, on Matlab as well. In this way, we are able to compare our approach of using crowd-sourced per-video viewing statistics to GreenTube's approach of using local viewing statistics. In the beginning of simulations, GreenTube's local viewing statistics were initialized to null. We considered that to be as realistic as initializing it with random statistics. The history is updated as the simulation progresses. We used a lower threshold of buffer size of 1 MB. Table I summarizes the parameters used in simulations. The data rates correspond to end-to-end bulk transfer capacity rather than the over-the-air data rate of wireless access network technologies. Energy consumption related parameters were identified during the measurements presented in Section II-B. The DRX timer was set according to a vendor recommendation. The power models used assume a fixed power draw during each different state, namely reception of data, idle but radio on (tail power), and sleep. We used power values relative to each idle state of each WNI, namely 3G's CELL_PCH, LTE's idle, LTE's DRX sleep, and Wi-Fi's PSM sleep modes. For example, the value for in the table is the difference between the power drawn in the CELL_DCH state and the power drawn in the CELL_PCH state. Note that for 3G access we assumed Fast Dormancy as the Galaxy SIII supports it, which is why tail consists of only the FD timer specified amount of time spent in CELL_DCH state. In the case of LTE, we considered both cases; with and without DRX. For all of the results we present, we simulated 5000 video streaming sessions for each parameter value unless otherwise stated. B. Energy Consumption The energy consumption overhead is plotted in Fig. 5. In the first simulation round, we only included videos that are shorter than 5 min. The results show that downloading the entire video in the beginning of the session is an energy-efficient strategy when the amount of tail energy is high, namely with LTE

This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination. 8

Fig. 5. Total energy overhead (%) compared with oracle varies a lot with strategy and wireless network type.

without DRX support and 3G. This is why eSchedule also typically chooses in those cases to download the whole video in one go. Second round of simulations included videos longer than five minutes. We observe that downloading the whole video is less attractive. The performance of the ON-OFF strategy is good when the tail energy is small (Wi-Fi and DRX). However, when streaming over 3G and LTE, which exhibit large tail energy, the results are much worse. eSchedule achieves the lowest energy consumption in each configuration and on average reduces the energy overhead by more than 50% compared to the next best approach. While the other results are easy to comprehend, we feel that GreenTube requires more clarification. The reason why it performs worse than eSchedule is twofold. First, unlike eSchedule, which leverages “global” video viewing statistics, GreenTube uses “local” statistics and assumes that a given user will always watch each video in a similar fashion regardless of the content, thus, for example, the user will either always watch just a small fraction of each video or always watch the entire video. Intuitively, the video content itself has an impact on the user engagement and the fact that the shapes of the viewer retention graphs are different from each other also strengthens this intuition. The second reason is related to the way GreenTube optimizes its buffer size. To illustrate the problem, let us consider two situations. In the first one, the user has always watched roughly half of the video, and in the second, the viewing history is evenly distributed. Both cases suggest that the expected viewing time is half the video and thus GreenTube will choose the same download strategy. However, in the latter case, it is much less likely that the expected value will provide an accurate estimate. The effect is significant especially when the amount of tail energy is large, in which case an underestimated viewing time yields a large penalty. eSchedule computes the download schedule based on the expected value of energy wasted and, thus, also considers the “shape” of the statistics when deciding the next chunk size. C. Energy Versus Traffic Overhead To study the traffic overhead, we computed the amount of content downloaded but not watched for all the simulated scenarios. Analysis of the other strategies reveal that downloading the whole video in one go leads to a large traffic overhead: half of the sessions download roughly 40% of the content unnecessarily. GreenTube may also cause significant traffic overhead with half of the sessions download approximately 30% of the content unnecessarily. However, GreenTube was not configured

IEEE/ACM TRANSACTIONS ON NETWORKING

to specifically limit data waste which can be done by specifying an upper bound for the cache size. We visualize in Fig. 6 the energy and traffic overhead with different strategies using so called bagplots which can be interpreted as two-dimensional boxplots [19]. We used the LIBRA Matlab library [20] to compute them with Tukey's half space depth and a subset of 500 samples to make the depth computation feasible. The plots also mark the half space median. We included results from simulations of all the four different wireless access technologies together. The narrow but tall shape of the bag and fence around it (lighter colored area) for eSchedule visualize the tradeoff that it takes in striving for optimal energy efficiency. For example, ON-OFF with long videos in comparison has a more constrained bag also in the traffic overhead dimension. The half space median of ON-OFF lies in the same height than that of eSchedule meaning that the traffic overheads are similar. However, eSchedule's median is clearly smaller in the energy overhead dimension than ON-OFF's median (note the difference between x and y scales). Overall, eSchedule does not make matters worse in terms of traffic overhead compared to the other strategies but still manages to greatly reduce the energy overhead. Next, we checked how the explicit control of traffic overhead in eSchedule affects the results. Fig. 7 shows the tradeoff between traffic and energy overhead resulting from tuning the parameter (recall (6) in Section III-E). The plots include also the traffic overhead resulting from downloading the whole video in one go. When no limits are set, the average overhead varies between 7%–25% with short videos and 8%–30% with long videos depending on the wireless access used. In fact, the amount of content unnecessarily downloaded by eSchedule depends on the size of the tail energy: the smaller it is, the smaller is the expected data waste as well. Overall, we notice that imposing a limit to the traffic overhead comes with a price to pay in terms of energy overhead, as expected. The reason is simply that in many cases one needs to trade traffic overhead to energy overhead by downloading large chunks in order to minimize the amount of tail energy spent. Furthermore, this energy overhead seems to grow exponentially when the traffic overhead limit gets stricter and exhibits faster growth with the wireless technologies having long tail energy. We also note that except for the smallest values of the behavior of eSchedule is unnecessarily conservative from the traffic overhead perspective. Indeed, in most cases it chooses a schedule that leads to smaller traffic overhead than imposed by the limit. The reason lies in the fact that eSchedule imposes an upper bound and not an exact target for the traffic overhead. Hence, the best schedule not violating this constraint may in fact lead to a clearly smaller traffic overhead. D. Effect of Bandwidth Variations So far our simulations have assumed fixed download rate for the client. In reality, the wireless link quality and number of mobile devices competing for the same shared radio resources vary over time, which leads to varying download rates. Such variation affects the behavior of eSchedule so that the optimal computed schedule is not necessarily optimal because the algorithm that computes it relies on knowledge about the bandwidth.

This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination. SIEKKINEN et al.: USING VIEWING STATISTICS TO CONTROL ENERGY AND TRAFFIC OVERHEAD IN MOBILE VIDEO STREAMING

9

Fig. 6. Bagplots of energy and traffic overhead for short and long videos with different download strategies. Plots are computed using Tukey's halfspace depth. The halfspace median is also marked and annotated in plots. (a) eSchedule, short. (b) GreenTube, short. (c) ON-OFF, short. (d) whole video, short. (e) eSchedule, long. (f) GreenTube, long. (g) ON-OFF, long. (h) whole video, long.

Fig. 7. Tradeoff between energy and traffic overhead can be controlled with the parameter. (a) Traffic overhead, videos shorter than 5 min. (b) Energy overhead, videos shorter than 5 min. (c) Traffic overhead, videos longer than 5 min. (d) Energy overhead, videos longer than 5 min.

Fig. 8. Markov chain used to model download rate variation. BTC is the bulk transfer capacity used in the constant download rate simulations.

The eSchedule algorithm computes the optimal chunk size based on the bulk transfer capacity measured during the download of the first five seconds worth of content, i.e., the smallest chunk size possible that will be downloaded in any case (see also Section V-B). If the computation yields a chunk size larger than five seconds, the client continues downloading until the desired chunk size is completely downloaded. Hence, the schedule must be computed in an iterative fashion so that after download of a chunk, eSchedule recomputes the optimal schedule using the new measure of the download rate and adapts to the bandwidth in this way. We simulated this behavior in the presence of variable download rate. We model the download rate variation using a Markov chain shown in Fig. 8 in which the rate varies from 50% below and above the constant one that we have measured earlier. This magnitude of variation seems appropriate according to measurement results presented, for instance, in [21]. The energy overhead in presence of variable download rate is shown in Fig. 9 for the different download strategies. Compared to the constant download rate results (Fig. 5), there is no major difference between the results with the short videos, whereas

Fig. 9. Energy overhead with variable download rates.

Fig. 10. Bagplots of energy and traffic overhead for short and long videos with eSchedule when download rate varies. (a) eSchedule, short. (b) eSchedule, long.

with the long videos, the results are worse with every strategy, save whole video download. The reason is the inaccuracy in the download rate predictions in case of eSchedule and GreenTube, while it is the unlucky timing of periods of low bandwidth that coincide with downloading that worsen the ON-OFF

This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination. 10

IEEE/ACM TRANSACTIONS ON NETWORKING

Fig. 11. Evaluation results for adaptation to biased user behavior. (a) Impact of on adaptation when viewing 5000 videos. (b) Impact of viewing only 50 videos. (c) Impact of adaptation on eSchedule's energy overhead (%) relative to oracle.

results. The effect is of the same magnitude for eSchedule and GreenTube, while ON-OFF performance degrades more. We also show bagplots of the energy vs. traffic overhead in the variable download rate scenarios in Fig. 10. The value of the half space median in fact decreases in the energy overhead dimension when viewing short videos with variable download rate compared to the constant download scenario (Fig. 6). In contrast, the median grows in the energy overhead dimension from 18% to 31% when viewing long videos. The impact on traffic overhead is small. We also evaluated whether it is possible to further optimize the performance of eSchedule so that during the download of an especially long chunk, the download rate is continuously monitored and the recomputation of the schedule is triggered if the rate deviates substantially from the one measured when computing the currently used schedule. It turned out not to bring any further benefits. E. User Bias: Impact and Adaptation In order to study the impact of biased user behavior, we define two additional user types: impatient and patient. The impatient user always abandons watching a particular video before the median user does according to the viewer retention data, while the patient user always continues to watch at least as long as the median user does. We again randomly draw the viewing time from the probability distribution following the viewer retention but this time only from the first or second part of it for the impatient and patient users, respectively, the boundary being the time where 50% of users had abandoned the session. We first look at how the value of the EWMA parameter used in eSchedule's adaptation mechanism affects the results. To this end, we sum up the energy overhead results from impatient, patient, and average (no bias, behaves according to viewer retention data) user for two cases: the basic non-adaptive version of eSchedule and the version that strives to adapt to biased viewing behavior. The rationale is that while improving performance in case of biased user behavior, the adaptation must not worsen the performance of the average user. Then, we subtract the energy overhead of the adaptive version from the energy overhead of the non-adaptive version. The resulting difference in percentage points between these two cases are shown in Fig. 11(a) when simulating 5000 views. A positive value indicates that the adaptation improves the overall energy efficiency. We notice that adaptation is beneficial only with the highest

on adaptation when

values of . In other words, the moving average needs to be parametrized so that it is insensitive to random fluctuations in viewing patterns and only adapt to highly consistent bias. Otherwise, it will worsen the performance for unbiased client behavior more than it improves the performance for clients behaving in biased way. On the other hand, when viewing only 50 videos [Fig. 11(b)], the highest values of do not allow adaptation to take place rapidly enough, and the best results are obtained when is between 0.9 and 0.95. We show the resulting energy consumption overhead in Fig. 11(c) for both non-adaptive and adaptive with . Overall, the nonadaptive version of eSchedule performs worse when viewing long videos than with the short videos, but the adaptation mechanism clearly improves the results. The results seem to improve more in the cases of large amount of tail energy (3G and LTE) than in the cases of small amount of tail energy. F. Impact of Sample Size We now study the impact of the number of views to the energy overhead. A new video that has been only viewed a few times has only a small sample size of the viewing behavior. We assume that the viewing statistics converge to a certain distribution. Therefore, the more times the video has been viewed, the larger the sample size and the more accurately can the viewing behavior be predicted. We simulated the viewing of a particular video 500 times so that the viewing behavior follows the original statistics (as in the earlier cases). However, this time we computed the viewing statistics to be used by eSchedule progressively so that each simulated streaming session produced one new sample. In addition, we simulated 2000 times the viewing with each sample size. We then computed the energy overhead (compared to oracle) with eSchedule using such partial viewing statistics and compared that to eSchedule using the full statistics. We quantify their difference in terms of overhead difference in percentage points. The summarized results for selected short and long videos are shown in Fig. 12. In order to contrast results with short and long tail energy, we only study Wi-Fi and 3G, as LTE and DRX cases provide no further insights. Overall, the results show that surprisingly few views is enough to allow eSchedule to work efficiently. One hundred views seems to be more than enough and already after 50 views the performance is fairly good.

This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination. SIEKKINEN et al.: USING VIEWING STATISTICS TO CONTROL ENERGY AND TRAFFIC OVERHEAD IN MOBILE VIDEO STREAMING

11

A. Download Scheduler

Fig. 12. Impact of sample size of viewing statistics on the energy overhead with eSchedule. The difference is in percentage points (pp).

We implemented the download scheduling component according to eSchedule-h as described in Algorithm 2. It takes the viewer retention statistics of a video as input. We used a lookahead of two chunks ( ). In addition, the algorithm requires as inputs the encoding rate of the stream, the downloading rate, and the wireless interface being used and their respective power models. The downloader component, described in the next section, infers and feeds these metrics to the download scheduler. The power models are pre-configured for each network interface type. The power consumption models for Wi-Fi, 3G, and LTE are implemented in the same way as we did for the Matlab evaluation (Section IV). Since, there are no open APIs to obtain information about the states of RRC protocols, we implemented the 3G power model knowing that both the smartphone and our commercial HSPA network support Fast Dormancy with an inactivity timer of 5 s. In the case of LTE, we also used a commercial network and found the RRC inactivity timer to be 10 s. The download scheduler also takes the current position of playback as input. If the user does not watch the stream continuously but instead jumps forward or backward while streaming, the scheduler simply computes the next chunk size taking into account the viewer retention data when starting from the new position. In order to limit the number of possible schedules and computational complexity of the scheduling, we use five seconds as the minimum chunk size. B. Downloader

Fig. 13. Energy overhead difference between heuristic and optimal versions of the algorithm. Videos 1–10 are shorter and 11–16 longer than 5 min. Note the ). (b) Look vastly different -axes scales. (a) Look ahead one chunk ( ). ahead two chunks (

G. Optimal Versus Heuristic In the final set of simulations, we compared the algorithm that computes the optimal schedule to the version using a heuristic. The heuristic version is interesting because it provides a way to trade off energy saving potential with computational complexity of the algorithm, which may be important with lower end smartphones. The results presented in Fig. 13 suggest that the performance of the heuristic version of the algorithm is substantially worse compared to the optimal when using only one chunk lookahead. However, the results improve dramatically when just looking ahead two chunks, although the mean of the energy overhead difference with most of the long videos is still non-negligible. It is noteworthy that the difference is substantially larger for certain specific videos. The reason is that some viewing patterns are easier to predict than others, which can be understood by looking at Fig. 4. V. ANDROID PROTOTYPE We developed an Android application that integrates a YouTube downloader and eSchedule-h, i.e., the heuristic version of the algorithm. Here, we describe both components of the application and some measurement results from testing the application.

A streaming session begins by retrieving the actual downloading URLs and other meta data, such as duration, from the server. The downloader then selects the URL according to the preferred quality and downloads video content from the server in chunks whose sizes are determined by the download scheduler. In the beginning of a streaming session, the downloader knows neither the encoding rate of the video nor the download rate (i.e., the current TCP bulk transfer capacity). Therefore, the downloader starts by downloading 5 s worth of content, a minimum size chunk, during which it infers the encoding rate and measures the download rate and lets the scheduler make the first scheduling decision. If the scheduler decides that a longer than five seconds chunk is to be downloaded, the downloader makes immediately another HTTP request for the remaining content of the chunk. These steps are repeated whenever a new chunk is to be downloaded so that a variable download rate can be taken into account when making scheduling decisions. It is common that video service providers configure their servers to throttle the download rate of the client, which lowers the energy efficiency compared to unconstrained downloading, as we observed in Section II. Our downloader circumvents the rate control by YouTube by exploiting the Fast Start procedure. The downloader divides a chunk into smaller “subchunks” having duration equal to or less than the content transmitted during Fast Start (40 s). These subchunks are downloaded one after another by issuing consecutive requests to the server, which ensures that the entire chunk is downloaded at the full TCP bulk transfer capacity. In this way, the downloader reduces

This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination. 12

IEEE/ACM TRANSACTIONS ON NETWORKING

Fig. 14. Viewer retention and chunk sizes (in seconds) chosen by eSchedule for the two videos. (a) Viewer retentions. (b) Chunk sizes (198 s). (c) Chunk sizes HSPA (399 s). (399 s). (d) Wi-Fi

the active usage time of wireless interfaces and the total energy consumption significantly. The downloader must also ensure that the playback buffer does not run dry in between two consecutive chunk downloads. Such an event is more likely to happen for a client accessing the service through a mobile network because of delay associated with RRC state promotion. For example, this ramp-up delay can be up to 3 s when using an HSPA access and the UE must transition from IDLE to CELL_DCH state [22]. Therefore, our downloader starts to fetch the next chunk five seconds before the playback buffer becomes completely empty. Wang et al. [17] also suggested the same guard interval. C. Experiments We used the Android prototype with different access networks. The Wi-Fi access point we used was connected to a 100 Mbit/s university network and the smartphone had access to both 3G and LTE networks. We streamed two YouTube videos, a short (198 s) and a longer one (399 s), on Samsung Galaxy SIII 4G using: 1) our app running the eSchedule prototype; 2) the default YouTube app; 3) whole video download; and 4) an ON-OFF-M download strategy without server throttling which downloads a new chunk of video after every 60 s. Both videos are of 360 p quality. Fig. 14 illustrates how eSchedule adapts the download strategy to the viewer retention, downloading rate and the power consumption characteristics of the different wireless network interfaces. Fig. 14(a) shows that the shorter video has good viewer retention till the end of the video, whereas the retention for the longer video resembles exponential decay. When streaming the shorter video over 3G and LTE, the scheduler chooses to download the whole video in one go, as shown in Fig. 14(b), because of the large amount of tail energy and relatively strong viewer retention. The longer video is split into three chunks due to the large likelihood of abandoning [Fig. 14(c)]. In the Wi-Fi case, the chosen chunk sizes for the long video increase as the viewing progresses, which intuitively matches the decreasing trend of abandoning probabilities. We also compute the energy waste for each streaming session as a function of time by subtracting the cumulative energy consumption estimate calculated for the oracle from the cumulative energy consumption measured for the different strategies. The oracle strategy downloads the right amount of content in each case. We assume that Oracle would on the average draw the same amount of current while downloading content and achieve the same average download rate than the

Fig. 15. Energy waste compared to Oracle while streaming the 399 s video using Galaxy SIII 4G. (a) Wi-Fi. (b) LTE.

eSchedule prototype. Fig. 15 shows how the energy waste progresses when viewing the long video using Wi-Fi and LTE access. The viewing statistics suggest that user abandoning is continuous but the rate of abandonment decreases as the viewing progresses. For this reason, when streaming over the Wi-Fi access, eSchedule chooses chunks that are of increasing size while the viewing progresses. The larger tail energy of LTE makes eSchedule choose three large chunks. ON-OFF-M uses a large number of chunks, which increases the amount of energy waste using 3G and LTE. At a first glance, it looks like downloading the whole video is a good idea. However, the viewer retention suggests that the video loses around 50% of its viewers during the first 35% of total duration and for those viewers the amount of energy wastes would be larger compared to the download schedule chosen by eSchedule. Fig. 14(d) shows two example streaming situations where the wireless connectivity changes in the middle of streaming the longer video. In the first case, the phone switches from Wi-Fi to 3G access after the third chunk is downloaded. In the second case, the phone switches from 3G to Wi-Fi access after the first chunk is downloaded. We note that our download scheduler correctly adapts to the new situation in both cases and changes the download strategy accordingly. Specifically, the scheduler switches to shorter chunks when the access changes from 3G to Wi-Fi and vice versa. D. Discussion Although our prototype integrates eSchedule into the clientside application, other deployment possibilities also exist. The video streaming service provider that also maintains the viewing statistics can run eSchedule and make servers deliver optimal chunk sizes to clients. Such deployment is immediately possible as opposed to a third party deployment, which is limited by the

This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination. SIEKKINEN et al.: USING VIEWING STATISTICS TO CONTROL ENERGY AND TRAFFIC OVERHEAD IN MOBILE VIDEO STREAMING

lack of open access to viewing retention data. Alternatively, a mobile network operator could maintain viewing statistics and run eSchedule in proxy servers that perform the optimal chunk size selection. Adaptive streaming is rapidly gaining ground with mobile streaming services. Dynamic Adaptive Streaming over HTTP (DASH) [23] is currently the most prevalent approach. It switches to a different bitrate (and quality) on the fly as the available bandwidth fluctuates. It is client centric in that the client estimates bandwidth availability and makes decisions on which quality video chunk to download. eSchedule can be integrated into a DASH client so that the calculation of the optimal chunk size to be downloaded next is triggered each time upon bitrate switching. We also quantified the energy overhead of running the prototype in the smartphone. Specifically, we measured the download scheduler that implements the eSchedule-h algorithm. We measured that Galaxy SIII 4G spent only 15 mW in computing the chunk sizes which is negligible compared to the total power consumption including the playback and downloading power consumption. The eSchedule algorithm requires an accurate power model that, in case of mobile network access, includes timers which may differ between mobile networks. These timers are operator controlled and their values are not available through any standard API in a smartphone. Fortunately, earlier research has shown that it is possible to infer these timer values in an automated manner [24]. Power states are also part of the power models. This information needs to be pre-configured to eSchedule as obtaining the power states accurately requires external power monitoring tools. The power states are phone model specific and they can be shared between users. In case a user behaves in a consistently biased way, at least for some time, it is possible to make eSchedule adapt to it. A limitation of eSchedule is that even though we designed a mechanism to account for biased behavior, it still adapts to global statistics. An interesting but challenging piece of future work would be to consider how eSchedule could be extended to support also personalized statistics. Such extension would bear resemblance to recommender systems and would benefit from the large body of research done in that domain. The actual algorithm of eSchedule that calculates the optimal downloading schedule would still work in the exact same way but would just be given different statistics for different users. VI. RELATED WORK Energy consumption for multimedia streaming in mobile devices has been studied before. Most of the early work focused on streaming over Wi-Fi access because cellular networks did not yet provide sufficient bandwidth for video streaming. Some recent papers consider also the cellular access network. We next discuss the most important parts of that body of work and compare it to our work in this paper. Anand et al. proposed adapting Wi-Fi power management in response to access patterns and application hints on data access [25]. Bagchi [26] also presented a solution for streaming over Wi-Fi, one in which a player maintains a fixed playback buffer size and requests data from the server when the buffer

13

status reaches a low buffer threshold. The alternative is that the player plays from the playback buffer and ceases downloading. This solution is similar to the ON-OFF-S mechanism discussed in Section II. Two other similar approaches [27], [28] modify TCP window-size of IP packets to trigger the TCP flow control mechanism artificially, which eventually generates bursty traffic when the TCP window-size is modified to a higher value. These solutions save energy by forcing the Wi-Fi into sleep mode, which means they avoid any potential auxiliary traffic such as TCP control packets, and, at the same time, the application layer keeps messages alive. Hoque et al. [29] study also TCP-based multimedia streaming and propose an energy optimization proxy that uses traffic shaping to serve content to clients in bursts and automatically determines the optimal chunk size. None of the above mentioned solutions address the problem of users abandoning the viewing of the video. Several kinds of optimization techniques exist to reduce energy while communicating over 3G. For example, RadioJockey mines program execution in order to optimize the use of Fast Dormancy in 3G communication and in that way reduces energy consumption [10]. However, it does not actually target streaming; instead it focuses on background apps. ARO [30] and TOP [31] have similar objectives but they require active participation from application developers. Bartendr saves energy by prefetching streaming content when the signal strength is good [32]. It is in fact a complementary mechanism that could be integrated with eSchedule. Some work has looked at scheduling of mobile traffic based on the power consumption characteristics of wireless radios. For example, CoolSpots propose to schedule low bit rate video transmission over Bluetooth and higher bit rate video over Wi-Fi [33]. Such a solution is orthogonal to what we propose in this paper. If eSchedule is used with a downloader that fetches each chunk of video over a separate TCP connection, such as the one our prototype features, CoolSpots could complement the system to save more energy by downloading chunks over Bluetooth when deemed beneficial. There are also several measurement papers that touch on the subject of our work. For instance, Balasubramanian et al. [3] studied the energy consumption of 3G data communication and Huang et al. [11] examined the LTE power characteristics. Trestian et al. [34] specifically studied streaming and energy consumption in. In addition, also other Quality of Experience aspects besides energy consumption of mobile video have been studied. For example, Shafiq et al. [35] report on a large scale measurement study of mobile video usage. Li et al. [18] presented GreenTube which is a solution closely related to ours. They propose as a solution to reduce the energy consumption while streaming YouTube videos to Android phones. The download scheduling part of GreenTube has two important differences to eSchedule: First, it is based on users' local viewing history rather than global per-video statistics that we propose to use in this work. Second, the use of expected value of viewing time as the sole input to scheduler leads to less than optimal energy consumption as observed in Section IV. Finally, our earlier paper [36] presented the idea of using viewing statistics to optimize energy efficiency in wireless video streaming. In this article, we substantially extended that work

This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination. 14

IEEE/ACM TRANSACTIONS ON NETWORKING

by proposing an algorithm to compute the optimal schedule in addition to the heuristic version and by adding mechanisms to explicitly control the traffic overhead and to adapt to persistent user bias. VII. CONCLUSION We have presented eSchedule, an algorithm to compute energy optimal download schedule of video content in mobile video streaming. The algorithm relies on the use of viewing statistics to predict user behavior. It can also be used to control traffic overhead in streaming and still provide energy efficiency, which is of particular interest for mobile network operators. As future work, we plan to study further the viewing behavior in mobile video streaming by means of traffic analysis. We are particularly interested in understanding the dynamics and context dependency of the viewer retention. REFERENCES [1] “Cisco visual Networking Index: Forecast and Methodology, 2012–2017” Cisco, 2013, White Paper. [2] A. Finamore, M. Mellia, M. M. Munafò, R. Torres, and S. G. Rao, “Youtube everywhere: Impact of device and infrastructure synergies on user experience,” in Proc. ACM SIGCOMM Conf. Internet Meas. Conf., New York, NY, USA, 2011, pp. 345–360. [3] N. Balasubramanian, A. Balasubramanian, and A. Venkataramani, “Energy consumption in mobile phones: A measurement study and implications for network applications,” in Proc. 9th ACM SIGCOMM Conf. Internet Meas. Conf., New York, NY, USA, 2009, pp. 280–293. [4] L. Guo, E. Tan, S. Chen, Z. Xiao, O. Spatscheck, and X. Zhang, “Delving into Internet streaming media delivery: A quality and resource utilization perspective,” in Proc. 6th ACM SIGCOMM Conf. Internet Meas., New York, NY, USA, 2006, pp. 217–230. [5] M. A. Hoque, M. Siekkinen, and J. K. Nurminen, “Dissecting mobile video services: An energy consumption perspective,” in Proc. 14th IEEE Int. Symp. a World of Wireless, Mobile and Multimedia Networks, 2013, pp. 1–11. [6] IEEE Standard for Information Technology - Telecommunications and Information Exchange Between Systems - Local and Metropolitan Area Networks - Specific Requirements - Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications, 802.11, 2007. [7] Radio Resource Control (RRC); Protocol Specification, 3GPP TS 25.331, 1999. [8] E-UTRA; Radio Resource Control (RRC) Protocol Specification, 3GPP TS 36.331, 2008. [9] GSM Assoc., Network Efficiency Task Force, “Fast Dormancy Best Practices,” 2010. [10] P. K. Athivarapu, R. Bhagwan, S. Guha, V. Navda, R. Ramjee, D. Arora, V. N. Padmanabhan, and G. Varghese, “RadioJockey: Mining program execution to optimize cellular radio usage,” in Proc. 18th Annu. Int. Conf. Mobile Comput. and Network., New York, NY, USA, 2012, pp. 101–112. [11] J. Huang, F. Qian, A. Gerber, Z. M. Mao, S. Sen, and O. Spatscheck, “A close examination of performance and power characteristics of 4G LTE networks,” in Proc. 10th Int. Conf. Mobile Syst., Applic., Services, New York, NY, USA, 2012, pp. 225–238. [12] M. A. Hoque, M. Siekkinen, J. K. Nurminen, M. Aalto, and S. Tarkoma, “Mobile multimedia streaming techniques: QoEe and energy saving perspective,” Pervasive and Mobile Comput., vol. 16, no. 0, pt. A, pp. 96–114, 2015. [13] A. Balachandran, V. Sekar, A. Akella, S. Seshan, I. Stoica, and H. Zhang, “Developing a predictive model of quality of experience for Internet video,” in Proc. ACM SIGCOMM Conf. SIGCOMM, New York, NY, USA, 2013, pp. 339–350. [14] Audience Retention, , 2014 [Online]. Available: https://support.google. com/youtube/answer/1715160?hl=en [15] M. Siekkinen, M. Hoque, J. K. Nurminen, and M. Aalto, “Streaming over 3G and LTE: How to save smartphone energy in radio access network-friendly way,” in Proc. 5th ACM Workshop on Mobile Video, 2013, pp. 13–18.

[16] B. Jackson, J. D. Scargle, D. Barnes, S. Arabhi, A. Alt, P. Gioumousis, E. Gwin, P. Sangtrakulcharoen, L. Tan, and T. T. Tsai, “An algorithm for optimal partitioning of data on an interval,” IEEE Signal Process. Lett., vol. 12, no. 2, pp. 105–108, Feb. 2005. [17] B. Wang, J. Kurose, P. Shenoy, and D. Towsley, “Multimedia streaming via TCP: An analytic performance study,” ACM Trans. Multimedia Comput. Commun. Appl., vol. 4, no. 2, pp. 16:1–16:22, May 2008. [18] X. Li, M. Dong, Z. Ma, and F. Fernandes, “GreenTube: Power optimization for mobile video streaming via dynamic cache management,” in Proc. ACM Multimedia, New York, NY, USA, 2012, pp. 279–288. [19] P. J. Rousseeuw, I. Ruts, and J. W. Tukey, “The bagplot: A bivariate boxplot,” Amer. Statistician, vol. 53, no. 4, pp. 382–387, Nov. 1999. [20] S. Verboven and M. Hubert, “Matlab library libra,” Wiley Interdisciplinary Reviews: Computat. Statistics, vol. 2, no. 4, pp. 509–515, 2010. [21] A. Chakraborty, V. Navda, V. N. Padmanabhan, and R. Ramjee, “Coordinating cellular background transfers using loadsense,” in Proc. 19th Annu. Int. Conf. Mobile Comput. and Network., New York, NY, USA, 2013, pp. 63–74. [22] F. Qian, Z. Wang, A. Gerber, Z. M. Mao, S. Sen, and O. Spatscheck, “Characterizing radio resource allocation for 3G networks,” in Proc. 10th ACM SIGCOMM Conf. Internet Meas., New York, NY, USA, 2010, pp. 137–150. [23] T. Stockhammer, “Dynamic adaptive streaming over HTTP –: Standards and design principles,” in Proc. 2nd Annu. ACM Conf. Multimedia Syst., New York, NY, USA, 2011, pp. 133–144. [24] F. Qian, Z. Wang, A. Gerber, Z. M. Mao, S. Sen, and O. Spatscheck, “Characterizing radio resource allocation for 3g networks,” in Proc. 10th ACM SIGCOMM Conf. Internet Meas., New York, NY, USA, 2010, pp. 137–150. [25] M. Anand, E. B. Nightingale, and J. Flinn, “Self-tuning wireless network power management,” in Proc. 9th Annu. Int. Conf. on Mobile Comput. and Network., 2003, pp. 176–189. [26] S. Bagchi, “A fuzzy algorithm for dynamically adaptive multimedia streaming,” ACM Trans. Multimedia Comput. Commun. Appl., vol. 7, pp. 11:1–11:26, 2011. [27] H. Yan, R. Krishnan, S. A. Watterson, D. K. Lowenthal, K. Li, and L. L. Peterson, “Client-centered energy and delay analysis for TCP downloads,” in Proc. IWQOS, 2004, pp. 255–264. [28] E. Tan, L. Guo, S. Chen, and X. Zhang, “PSM-Throttling: Minimizing energy consumption for bulk data communications in WLANs,” in Proc. Int. Conf. Network Protocols, 2007, pp. 123–132. [29] M. A. Hoque, M. Siekkinen, J. K. Nurminen, S. Tarkoma, and M. Aalto, “Saving energy in mobile devices for on-demand multimedia streaming—A cross-layer approach,” ACM Trans. Multimedia Comput. Commun. Appl., vol. 10, no. 3, pp. 25:1–25:23, Apr. 2014. [30] F. Qian, Z. Wang, A. Gerber, Z. Mao, S. Sen, and O. Spatscheck, “Profiling resource usage for mobile applications: A cross-layer approach,” in Proc. 9th Int. Conf. Mobile Syst., Applic., Services, New York, NY, USA, 2011, pp. 321–334. [31] F. Qian, Z. Wang, A. Gerber, Z. M. Mao, S. Sen, and O. Spatscheck, “TOP: Tail optimization protocol for cellular radio resource allocation,” in Proc. 18th IEEE Int. Conf. Network Protocols, Washington, DC, USA, 2010, pp. 285–294. [32] A. Schulman, V. Navda, R. Ramjee, N. Spring, P. Deshpande, C. Grunewald, K. Jain, and V. N. Padmanabhan, “Bartendr: A practical approach to energy-aware cellular data scheduling,” in Proc. 16th Annu. Int. Conf. Mobile Comput. and Network., New York, NY, USA, 2010, pp. 85–96. [33] T. Pering, Y. Agarwal, R. Gupta, and R. Want, “CoolSpots: Reducing the power consumption of wireless mobile devices with multiple radio interfaces,” in Proc. MobiSys, New York, NY, USA, 2006, pp. 220–232. [34] R. Trestian, A.-N. Moldovan, O. Ormond, and G.-M. Muntean, “Energy consumption analysis of video streaming to android mobile devices,” in Proc. IEEE Network Oper. Manag. Symp., Apr. 2012, pp. 444–452. [35] M. Z. Shafiq, J. Erman, L. Ji, A. X. Liu, J. Pang, and J. Wang, “Understanding the impact of network dynamics on mobile video user engagement,” in Proc. ACM Int. Conf. Meas. Modeling Comput. Syst., New York, NY, USA, 2014, pp. 367–379. [36] M. A. Hoque, M. Siekkinen, and J. K. Nurminen, “Using crowd-sourced viewing statistics to save energy in wireless video streaming,” in Proc. 19th Annu. Int. Conf. Mobile Comput. Network., New York, NY, USA, 2013, pp. 377–388.

This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination. SIEKKINEN et al.: USING VIEWING STATISTICS TO CONTROL ENERGY AND TRAFFIC OVERHEAD IN MOBILE VIDEO STREAMING

Matti Siekkinen received the M.Sc. degree in computer science from Helsinki University of Technology, Helsinki, Finland, in 2003, and the Ph.D. degree from Eurecom/University of Nice Sophia-Antipolis, Nice, France, in 2006. He is currently holds Postdoctoral position with Aalto University, Espoo, Finland. His current research focuses on mobile computing, network measurements, and Internet protocols with a special interest in energy efficiency.

Mohammad Ashraful Hoque received the M.Sc. degree in computer science and engineering and Ph.D. degree from Aalto University, Espoo, Finland, in 2010 and 2013, respectively. He is currently a Post Doctoral Researcher with the Helsinki Institute for Information Technology, Helsinki, Finland, and the University of Helsinki, Helsinki. His research interests are energy efficient mobile computing, data analysis, distributed computing, scheduling, and machine learning.

15

Jukka K. Nurminen received the M.Sc. and Ph.D. degrees from Helsinki University of Technology, Helsinki, Finland, in 1986 and 2003, respectively. He has been a Professor with Aalto University, Espoo, Finland, since 2011. He has almost 25 years of experience in software research at Nokia Research Center. His experience ranges from mathematical modeling to expert systems, from network planning tools to solutions for mobile phones, and from R&D project management to tens of patented inventions.

Suggest Documents