en energy ef efficie iency y in in m mobi obile sof softw
play

En Energy-Ef -Efficie iency y in in M Mobi obile Sof Softw - PowerPoint PPT Presentation

En Energy-Ef -Efficie iency y in in M Mobi obile Sof Softw tware Julia Rubin (jointly with Duling Lai, Jrgen Cito, Phillip Stanley-Marbell) January 31, 2017 Mobile Applications More than 2 billion smartphones in use More than


  1. En Energy-Ef -Efficie iency y in in M Mobi obile Sof Softw tware Julia Rubin (jointly with Duling Lai, Jürgen Cito, Phillip Stanley-Marbell) January 31, 2017

  2. Mobile Applications • More than 2 billion smartphones in use – More than desktop computers – Plus smart watches, glasses, cameras, TVs, in-car naviga=on, and messaging • More than 3 million mobile apps in official app stores – … and much more apps in hundreds of alterna=ve stores • ~2.3 million ac=ve mobile developers worldwide – 760,000 people in Asia – 680,000 people in North America – 680,000 people in Europe [h@ps://blog.newrelic.com/2014/06/13/mobile-app-development-trends-worldwide-need-know/] 2 [ Developer Economics Q3 2014]

  3. Mobile Application Developers Lack knowledge, tools, and incen=ves to deal with: – Security – Privacy – Energy-efficiency 3

  4. What Can Go Wrong? 4

  5. What Can Go Wrong? Major consumers of energy: Screen, WiFi, GPS, Sensors, Camera, CPU [Pathak et al., EuroSys’12, Banerjee et al., FSE’14] 5

  6. Example App GPS location used 6

  7. Example App 1 GPS location 2 used GPS location update started 7

  8. Example App 1 GPS location 2 used GPS location update started 8

  9. Example App 47% 1 more energy 1 GPS location 2 used GPS location update started 9

  10. Energy Bugs An error in the system that causes an unexpected amount of high energy consump=on [Pathak et al., HotNets’11] 10

  11. Energy Bugs and Hotspots An applica=on consumes an abnormally high amount of ba^ery power … • … even aQer it has completed execuSon à Bug • … even though the u=liza=on of its hardware resources is low à Hotspot [Banerjee et al., FSE’14] 11

  12. Taxonomy of Energy Bugs and Hotspots Sleep-state Hardware Background Defec=ve Transi=on Resources Services Func=onality Heuris=cs Vacuous Resource Wakelock Immortality Background Leak Bug Bug Services Subop=mal Expensive Tail Energy Resource Background Loop Bug Hotspot Binding Services [Banerjee et al., FSE’14] 12

  13. Taxonomy of Energy Bugs and Hotspots Sleep-state Hardware Background Defec=ve Transi=on Resources Services Func=onality Heuris=cs Vacuous Resource Wakelock Immortality Background Leak Bug Bug Services Subop=mal Resources (e.g., WiFi) that are not Expensive Tail Energy Resource Background Loop Bug released or the device component Hotspot Binding Services (e.g., screen, CPU) is lee in a high- power state aeer the applica=on has finished execu=on [Banerjee et al., FSE’14] 13

  14. Taxonomy of Energy Bugs and Hotspots Sleep-state Hardware Background Defec=ve Transi=on Resources Services Func=onality Heuris=cs Vacuous Resource Wakelock Immortality Background Leak Bug Bug Services Subop=mal Expensive A failure to remove a service Tail Energy Resource Background Loop Bug Hotspot (e.g., loca=on or sensor Binding Services updates), which will keep on repor=ng data even though no applica=on needs it [Banerjee et al., FSE’14] 14

  15. Taxonomy of Energy Bugs and Hotspots Sleep-state Hardware Background Defec=ve Transi=on Resources Services Func=onality Heuris=cs Vacuous Resource Wakelock Immortality Background Leak Bug Bug Services Subop=mal Expensive Tail Energy Respawning an applica=on or Resource Background Loop Bug Hotspot service when the applica=on Binding Services has been closed by the user [Banerjee et al., FSE’14] 15

  16. Taxonomy of Energy Bugs and Hotspots Sleep-state Hardware Background Defec=ve Transi=on Resources Services Func=onality Heuris=cs Vacuous Resource Wakelock Immortality Background Leak Bug Bug Services Subop=mal Expensive Tail Energy Binding resources too early Resource Background Loop Bug Hotspot or releasing them too late Binding Services [Banerjee et al., FSE’14] 16

  17. Taxonomy of Energy Bugs and Hotspots Sleep-state Hardware Background Defec=ve Transi=on Resources Services Func=onality Heuris=cs Vacuous Resource Wakelock Immortality Background Leak Bug Bug Services Subop=mal Expensive Sca^ered usage of components Tail Energy Resource Background Loop Bug Hotspot (e.g., screen, WiFi), which Binding Services causes tail energy consump=on when component is switched off [Banerjee et al., FSE’14] 17

  18. Taxonomy of Energy Bugs and Hotspots Sleep-state Hardware Background Defec=ve Transi=on Resources Services Func=onality Heuris=cs Vacuous Resource Wakelock Immortality Background Leak Bug Bug Services Subop=mal Expensive Fine-grained instead of coarse- Tail Energy Resource Background Loop Bug grain updates (e.g., GPS vs. WiFi Hotspot Binding Services based loca=on); unnecessarily high sampling rate for a service [Banerjee et al., FSE’14] 18

  19. Taxonomy of Energy Bugs and Hotspots Sleep-state Hardware Background Defec=ve Transi=on Resources Services Func=onality Heuris=cs Vacuous Resource Wakelock Immortality Background Leak Bug Bug Services Repeatedly execu=ng por=on Subop=mal Expensive Tail Energy Resource Background Loop Bug of the applica=on even if not Hotspot Binding Services necessary (e.g., con=nuously accessing unreachable server) [Banerjee et al., FSE’14] 19

  20. Taxonomy of Energy Bugs and Hotspots Sleep-state Hardware Background Defec=ve Transi=on Resources Services Func=onality Heuris=cs Vacuous Resource Wakelock Immortality Background Leak Bug Bug Services • Pathak et al., MobiSys’12 : Subop=mal Expensive Tail Energy sta=c analysis to find defini=ons (resource Resource Background Loop Bug Hotspot acquisi=on) that are not killed (released) Binding Services • Guo et al., ASE’13 (Relda) : builds a Func=on Call Graph (callbacks and resource-related opera=ons) to check which resources are not released 20

  21. Taxonomy of Energy Bugs and Hotspots Sleep-state Hardware Background Defec=ve Transi=on Resources Services Func=onality Heuris=cs Vacuous Resource Wakelock Immortality Background Leak Bug Bug Services • Liu et al., PerCom’13 (GreenDroid): Subop=mal Expensive Tail Energy calculates u=liza=on ra=o by using Resource Background Loop Bug Hotspot dynamic taint analysis Binding Services • Banerjee et al., MobileSoQ’16 : improves binding loca=on by matching defect and design expressions 21

  22. Example App 47% 1 more energy 1 GPS location 2 used GPS location update started 22

  23. Example App 47% 1 more energy ? visibly 2 slower 1 GPS location 2 used GPS location update started 23

  24. QoS Considerations “For best loca=on accuracy, you might choose to start listening for loca=on updates when users begin crea<ng the content or even when the applica<on starts , <…>” “You might need to consider how long a typical task of crea=ng the content takes and judge if this dura=on allows for efficient collec=on of a loca=on es=mate.” [h^ps://developer.android.com/guide/topics/loca=on/strategies.html] 24

  25. Taxonomy of Energy Bugs and Hotspots Sleep-state • Chen et al., HotPower’13: Hardware Background Defec=ve Transi=on prefetching ads; upper-bound is Resources Services Func=onality Heuris=cs 3.2%, hard to achieve • Li et al., ICSE’16: bundles sequen=al HTTP requests, Vacuous Resource Wakelock Immortality Background 15% reduc=on Leak Bug Bug Services Subop=mal Expensive Tail Energy Resource Background Loop Bug Hotspot Binding Services 25

  26. Taxonomy of Energy Bugs and Hotspots Sleep-state Hardware Background Defec=ve Transi=on Resources Services Func=onality Heuris=cs Vacuous Resource Wakelock Immortality Background Leak Bug Bug Services Subop=mal Expensive Tail Energy Resource Background Loop Bug Hotspot Binding Services 26

  27. Taxonomy of Energy Bugs and Hotspots Sleep-state Hardware Background Defec=ve Transi=on Resources Services Func=onality Heuris=cs Vacuous Resource Wakelock Immortality • Cito et al., ASE’16 Background Leak Bug Bug Services Subop=mal Expensive Tail Energy Resource Background Loop Bug Hotspot Binding Services 27

  28. Advertising and Analytics (A&A) • At least 3 third-party libs in an app [Rubin at al., ASE’15] • Consume 65%-75% of energy [Pathak et al., EuroSys’12] • More than 40% of HTTP connec=ons do not contribute to user-observable behavior [Rubin at al., ASE’15] – Analy=cs • Adver=sing consumes 16% of energy (plus 48% more CPU =me and 79% more network data) [Gui et al., ICSE’15] 28

  29. 29

  30. Main Idea Automa=cally iden=fy recurrent A&A requests and adapt their frequency to the current ba^ery state. 30

  31. 31

  32. Battery Aware Transformation Based on • ρ – period of the recurrent requests • b – ba^ery status add a delay before recurrent A&A requests Linear adapta=on: Low power mode (at 20% ba^ery status): 32

  33. Savings – an Example • VLC Direct: video stream player • One recurrent request – every 30 sec • Introduced 100% delay – to 60 sec • Run for 30 mins • 5.8% reduc=on in energy consump=on (16% upper bound) 33

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend