eduardo cuervo – duke university aruna balasubramanian - university of massachusetts amherst...
TRANSCRIPT
![Page 1: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/1.jpg)
MAUI: Making Smartphones Last Longer With Code OffloadEduardo Cuervo – Duke UniversityAruna Balasubramanian - University of Massachusetts AmherstDae-ki Cho - UCLAAlec Wolman, Stefan Saroiu, Ranveer Chandra, Paramvir Bahl – Microsoft Research
![Page 2: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/2.jpg)
Battery is a scarce resource
CPU performance during same period: 246X
A solution to the battery problem seems unlikely
91 92 93 94 95 96 97 98 99 00 01 02 03 04 050
50
100
150
200
250
Li-Ion Energy Density
Year
Wh
/Kg
Just 2X in 15 years
![Page 3: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/3.jpg)
Mobile apps can’t reach their full potential
Augmented Reality
Speech Recognition and Synthesis
Interactive Games
Slow, Limited or Inaccurate
Too CPU intensive Limit
ed
Power Intensive
Not on par with desktop
counterparts
![Page 4: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/4.jpg)
How Energy Efficient is 3G for CodeOffload?
![Page 5: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/5.jpg)
One Solution: Remote Execution
Remote execution can reduce energy consumption
Challenges: What should be offloaded? How to dynamically decide when to offload? How to minimize the required programmer
effort?
![Page 6: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/6.jpg)
MAUI: Mobile Assistance Using Infrastructure
MAUI Contributions: Combine extensive profiling with an ILP
solver Makes dynamic offload decisions Optimize for energy reduction Profile: device, network, application
Leverage modern language runtime (.NET CLR) To simplify program partitioning Reflection, serialization, strong typing
![Page 7: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/7.jpg)
Roadmap
Motivation MAUI system design
MAUI profiler MAUI solver
Evaluation Conclusion
![Page 8: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/8.jpg)
Maui serverSmartphone
Application
Client Proxy
Profiler
Solver
Maui Runtime
Server Proxy
Profiler
Solver
Maui Runtime
MAUI Architecture
Application
RPC
RPC
Maui Controller
Figure 3: High-level view of MAUI’s architecture.
![Page 9: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/9.jpg)
How Does a Programmer Use MAUI?
Goal: make it dead-simple to MAUI-ify apps Build app as a standalone phone app Add .NET attributes to indicate
“remoteable” Follow a simple set of rules
![Page 10: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/10.jpg)
Language Run-Time Support For Partitioning
Portability: Mobile (ARM) vs Server (x86) .NET Framework Common Intermediate
Language Type-Safety and Serialization:
Automate state extraction Reflection:
Identifies methods with [Remoteable] tag Automates generation of RPC stubs
![Page 11: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/11.jpg)
MAUI Profiler
ProfilerCallgraph
Execution Time
State size
Network Latency
Network Bandwidth
Device ProfileCPU Cycles
Network Power CostNetwork DelayComputational Delay
Computational Power Cost
Computational Delay
An
nota
ted
C
allg
rap
h
![Page 12: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/12.jpg)
MAUI Profiler
![Page 13: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/13.jpg)
Network Profiling
![Page 14: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/14.jpg)
MAUI Solver
B900 mJ15ms
C5000 mJ3000 ms
1000mJ25000 m
J D15000 mJ12000 ms
1000
0 m
J
A
Computation energy and delay for execution
Energy and delay for state transfer
A sample callgraph
![Page 15: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/15.jpg)
MAUI Solver
![Page 16: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/16.jpg)
Roadmap
Motivation MAUI system design
MAUI profiler MAUI solver
Evaluation Conclusion
![Page 17: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/17.jpg)
MAUI Implementation
Platform Windows Mobile 6.5 .NET Framework 3.5 HTC Fuze Smartphone Monsoon power monitor
Applications Chess Face Recognition Arcade Game Voice-based translator
![Page 18: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/18.jpg)
Questions
How much can MAUI reduce energy consumption?
How much can MAUI improve performance?
Can MAUI Run Resource-Intensive Applications?
![Page 19: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/19.jpg)
Evaluation
![Page 20: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/20.jpg)
Evaluation
![Page 21: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/21.jpg)
Can MAUI Run Resource-Intensive Applications?
![Page 22: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/22.jpg)
Can MAUI Run Resource-Intensive Applications?
![Page 23: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/23.jpg)
Roadmap
Motivation MAUI system design
MAUI proxy MAUI profiler MAUI solver
Evaluation Conclusion
![Page 24: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/24.jpg)
Conclusions
MAUI enables developers to: Bypass the resource limitations of handheld devices Low barrier entry: simple program annotations
For a resource-intensive application MAUI reduced energy consumed by an order of
magnitude MAUI improved application performance similarly
MAUI adapts to: Changing network conditions Changing applications CPU demands
![Page 25: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/25.jpg)
Questions?
http://research.microsoft.com/en-us/projects/maui/
![Page 26: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/26.jpg)
Back-UP
![Page 27: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/27.jpg)
Maui serverSmartphone
Application
Client Proxy
Profiler
Solver
Maui Runtime
Server Proxy
Profiler
Solver
Maui Runtime
Application
RPC
RPC
Maui Controller
MAUI Proxy
Intercepts Application CallsSynchronizes State
Chooses local or remote
Handles Errors
Provides runtime information
![Page 28: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/28.jpg)
Is Global Program Analysis Needed?
FindMatch
900 mJ
InitializeFaceRecognizer
5000 mJ
1000mJ25000 m
J DetectAndExtract Faces15000 mJ
1000
0 m
J
UserInterface
Yes! – This simple example from Face Recognition app shows why local analysis fails.
Cheaper to do local
![Page 29: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/29.jpg)
Is Global Program Analysis Needed?
FindMatch
900 mJ
InitializeFaceRecognizer
5000 mJ
1000mJ25000 m
J DetectAndExtract Faces15000 mJ
1000
0 m
J
UserInterface
Yes! – This simple example from Face Recognition app shows why local analysis fails.
Cheaper to do local
Cheaper to do local
![Page 30: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/30.jpg)
Is Global Program Analysis Needed?
FindMatch
InitializeFace
Recognizer
1000mJ
DetectAndExtract Faces
UserInterface 25900mJ
Cheaper to offload
![Page 31: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/31.jpg)
Can MAUI Adapt to Changing Conditions?
Adapt to: Network Bandwidth/Latency Changes Variability on method’s computational
requirements
Experiment: Modified off the shelf arcade game
application Physics Modeling (homing missiles) Evaluated under different latency settings
![Page 32: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/32.jpg)
DoLevel
HandleMissiles
DoFrame
HandleEnemies
HandleBonuses
11KB + missiles
11KB
+
mis
sile
s
missiles
*Missiles take around 60 bytes each
11KB + missiles
Required state is smaller
Complexity increases with # of missiles
Can MAUI Adapt to Changing Conditions?
![Page 33: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/33.jpg)
Case 1
DoLevel
HandleMissiles
DoFrame
HandleEnemies
HandleBonuses
*Missiles take around 60 bytes each
Zero Missiles Low latency (RTT < 10ms)
Computation cost is close to zero
Offload starting at DoLevel
![Page 34: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/34.jpg)
Case 2
DoLevel
HandleMissiles
DoFrame
HandleEnemies
HandleBonuses
*Missiles take around 60 bytes each
5 Missiles Some latency (RTT = 50ms)
Most of the computation cost
Very expensive to offload everything
Little state to offload
Only offload Handle Missiles
![Page 35: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/35.jpg)
0
5
10
15
20
25
30
35Smartphone only
MAUI (Wi-Fi, 10ms RTT)
MAUI (Wi-Fi, 25ms RTT)
MAUI (Wi-Fi, 50ms RTT)
En
erg
y (
Jou
les)
How much can MAUI reduce energy consumption?
Big savings even on 3G
An order of magnitude
improvement on Wi-Fi
Face Recognizer
![Page 36: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/36.jpg)
How much can MAUI improve performance?
0
3,000
6,000
9,000
12,000
15,000
18,000
21,000Smartphone onlyMAUI (Wi-Fi, 10ms RTT)MAUI (Wi-Fi, 25ms RTT)MAUI (Wi-Fi, 50ms RTT)MAUI (Wi-Fi, 100ms RTT)MAUI* (3G, 220ms RTT)
Execu
tion
Du
rati
on
(m
s)
Improvement of around an order of magnitude
Face Recognizer
![Page 37: Eduardo Cuervo – Duke University Aruna Balasubramanian - University of Massachusetts Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra,](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bf991a28abf838c91c32/html5/thumbnails/37.jpg)
Latency to server impacts the opportunities for fine-grained offload
0
20
40
60Smartphone onlyMAUI (Wi-Fi, 10ms RTT)MAUI (Wi-Fi, 25ms RTT)MAUI (Wi-Fi, 50ms RTT)
En
erg
y (
Jou
les)
Up to 40% energy savings on Wi-Fi
Solver would decide not to offloadArcade Game