maui: making smartphones last longer with code offload
DESCRIPTION
Eduardo Cuervo - Duke Aruna Balasubramanian - U Mass Amherst Dae-ki Cho - UCLA Alec Wolman, Stefan Saroiu, Ranveer Chandra, Paramvir Bahl – Microsoft Research. MAUI: Making Smartphones Last Longer With Code Offload. Battery is a scarce resource. CPU performance during same period: 24 6X - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/1.jpg)
Eduardo Cuervo - DukeAruna Balasubramanian - U Mass AmherstDae-ki Cho - UCLAAlec Wolman, Stefan Saroiu, Ranveer Chandra, Paramvir Bahl – Microsoft Research
![Page 2: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/2.jpg)
CPU performance during same period: 246X
A solution to the battery problem seems unlikely
Just 2X in 15 years
![Page 3: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/3.jpg)
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: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/4.jpg)
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 5: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/5.jpg)
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 6: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/6.jpg)
MotivationMAUI system design
MAUI proxy MAUI profiler MAUI solver
EvaluationConclusion
![Page 7: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/7.jpg)
Maui serverSmartphone
Application
Client Proxy
Profiler
Solver
Maui Runtime
Server Proxy
Profiler
Solver
Maui Runtime
Application
RPC
RPC
Maui Controller
![Page 8: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/8.jpg)
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 9: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/9.jpg)
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 10: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/10.jpg)
Maui serverSmartphone
Application
Client Proxy
Profiler
Solver
Maui Runtime
Server Proxy
Profiler
Solver
Maui Runtime
Application
RPC
RPC
Maui Controller
Intercepts Application CallsSynchronizes State
Chooses local or remote
Handles Errors
Provides runtime information
![Page 11: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/11.jpg)
ProfilerProfilerCallgraphCallgraph
Execution TimeExecution Time
State sizeState size
Network LatencyNetwork Latency
Network BandwidthNetwork Bandwidth
Device ProfileDevice ProfileCPU CyclesCPU Cycles
Network Power CostNetwork DelayComputational Delay
Computational Power Cost
Computational Delay
An
nota
ted
C
allg
rap
h
![Page 12: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/12.jpg)
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 13: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/13.jpg)
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 14: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/14.jpg)
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 15: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/15.jpg)
FindMatch
InitializeFace
Recognizer
1000mJ
DetectAndExtract Faces
UserInterface 25900mJ
Cheaper to offload
![Page 16: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/16.jpg)
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 17: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/17.jpg)
DoLevel
HandleMissilesHandleMissiles
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
![Page 18: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/18.jpg)
DoLevel
HandleMissiles
DoFrame
HandleEnemies
HandleBonuses
*Missiles take around 60 bytes each
Zero MissilesLow latency (RTT < 10ms)
Computation cost is close to zero
Offload starting at DoLevel
![Page 19: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/19.jpg)
DoLevel
HandleMissiles
DoFrame
HandleEnemies
HandleBonuses
*Missiles take around 60 bytes each
5 MissilesSome latency (RTT = 50ms)
Most of the computation cost
Very expensive to offload everything
Little state to offload
Only offload Handle Missiles
![Page 20: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/20.jpg)
MotivationMAUI system design
MAUI proxy MAUI profiler MAUI solver
EvaluationConclusion
![Page 21: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/21.jpg)
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 22: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/22.jpg)
How much can MAUI reduce energy consumption?
How much can MAUI improve performance?
Can MAUI Run Resource-Intensive Applications?
![Page 23: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/23.jpg)
Big savings even on 3G
An order of magnitude
improvement on Wi-Fi
Face Recognizer
![Page 24: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/24.jpg)
Improvement of around an order of magnitude
Face Recognizer
![Page 25: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/25.jpg)
Up to 40% energy savings on Wi-Fi
Solver would decide not to offloadArcade Game
![Page 26: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/26.jpg)
CPU Intensive even on a Core 2 Duo PC
Can be run on the phone with MAUI
Translator
![Page 27: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/27.jpg)
MotivationMAUI system design
MAUI proxy MAUI profiler MAUI solver
EvaluationConclusion
![Page 28: MAUI: Making Smartphones Last Longer With Code Offload](https://reader036.vdocuments.net/reader036/viewer/2022081507/56815b1b550346895dc8ca3a/html5/thumbnails/28.jpg)
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