Dynamically Partitioning Applications between Weak Devices and Clouds Byung-Gon Chun Intel Labs Berkeley

advertisement
Dynamically Partitioning Applications
between Weak Devices and Clouds
Mobile Cloud Computing and Services Workshop 2010
Byung-Gon Chun, Petros Maniatis
Intel Labs Berkeley
Weak devices
 Weak devices
 Applications
» Smartphones
» Netbooks/Tablets
» Mobile Internet Devices
» Embedded devices
» Vehicles
» TVs
»…
» Facebook, Twitter
» Video, photo
viewing/editing
» Finances
» Games
» Rich media
»…
Byung-Gon Chun, Mobile Cloud Computing and Services Workshop, June 15, 2010
CloneCloud (HotOS 2009)
Augmenting mobile device execution through cloud execution
Datacenter
Byung-Gon Chun, Mobile Cloud Computing and Services Workshop, June 15, 2010
Current applications are statically
partitioned
Byung-Gon Chun, Mobile Cloud Computing and Services Workshop, June 15, 2010
No single partitioning fits all due to
heterogeneity
 Diverse environments
» Device platform
» Network
» Cloud
 Diverse workloads
Dynamic Partitioning
Dynamically shifting
computation between
weak device and cloud
Byung-Gon Chun, Mobile Cloud Computing and Services Workshop, June 15, 2010
Example application for dynamic
partitioning: image matching
Image feature generation
Input
image
Keypoint
extraction
Output
images
Local
computation
Classification
Descriptor
computation
Similarity
calculation
SIFT (IJCV 2004), SURF (ECCV 2006)
Byung-Gon Chun, Mobile Cloud Computing and Services Workshop, June 15, 2010
Workload
 Size of the image
 Content of the image
 Database size
Byung-Gon Chun, Mobile Cloud Computing and Services Workshop, June 15, 2010
Image feature
generation
Nearest neighbor
search
Device platform






CPU: 500MHz w/o FPU <-> 2GHz w FPU
Memory: 192MB <-> 2GB
Persistent store: 256MB <-> 160GB
Special units: GPU
Charging mode
More processing power, more memory
-> More processing at the client
Byung-Gon Chun, Mobile Cloud Computing and Services Workshop, June 15, 2010
Network




3G, WiFi
Wimax, LTE
Connection variation
Faster networks -> send raw data and
offload more processing to the server
Byung-Gon Chun, Mobile Cloud Computing and Services Workshop, June 15, 2010
Cloud
 Availability
 Distance
 Cost
Byung-Gon Chun, Mobile Cloud Computing and Services Workshop, June 15, 2010
Problem formulation
 Application: a set of modules interacting
each other
Byung-Gon Chun, Mobile Cloud Computing and Services Workshop, June 15, 2010
Problem formulation
Application:
set of modules
Partitioning:a multiple
sets of interacting
modules
each
that other
cover all application modules
Byung-Gon Chun, Mobile Cloud Computing and Services Workshop, June 15, 2010
Partitioning example
1
Weak
device
2
3
4
1
2
3
4
1
2
3
1
2
3
Byung-Gon Chun, Mobile Cloud Computing and Services Workshop, June 15, 2010
4
4
Cloud
Partitioning example
1
Weak
device
2
3
1
4
2
3
(E.g., 1 and 2 should be co-located)
Byung-Gon Chun, Mobile Cloud Computing and Services Workshop, June 15, 2010
4
Cloud
Partitioning example
Weak
device
1
2
Cloud
3
(E.g., optimize energy consumption)
Byung-Gon Chun, Mobile Cloud Computing and Services Workshop, June 15, 2010
4
Optimization
 Minimize
C (i ) =
∑C
m∈Pd
p
∑
i∈I
C (i )
(m, d , i ) +
where
∑C
m∈Ps
p
(m, s, i ) +
∑ C (m1, m2, t , i)
c
m1∈Pd , m 2∈Ps
to
•subject
Correctness
m = Pd , ∀m ∈ L1 (d )
• Metric optimization
m = Ps , ∀m ∈ L1 ( s )
m1, m2 ∈ Pd or m1, m2 ∈ Ps , ∀(m1, m2) ∈ L2
Byung-Gon Chun, Mobile Cloud Computing and Services Workshop, June 15, 2010
Optimization
∑
 Minimize
C (i ) =
∑C
m∈Pd
p
i∈I
C (i )
(m, d , i ) +
where
∑C
m∈Ps
p
(m, s, i ) +
∑ C (m1, m2, t , i)
c
m1∈Pd , m 2∈Ps
subject to
m = Pd , ∀m ∈ L1 (d )
m = Ps , ∀m ∈ L1 ( s )
m1, m2 ∈ Pd or m1, m2 ∈ Ps , ∀(m1, m2) ∈ L2
Byung-Gon Chun, Mobile Cloud Computing and Services Workshop, June 15, 2010
System support for dynamic
partitioning
 Application structuring
 Partitioning choice
 Security of dynamic partitioning
Byung-Gon Chun, Mobile Cloud Computing and Services Workshop, June 15, 2010
Application structuring
 Both client and server have all parts
of the application
 Instantiate what modules to run at
client and server dynamically at run
time
 Wire them flexibly
Byung-Gon Chun, Mobile Cloud Computing and Services Workshop, June 15, 2010
Partitioning choice
 Policy
» Goals: execution time, energy
consumption, total money spent,
security
 Mechanism
» Profile costs
» Online partitioning decision - prediction,
fast optimization
Byung-Gon Chun, Mobile Cloud Computing and Services Workshop, June 15, 2010
Security of dynamic partitioning
 A module containing sensitive data of
a machine does not run at another
machine
 Automated approaches of privacy
preserving partitioning
Byung-Gon Chun, Mobile Cloud Computing and Services Workshop, June 15, 2010
Case study: partitioning of mobile
device applications
 Offload computation from mobile
devices to servers : an example of
C-S program partitioning
 Recent fine-grained partitioning
proposals
» CloneCloud (HotOS 2009)
» MAUI (Mobisys 2010)
Byung-Gon Chun, Mobile Cloud Computing and Services Workshop, June 15, 2010
Case study: CloneCloud v1
 Application structuring
» Create (trusted) clones
» Method-level partitioning
» Offload execution of partitioned methods
 Partitioning
» Profiling
» Program analysis
» ILP optimization
Byung-Gon Chun, Mobile Cloud Computing and Services Workshop, June 15, 2010
Case study: CloneCloud v1
 Adaptation – prediction using ML
 Applications: image search, virus
scanning, privacy-preserving targeted
advertising
Byung-Gon Chun, Mobile Cloud Computing and Services Workshop, June 15, 2010
Related work
 Static partitioning of C-S programs – Links, Hops,
Hilda
 Programmer-assisted partitioning – Spectra,
Chroma, Odyssey, Protium
 Automatic partitioning – Coign, Wishbone
 Class-level partitioning – AIDE, OLIE
 Partitioning via information flow types - Swift
Byung-Gon Chun, Mobile Cloud Computing and Services Workshop, June 15, 2010
Summary
 Present dynamic partitioning between
weak device and cloud in diverse
environments and workloads
 Formalize the dynamic partitioning
problem
 Discuss its system support
Byung-Gon Chun, Mobile Cloud Computing and Services Workshop, June 15, 2010
Thank you!
Questions?
Download