T-110.6120 Energy-efficient Mobile Computing Energy-efficient wireless networking 23.4.2014 Matti Siekkinen Outline • • • • • Intro Standard power management techniques Beyond standard techniques Example optimizations Conclusions Energy efficiency of wireless and mobile networking • In short: Resulting battery life when using smartphone to access the Internet • Two concepts – Wireless communication: use radio(s) to communicate – Mobile networking: move while communicating • Using radio requires a certain amount of power – How much depends on the type of wireless technology • Basically the PHY and MAC layers • Being mobile means that this power is not constant – We’ll come to the causes and consequences later on… Questions, questions… • Q: Which one is more energy efficient? – – – – 3G, WLAN, or LTE? Lumia 920 or iPhone 5? P2P or C/S? ... • A: It depends... 4 A glance at power consumption… 3.000 (5,2.249) 2.500 (211,2.516) ? ? 1.500 (10,1.281) ? (113,1.494) 1.000 0.500 WLAN WCDMA 0.000 1 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 115 120 125 130 135 140 145 150 155 160 165 170 175 180 185 190 195 200 205 210 215 220 225 230 235 240 243 245 249 Power(Watt) 2.000 Time(second) Watching YouTube from N95 5 Energy efficiency of wireless and mobile networking • Energy efficiency: Spend as few Joules over a period of time as possible – Minimal average power consumption • How to improve the efficiency by means of software? – Switch off unnecessary hardware • Some of the radio circuitry – Increase the number of bits transmitted/received per Joule spent – Reduce the number of bits to transmit/receive Outline • Intro • Standard power management techniques – Wi-Fi – Cellular networks – Tail energy • Beyond standard techniques • Example optimizations • Conclusions Standard power management techniques • Operation defined in a standard document • Usually – implemented by each and every device – requires cooperation between mobile device and the network • Wi-Fi: IEEE 802.11 standard • Cellular networks: 3GPP releases – UMTS (3G, Rel-99) – LTE (4G, Rel-8) WNI states and transitions • Management of wireless network interface happens through different states – Set of states are technology specific • WNI transitions from state to another according to some rules – Promotions based on traffic demand – Demotions usually timer specified • What states? – E.g. receive, idle, and sleep in WiFi – Correspond to specific modes of the hardware – CELL_DCH, CELL_PCH etc. for 3g • Correspond to different kind of resource allocation (i.e. channel type) • States have different power characteristics – Part of circuitry can be powered off at run time (sleep) CHAPTER 2. LTE 13 For real-time streaming applications such as voice calls, the data sent during every transmission and the bandwidth utilized are very small. For applications transmitting small amount of data for many times semi persistent scheduling is more adaptable in which the UE does not need to request for a Grant each time for transmission of data. Instead, the UE is provided Traffic RRC Inactivity with a transmission pattern which it follows and transmits the data during burst timer that particular time slot. For example, during a voice call running the UE sends an initial SR and gets the transmission pattern from the scheduler after which the data is sent on the allocated time. This reduces the complexities and overhead of the scheduler and the UE. There are many di↵erent types of scheduling algorithms which are designed based on the need of vendors. Commonly used algorithms include Round Robin [42], Proportional Fair [47], Maximum Channel Quality Index (CQI) [43], Channel aware scheduling algorithm [42]. RRC_IDLE Wi-Fi, 3G, LTE: different power states 2.3 LTE UE and RRC States In LTE, a UE can shift between three states namely, RRC DISCONNECTED, RRC CONNECTED and RRC IDLE. SLEEP RECEIVE PSM TRANSMIT Timeout IDLE Figure 2.4: States of LTE UE Initially, when the UE is in the OFF state, it does not hold any active connection with the eNodeB. The state at which the UE is turned on and is searching for a possible base station for registration or the phase when the UE is in Airplane mode could be termed as RRC DETACHED Outline • Intro • Standard power management techniques – Wi-Fi – Cellular networks – Tail energy • Beyond standard techniques • Example optimizations Wi-Fi (802.11) power consumption • Power consumption depends on operating mode Energy = Power(operating mode)* Duration(operating mode) Continuously Active Mode (CAM) Power Saving Mode(PSM) SLEEP PS IDLE RECEIVE PR RECEIVE TRANSMIT TRANSMIT PT IDLE PI 12 Wi-Fi operating modes and power • Order of magnitude less power drawn in sleep state WNI operating mode Average Power (W) Nokia N810 HTC G1 Nokia N95 IDLE 0.884 0.650 1.038 SLEEP 0.042 0.068 0.088 TRANSMIT 1.258 1.097 1.687 RECEIVE 1.181 0.900 1.585 Wi-Fi power saving • Allows (part of) Rx/Tx circuitry to be temporarily shut down • Coordinated with the AP 1. 2. 3. 4. Node-to-AP: “I am going to sleep until next beacon frame” AP knows not to transmit frames to this node, buffers them Node wakes up before next beacon frame Beacon frame: contains list of mobiles with AP-to-mobile frames waiting to be sent • Traffic Indication Map (TIM) 5. Any frames buffered for the node? • Yes à request for them from AP and stay awake until received • No à go back to sleep until next beacon frame 14 Wi-Fi power saving (cont.) • Standard PSM is poison for interactive applications – Frequent transitions to and from sleep mode adds lot of delay • “Adaptive” version used in practice – Use timer: if no frames for 100-200ms, then sleep – Timer value is device specific PSM timeout Rx Tx PSM timeout Idle Sleep 15 Outline • Intro • Standard power management techniques – Wi-Fi – Cellular networks – Tail energy • Beyond standard techniques • Example optimizations • Conclusions CELL-­‐ PCH T2 pagingCEL T3 R Fast Dormancy IDLE – Consequently, power consumption of a mobile phone too T1 CELL-­‐ FACH • Radio resources (channel usage) controlled by the Radio Resource Control (RRC) protocol bulk low vol. data traffic CELL-­‐ DCH 3G power management Timer expiry Rx/Tx Saving Energy in Mobile Devices Through TCP Receive B • Four states and three inactivity timers – States correspond to transport channels • Dedicated channel (DCH),T1Forward access channel (FACH), Paging channel (PCH) – In practice, timers are not just single CELL_DCH CELL_FACH parameter Data Activity Da t a T2 Ac tiv ity • e.g. track average nb of bytes over time Da ta window and useActhresholds CELL_PCH tiv ity • typically at least a few seconds long low power high power CELL_DCH CELL_FACH T3, – Operator controlled, phone cannot change RRC Connect RRC Disconnect CELL_PCH IDLE RRC with Four States Fig. 1: 3G state transitions and power consumption in di↵erent states. LTE power management • Same concept than in 3G • Simplified RRC protocol – Only two states: RRC_CONNECTED and RRC_IDLE – Inactivity timer to switch to RRC_IDLE • typical value: 10s Traffic burst RRC Inactivity timer running RRC_CONNECTED current drawn by LTE smartphone RRC_IDLE Outline • Intro • Standard power management techniques – Wi-Fi – Cellular networks – Tail energy • Beyond standard techniques • Example optimizations • Conclusions Tail energy • All wireless network interfaces exhibit tail energy – Energy spent being idle with radio on à wasted energy • Due to inactivity timers – Mandate how long radio remains in active state (rx on) before state transition to inactive state (rx (partly) off) • Timers are necessary – Sporadic communication patterns might lead to very frequent transitions – State changes require signaling between phone and base station • Transmitted on shared channel with limited capacity • Signaling traffic volumes must be limited – Also switching between hardware modes adds some delay • Timer values vary between technology – Wifi≈100-200ms – 3G and LTE: in the order of seconds (varies between ISPs) How to minimize tail energy? • Wi-Fi tail is already short – No need for specific mechanisms • Fast Dormancy for 3G – Cuts tail duration down to 3-5s • DRX/DTX for LTE – Especially cDRX/cDTX: connected mode discontinuous reception/ transmission – Typically cuts tail duration down to a few hundred milliseconds • 3G has also CPC – Continuous packet connectivity – Similar to LTE’s cDRX/DTX – Introduced in Rel-7 but often not (yet?) fully supported by deployed networks and devices Fast Dormancy (3G) • Two flavors: legacy and standard • Legacy came first and is phasing out – Phone transmits SIGNALING CONNECTION RELEASE INDICATION msg à tears down PS signaling connection • Normally phone uses to communicate some error conditions – Good: Results in immediate transition to low power IDLE – Bad: new communication requires re-establishing of signaling connection à frequent use causes signaling storms • Standard FD in Rel-8 is network controlled – Phone requests network to transition it into an appropriate state (e.g. CELL_PCH) – Network either allows or denies and decides appropriate state • E.g. too frequent requests are rejected not receive any data for a certain time, it enters the DRX cycle phase and activates the Short DRX cycle with Short DRX timer (Ts). In the Short DRX cycle state, the UE monitors the PDCCH during the DRX OnTimer period. Connected mode DRX/DTX (LTE) 1. States of LTE UE • DRX works in LTE’s Fig.connected state – Hence, also called cDRX (connected Initially, when the UE is in the OFF state, it does not hold mode DRX)any active connection with the eNodeB. The state at which the UE is turned on and is searching for a possible base station for registration or the phase when the UE is in Airplane mode could be termed as RRC DISCONNECTED state. Once the – Check periodically new data is waiting UE finds base if station coverage, it registers to the Mobility Entity (MME) through the LTE Attach proce– Very similarManagement to PSM in 802.11 dure. After the registration is successful, the UE moves to the RRC CONNECTED state. In the RRC CONNECTED state the RRC inactivity timer (T ) arriving data UE has a Radio Resource Control (RRC) connection with theidle eNodeB and maintains an active connection through various Fig. 2. RRC State transition of LTE UE C ONNECTED STATE IDLE STATE signaling messages. Once the UE sleeps for a longer duration on without any data transmission, it moves to the RRC IDLE The Short DRX timer is active for a time period called as state after the expiry of inactivity timer (Inactivity). When the UE is out of coverage area, or during the process of the Short DRX timer period (TS)after which the UE activates off area update it de-registers with the eNodeB and moves to the Long DRX timer (Tl). In Long DRX cycle, the wakeup duration of the UE for monitoring the PDCCH is less frequent DRXRRC inactivity transition DISCONNECTED state. DRX cycle DRX on-duration cycle. Once the UE enters the Long DRX is the that was than the Short DRXto timer DRX (DRX ) saving mechanism in LTE, timer idlepower (DRX shifts ) from theIdle RRC CONNECTED to RRC IDLE (DRX c) consumption by cycle, it on introduced in order to reduce the power making the UE to move to sleep and idle states when there mode if the Inactivity timer expires. When the UE gets an is no data transmission to and from the UE based on specific intimation about data to be received through the PDCCH, or when it needs to transmit data, it moves from RRC IDLE timers. In order to obtain information about scheduling, the User mode to RRC CONNECTED mode. Once all the data is Equipment (UE) monitors the physical down-link control transmitted, the UE again activates the DRX cycle in the • DRX operates in cycles Rx Rx Outline • • • • • Intro Standard power management techniques Beyond standard techniques Example optimizations Conclusions Is there room for optimization? • Typical application consumes a lot more energy than is strictly necessary – Even with standard power saving mechanisms • Three reasons: 1. Radio hardware is not perfectly power proportional to the offered load 2. Energy utility of wireless communication is context dependent 3. The underlying hardware power management mechanisms are rarely optimal for the applications being used 25 Power (dis)proportionality • Power draw does not scale linearly with amount of work done – Bits transmitted/received per Joules spent typically increases with data rate • Idle power consumed by hardware just being powered on – That constant power added regardless of transmission rate • Idle power takes a larger share of slower transmission – Over-the-air (OTA) data rate of wireless channel != throughput – Each packet may be transmitted continuously at OTA rate but idle time in between packets spent as tail energy Energy efficiency is context dependent Context Type of WNI used energy utility of data transmission energy spent by connectivity mgmt Quality of wireless network access Network load Signal quality throughput • Moving user experiences varying signal quality data rate (modulation) tx power – Dynamic switching of modulation based on SNR à data rate changes – Poor SNR à link layer retransmissions – Worse SNR requires more transmit power • Affects also reception (cont. tx of signaling msgs) • Static user may experience varying network load – Other users take up air time Limits of underlying hardware power management mechanisms • Hardware power management mechanisms implemented at PHY/MAC layers – The protocol stack layers that interface the hardware • Separation of concerns in the layered protocol design – Layer is concerned only about its own responsibilities and functionalities – Cross-layer protocols are not so common • At least not those that cross the stack up to application layer • à power management mechanisms are completely unaware of application behavior – Same mechanism regardless of the type of application How can we do better? • Traffic scheduling – – – – Shape traffic to improve energy utility (bits per joules) Reduce energy spent due to contention Take context dependency into account Handling background traffic energy efficiently • Smart use of wireless network interfaces – Smartphones have many – Use always the most energy efficient one – Often requires ability to predict connectivity • Application specific optimizations Outline • • • • Intro Standard power management techniques Beyond standard techniques Example optimizations – Traffic shaping in multimedia streaming – Optimized prefetching of video streaming – Context-aware scheduling of transfers • Conclusions (a) On N95 and N810(16-32KBps). (b) On N95 a EnergyFig. utility 6. Energy utility of TCP upload with single flow a 2500 Measurements 2000 using Samsung Nexus 1500 S Wi-Fi download (PSM) Energy Utility(KB/J) Energy Utility(KB/J) 2500 2000 1500 1000 500 Measured Estimated 512 1024 1536 2048 2854(no-trickle) Data rate(KBps) 1000 500 512 102 (a) TCP download. (b • Energy utility improves with data rate à should transmit as fast possible Fig. always 7. Energy utility of as TCP download/upload on Ne TCP flows. The biggest value on the X-axis is the m point shows the mean and the standard deviation of TABLE 9 Energy consumed by mobile streaming • Mobile media streaming drains battery quickly – Constant bit rate multimedia traffic is not energy friendly – Forces the network interface to be active all the time Mobile Internet Radio power draw on E-71 (TCP-based streaming) Datarate (kBps) Start-up Time (s) 8 WLAN power (W) 3G power (W) PSM CAM 48kBps 2Mbps 18 0.53 1.06 1.30 1.30 16 10 0.99 1.07 1.30 1.30 24 10 1.04 1.07 1.27 1.35 • Idea: Shape traffic into bursts so that it is more energy efficient to receive – Bursts sent at high data rate – “Race to sleep” Multimedia Traffic Shaping with Proxy • Client sends request to proxy • Proxy Fast Start phase to quickly fill up playback buffer – forwards request to radio server – receives and buffers media stream – repeatedly sends in a single burst to client • 802.11 – PSM is enabled – WNI wakes up to receive a burst at a time – Waste only one timeout per burst • 3G & LTE – Long enough burst interval à inactivity timers expire à switch to lower power state or activate DRX in between bursts 33 Where is the free lunch? • Typical multimedia traffic leaves lots of network capacity unused • Several vantage points possible for traffic shaper proxy placement wireless wired HSPA/LTE 8-3 Wi-Fi bps Internet > 100 Mbp 50 M video server s Web server • Intuition: Use as large as burst size as possible – Maximize sleep time in between bursts Bytes What is the right burst size? Burst, BS=rsxT = buffer Burst Idle period between two consecutive Serverbursts, tidle Duration, tbd Phone streaming Tim client application Burst Interval, streaming server T application 1000not fit entirely à Burst, burst will – Too large sxT 800 TCP BS=r flow control kicks in 600 Idle period – BufferBurst is drained at stream encoding rate between two Duration, 400 à Excess content will be received at consecutive tbd 200 bursts, tidlethat rate Burst Interval, T 3s 192 kbps 124 kbps 0 • Lower energy Time utility 0 1 2 3 4 5 6 7 8 Burst Interval, T (s) 9 10 200 KBytes Avg. Power Consumption (mW) Saving EnergyTCP in Mobilereceive Devices Through TCP Receive Multimedia Streaming • Problem: buffer is ofBu↵er AwareTCP limited size 1200 150 zz zz 2 100 50 1 • 1:5 TCP zz 3 4 too large burst ! TCP flow ctrl active 4:17 4:18 4:19 4:20 4:21 4:22 Time (S) g. 5: Bursty traffic pattern and the idle Fig. 6: Power consumption of Nokia E-71 Fig. 7: The burst received by E-71 when riod between two consecutive bursts. at di↵erent burst intervals via Wi-Fi. T = 10 s. being present with each packet in slow constant bitrate streaming. The bar chart in Figure 6 shows that What is the right burst size? Burst, Bytes • Burst size that offer maximalBS=r energy sxT savings exists – Option 1: Make burst size match Idle period Burstexactly receive buffer size between two Duration, • Max burst sizeconsecutive = playback buffer tbd size +TCP receive bursts, buffert size idle – Option 2: Max burst interval & size limited by amount of initially buffered content Time Burst Interval, T • Cannot let the playback buffer run dry 5: Bursty traffic pattern and the to idle • Optimality ofFig. such burst size is easy period between two consecutive bursts. prove Avg. Power Consumption (mW) Saving Energy in Mobile Devices Through TCP Receive Bu↵er Aw 1200 192 kbps 124 kbps 1000 800 600 400 200 0 0 1 2 3 4 5 6 7 8 Burst Interval, T (s) 9 10 Fig. 6: Power consumption of Nokia E-71 at di↵erent burst intervals via Wi-Fi. – Check: M. Hoque et al. Saving Energy in to being with each packet in slow constant bitrate streaming. T Mobile Devices forpresent On-Demand consumption of Nokia E-71 decreases as the burst interval T or Multimediapower Streaming - A cross-layer duration of the Wi-Fi Approach. the ACM TOMCCAP. 2014.inactivity timer is 200 ms and thus tail ener tail energy phenomenon can hurt much more if the idle period between the size of the bursts are small, especially when streaming via cellular ne timer values are 3many seconds. These inactivity timers would never exp s and zz energy consumption. Therefore, longer burst i 200there would be high of the inactivityzz timers and thus less energy consumption. zz 4 How to find the optimal burst size? • Proxy does not know client’s TCP receive buffer size • Could design a protocol where client informs proxy server – Need custom streaming client software à bad idea • Insight: TCP flow control messages indicate too large burst size – Proxy receives TCP zero window advertisements from client – Provides transparent way of identifying too large burst size • How to probe for right size? – Linearly increasing burst size can take a long time – Use binary search instead o/3G/LTE p/ Wi-Fi p/3G/LTE /Wi-Fi /3G/LTE 16%–328–38 13%–458–38 27%–458–38 15%–452–33 30%–452–33 s s s s s 14%–328–39 s – – – – 4%–280–3 s – – – – 50%-2000-31 s – 54%–2000–39 s – 55%–452–33 s How to find the optimal burst size? ngs at Topt for di↵erent mobile devices using EStreamer, while playing di↵erent audio and video streami Initially d LTE.• The LTE measurement results are only with HTC Velocity phone. – Set max burst size according to initially buffered data Burst Interval • For each burst 12 8 4 40 Burst Interval 10 zwa = 3 1330 8 – Set new burst size to (max-min)/2 6 – Check whether received any ZWAs 1320 zwa = 3 zwa = 2 • No à set min=current burst size4 • 1310 Yes à set max=current burst size 2 and revert back to previous burst size 1300 0 • 500 Stop search when 0 10 20 max-min 30 40 equals 50 Round minimum increment 1250 40 30 Burst Interval – Start min=0 =3 1340fromzwa 1500 Power Consumption mW 16 Burst Interval Consumption nterval • Proxy calculates it during the Fast 1350 Start period Power Consumption Power Consumption mW 20 452 kbps Dailymotion video stream to Nexus One over 3G zwa=4 1000 20 750 Burst Interval 10 Power Consumption 500 0 2 4 6 Round 8 0 10 E.g. 1s2:worth of content Internet Ra-– Figure Streaming 128 kbps Internet Ra- Figure 3: Streaming 452 kbps Dailymotion dio to Nokia E-71 over 3G. video to Nexus One over 3G. e name this burst sending event previous work [5]. Power savings for these two experimen How much energy can be saved? • Overall large savings possible – audio: 36%-65%, video: 20%-55% • Savings depend largely on network type and parameters – 3G/LTE have longer inactivity timers than Wi-Fi – Parameters (timers and DRX) determine the tail energy that can be saved • Stream rate matters as well – Bursting lower rate stream yields larger savings • Smaller savings with video streaming compared to audio – Display draws significant amount of power – Video decoding is more work than audio decoding Outline • • • • Intro Standard power management techniques Beyond standard techniques Example optimizations – Traffic shaping in multimedia streaming – Optimized prefetching of video streaming – Context-aware scheduling of transfers • Conclusions On-demand mobile video stream delivery encoding rate Fast start server throEling non-­‐persistent ON-­‐OFF persistent ON-­‐OFF whole video download DASH !me • Different strategies to deliver video stream content to client – Caused by client software+streaming service combinations – Leads to very different energy consumption Energy consumption of different Energy Efficiency of the Streaming Stra strategies • Several sources of energy inefficiency – Underutilization of the capacity – Auxiliary TCP control traffic (ONOFF-S) – Tail energy in non-continuous content reception Average Current Consumption (mA) 350 LTE 3G Wi−Fi 300 250 200 150 100 50 0 ON−OFF−MON−OFF−S Throttling Encoding Rate Fast Fast Caching Caching(20%) Figure: Avg. current consumed by with Wi-Fi, 3G and LTE Wi-Fi PSM-A • Fast Caching seems best 3Gstreaming (HSPA) with FD Galaxy SIII 4G using different techniques. – But users typically abandon viewing! LTE without DRX – No longer best when aborting after I Wi-Fi interface is managed using PSM-A, HS 20% – Too aggressive prefetching à Dormancy, LTE without DRX. download content that will never be I Playback current consumption is around 200 watched I I Wireless interfaces can deplete battery at equ Fast Caching is the least energy consuming t if the complete video is watched. Optimizing content delivery strategy • Must strike a balance between two sources of energy waste: – Prefetch content in large chunks in order to minimize the tail energy – Limit chunk size in order to reduce the amount of downloaded content that will never be viewed • Need an estimate of when a user will abandon viewing the video à use viewing statistics rs’ Viewing Statistics of a Video Video viewer retention Audience retention 1 0.8 0.6 0.4 0.2 0 0 0.2 0.4 0.6 Fraction of video 0.8 1 • Video clip specific statistics about how a Figure: Audience retention graphsgive frominsights YouTube videos. I I I new user would view the video E.g.: poor content à likely toofabandon early that is still Each – curve shows the fraction the audience • YouTube suchofstatistics watching at a collects given point time. Available only to “video of owner” Some– retain clear majority audience until the end while others lose most of the audience at the very beginning. Video clip specific statistics give useful insights about how a new user will watch the video. eSchedule algorithm • Algorithm that calculates optimal download schedule • Input: – Viewer retention data for the video clip • Ri: “Which fraction of users viewed until time step i” – Power consumption characteristics of WNI used (Prx, Etail) – Video stream rate (renc) and bulk transfer capacity (rdl) • Output: dl schedule S that minimizes expected value of energy waste – Exp amount of energy spent by downloading content that won’t be viewed – Estimate of total tail energy expenditure – S is a concatenation of chunk sizes (n-tuple): S=(T1, T2, …, Tn) X energy depends on the chunk size because⇥ the inactivity ofj =video Spd for Tmin tolength. i step Tmin thetimer totalvalues tailprobability energy and that energy (i k) T ⇥ renc k ⇥data renc (2) schedules, even for a video can be+ downloading directly computed abd wing sessions conditional corresponding to apspent specific radio interface l m Ecurrent = Emin (i j) + one minute in video hastom presented [13] k= +1 is Eq. can T . The tailWe energy added chunk which isaudience not watched. obtain (1) for for afor calculating if Ecurrent < Emin (i) then theexceed retention. The probability a user to(e.g., will watch the from sible schedules). if the value user abandons viewing in the downloading middle of Emin (i) = Ecurrent ; computational comp theeven expected of energy waste when iour depends abandon during a discrete time step j measured from the However, we can use an lastchange(i) = j; In the above equation, r is the encoding rate of enc downloading it. When downloading a chunk containing a video chunk corresponding to T seconds of content is the number of sm dynamic = D programming whic engaging the beginning streaming. We needthe theis probability of as the user end T the seconds worth of also content, expected value of follows: the of the video viewing computed while end 0 do subproblem on > solving abandoning viewing (pabd ).content This i. probability needs be based unnecessarily downloaded isIncalculated using starting from discrete time step this case, Tto repvideo can be divided the potential Probability that user interrupts during a discrete time step j: S = (end for reuse in lastchange(end), later iterations. re-evaluated eachconsists time the next chunk sizefirst is chosen (2). This equation of two parts: the one end lastchange(end); an scheduler integer value. In the equation, rdl Itisis the uling to save resents by=from the minimum chu is computed piece by during theatstreaming session. a schedule corresponds phase during chunk viewer pabdthe (j) =to the p(“abandon j”)which = Rj the = 0) computed 1 pj (X output S; at which contentdownloaded is that downloaded (i.e., computed TCP bulk tationalWe complexity grows m ficant amount rate conditional probability can be outline the com being simultaneously anddirectly consumed, and retention data (Ri) Specifically = R (1 p (X = 1)) = R R (3) j 1 j j 1 j of video length. from the audience for abeing user to the second one to the phase which it is consumption only capacity), Pretention. (rdl )during isThe theprobability power rx not leverage transfer in Algorithm 1. The abandon during a discrete time step j measured from the presented in [13] to our pr consumed. receiving data at the download rate, (T ) chunk is the exponentially the T): video len Exp. value of while unnecessarily content for aEtail given (starts at as i, partitioning dur optimal computational complexity of beginning of downloaded the video viewing is computed as follows: l m limit the granularity of chunk amount of tail energy spent after downloading a chunk the number of smallest po which mainThe download schedule consists ⇥of a concatenation ofis second, the energy waste. to Th X five it divided is infeasible ⇤ video can be into (i.e carrying seconds of content, and pabd (i ⇥j r1dlpE[B k⇥ +T )] E[BwasteT T(j) )] = = worth p(i, p(“abandon at + j”)k)=kR =r0) waste enc (i, ip [11]. These video j (X abd amount of buffer approach bycontent comparing thesize ene chunks that can be of different sizes. We denote aby the ning of thein video w minimum chunk k=1 = R (1 p (X = 1)) = R R (3) j 1 j j 1 j is the expected value of content of the T seconds long schedules, even for a video las ous feedback download schedule as X at given time instance T outline the computatio an n-tuple S =⇥ (T1 , T2 , T3 , . . . , ⇤T(e.g., and adds in each i n ) We one minute has mo chunk starting from time steppabd i that is Tdownloaded and (i + k) ⇥ renc k ⇥ renc (2) in Algorithm 1.video during video which The first par l m having durations T . The exconsists ofbecause nk=chunks schedules). the partitioning consideredpoints pieceo i download schedule consists of a concatenation of sible optimal watched the+1user abandons the session. examples of never The However, we can use an a video chunks thatenergy can be of different sizes. We denote a the energy pected value of the waste of an entire download waste. The algori the optimal schedul programming which os which we Exp. ofschedule energy a single Invalue the above equation, is the encoding enc for download aswaste anrn-tuple S= (T1 , T2chunk: , T3rate , . . . ,of Tn ) dynamic ning of the video with a sm schedule S can be calculated using Eq (4). mined. Redundant on solving subproblemsc the streaming. We need E[B the probability userex- based (i, T )] of Tthe waste which consists of also n chunks having durations ys starts from and adds in each iteration i . The tail energy + ⇥ P (r ) (1) E[E )] = E (T ) + for reuse in later iterations. In waste (i, T viewing rx tail dl abandoning (p ). This probability needs to be abd optimal schedule pected value of the energy wasterof the the considered piece of vid dl an entire downloadunnecessary , the fraction dl energy is computed piece by re-evaluated eachbetime the next chunk size is chosen schedule schedule S can calculated using Eq (4). the optimal schedule for th beginning E[E (1, S)] = E (T ) + tational complexityuntil growstime mu waste 1the streaming session. It is a tail iven point of by the scheduler during Redundant calculatio Exp. value of energy waste for entire dl schedule: of mined. video length. Specifically, w j 1be directly computed conditional probability that P can in the subsequent ite T l the optimal schedule (E (i) n E[Ewaste (1, S)] =XEhtail (T1 ) +l=1 min i X presented in [13] our prob discount future tailtoenergy from the audience retention. The P probability for a user to beginning until time step i) the identified partit T p n 1 (k) ⇥ E (T ) + i j computational abd tailthe X h time step X j measured that may notcomplexity happen of O abandon during a discrete from T ⇥renc rdl ⇤ eSchedule algorithm: problem formulation T ⇥renc rdl T ⇥renc rdl j 1 l=1 l subsequent iterations. 1 pabd (k) ⇥ Etail (Tj ) + is in thethe number of smallest poss the schedule consisti j=2 viewingk=1 beginning of the video is computed as follows: the identified partitioning j=2 k=1 video can be divided into (i.e., vp n i h chunks tochunk download j 1 XX n h⇥ consisting of Tth ⇤ ⇤i PrxP(r ⇥ waste X bythe theschedule minimum size (r) m rxdl dl ) pabd (j) = p(“abandon at j”) = R p (X = 0) j 1 j P ) ⇥ (4) (4) E EBBwaste chunks to download. j 1 ( (TT jk), Tj ⇥ We outline the computation T r k k=1 = Rj j=1 (1 pj (X = 1)) Rjrdl dl (3) k=1= Rj 1 j=11 in Algorithm 1. The first part it 3.4 eSchedule-h: partitioning points ofH The energy optimal schedule is the one that minimizes optimal 3.4 eSchedule-h: Heuristic The download schedule consists of a(4). concatenation of the energy waste. The algorith energy waste asschedule calculated Thethe energy optimal iswith the one that minimizes We also designed ah We of also a heuristic video chunks that can be of different sizes. We denote a ning thedesigned video with a smal the energy waste as calculated (4). h that can used download schedule as an n-tuplewith S = (T and adds in be each iteration h that can be iterative useda 1 , T2 , T3 , . . . , Tn ) 3.3 Scheduler Using Dynamic Programming of the schedule. The heurist which consists of n chunks having durations Ti . The ex- the considered piece of video video chunks that can be o download schedule as an n which consists of n chunks pected value of the energy schedule S can be calculate eSchedule algorithm: solving optimum • How to find schedule S that minimizes E[Ewaste (1, S)] ? = • Brute force search does not scale – Number of possible solutions grows exponentially with video length (1 min video à over 2 M possibilities) • Use dynamic programming Etail (T1 ) n h X j=2 n h X 1 ⇥ E B B. Jackson et al., “An algorithm for optimal partitioning of data on an interval,” Signal Processing Letters, j=1IEEE, vol. 12, no. 2, pp. 105–108, Feb 2005. – Iterative algorithm – Compute and store solutions to subproblems The energy optimal sched • Optimal schedule for a part of the video the energy waste as calcula – Use stored solutions in subsequent iterations • Avoid redundant calculations 3.3 Scheduler Using Dyn – Feasible complexity: O(n2) where n is videoEach length in mincan sizebe of an chunk chunks fined minimum to the rem sequently, the number of Performance evaluation • Simulations using Matlab • Short and long videos – 5 min threshold – 16 videos in total • Retention and other data from real YouTube videos • Abandoning time randomly drawn from the probability distribution given by retention • Power models based on measurements with Samsung Galaxy S3 LTE • Video download schedule computed using eSchedule and total energy consumed was calculated for each session – Compare to ON-OFF and whole video download Performance evaluation • ON-OFF strategy is fairly good when tail energy is small – Wi-Fi and LTE with DRX • Whole video dl pretty good with short videos and large tail energy • eSchedule roughly halves the energy overhead short videos long videos compared to oracle (always downloads the right amount in one shot) Android app 0.5 0 0 0.2 0.4 0.6 0.8 fraction of video watched (%) (a) Wi-Fi 0 1 140 120 1 0.9 3G 0.8 100 0.7 80 0.6 0.5 60 0.4 40 0.3 0.2 20 0 0 audience retention Wi-Fi energy waste compared to oracle (J) 10 StreamThrottler YouTube App 1 Fast Caching ON−OFF−M audience retention audience retention energy waste compared to oracle (J) • Implemented a prototype app for Android Android App :also StreamThrottler 0.2 0.4 0.6 0.8 fraction of video watched (%) 1 (b) 3G Figure: Estimated energy waste compared to Oracle while streaming a 399s video using Galaxy SIII 4G. Outline • • • • Intro Standard power management techniques Beyond standard techniques Example optimizations – Traffic shaping in multimedia streaming – Optimized prefetching of video streaming – Context-aware scheduling of transfers • Conclusions Context-aware scheduling • We’ll look at Bartendr as an example – Aaron Schulman et al. Bartendr: a practical approach to energyaware cellular data scheduling. In ACM MobiCom 2010. – Learning to schedule transfers in suitable times How signal strength impacts energy? Traffic Scheduling • Two-way impact: throughput and transmit power HSPA, phone1 HSPA, phone2 LTE, phone2 3000 2000 1000 12 10 throughput (Mbit/s) power draw (mW) 4000 8 6 4 2 0 0 6 12 18 24 30 36 42 48 54 60 signal attenuation (dB) 0 0 6 12 18 24 30 36 42 48 (a) Signal strength vs. power for one (b) Box plots of signal strength vs. throughput LTE/HSPA and one HSPA only smartphone for two di↵erent HSPA phones Figure 12.9 Impact of signal strength on power draw and throughput Bartendr: basic idea • Moving phone experiences varying signal strength • Idea: Schedule transfers to happen at times of good signal strength – Save energy by holding those transfers that are not time critical • Example applications – Background sync: 5 min interval sync could be more efficient if done sometime between 4 to 6 min – Streaming media: Consume buffer when the signal is weak, prefetch when the signal is strong • Challenge: How to know when to transmit and when to hold? – Need prediction Bartendr: signal tracks • People tend to move along same paths in their day-today life • Bartendr predicts signal strength for a phone moving along a path – Use previous signal measurements captured while traveling along the same path – Signal strength measurements are basically energy free • phone needs to do it anyway for handoffs • Assumptions: – Phones can store several such signal tracks (frequently traveled paths) – Phone can infer currently traveled track using mobility prediction Bartendr: signal strength prediction • Step 1: find the current position of the phone on the current track – GPS draws too much power – Find position in track with closest measurement to current one – May have many similar strength positions à use also neighbor base station list • Step 2: predict signal in the future starting from current position – Look ahead in previous measurements – Speed may differ à continuous update of current position on track Bartendr: scheduling bg sync • Schedule next sync based on predicted signal strength • Sleep in between schedule and sync eventswhen à may make Scheduling to sync Wake-up, sync, schedule, sleep errors Uses threshold for efficient sync • Two threshold-based schemes: Schedules for either first or widest signal widest – First above threshold – Widest above threshold • Comes later but has larger margin for error signal strength (RSSI) • Comes soon à error small first -60 -65 -70 -75 -80 -85 -90 -95 -100 0 50 100 150 200 time (s) • Simulations suggest 10% energy savings for email sync – Widest outperforms first 250 13 Bartendr: scheduling stream transfers • Differs from syncing because continuously awake à can compensate for speed variations in real time • Results into rather similar optimization problem than we looked at with eSchedule – Chunked downloading – Energy spending is function of tail energy and energy spent for dl • dl energy varies with signal strength – Can be solved using dynamic programming too • Simulations suggest 60% energy savings LoadSense • LoadSense is kind of follow-up work to Bartendr – Abhijnan Chakraborty et al. Coordinating cellular background transfers using loadsense. In ACM MobiCom 2013. • Solution for scheduling background transfers • Takes explicitly into account load in the cell – Link quality alone is insufficient – Load can be passively inferred through power ratio • Sense total power in the cellular channel and compare it with the power of the pilot signal transmitted by base station • Schedule bg transfers when sensed load is small – Improve energy efficiency by transmitting with higher throughput Outline • • • • • Intro Standard power management techniques Beyond standard techniques Example optimizations Conclusions What else can be done? • Smarter (cooperative) scheduling to reduce contention – Random access channels (Wi-Fi) can cause energy waste by idle waiting – Multiple clients of same AP or multiple APs in range (same ch) • Leverage alternative low-power radios – E.g. Zigbee or Bluetooth in conjunction with Wi-Fi – Idea is to always use lowest power radio for the job – Discovery of Wi-Fi access points using Bluetooth contact patterns • Saves energy spent by Wi-Fi scanning – Data transmission with highest possible energy utility • Synchronize background transfers by different apps – Amortize tail energy by batching bg transfers 61 Summary • Energy efficiency of wireless networking – Depends on wireless access network technology used – Depends on context à signal quality and network load • Standard power management techniques – Wi-Fi has PSM – Cellular network technologies have RRC – Tail energy can be mitigated in cellular nws by using • Fast Dormancy (3G) • Discontinuous reception (LTE and 3G) • Optimizing energy efficiency further – Traffic scheduling • Traffic shaping • Context-aware scheduling – Smart use of wireless network interfaces • Use always the most energy efficient one – Application specific optimizations • Mitigate mismatch between power mgmt and application behavior