The Role of Cloudlets in Mobile Computing Mahadev Satyanarayanan School of Computer Science Carnegie Mellon University © 2009-2010 M. Satyanarayanan Microsoft Networking Research Summit, Bellevue, WA, 2010-06-02 1 Machine Translation Today 0.85 0.8 Human Scoring Range 0.7289 0.7447 BLEU SCORES 0.7 0.6 0.5551 0.5610 Systran Spanish SDL Spanish 0.5137 0.5 0.4 0.3859 0.3 Google Google Chinese Arabic (‘06 NIST) (‘05 NIST) CBMT Google Spanish Spanish ’08 top lang Based on same Spanish test set © 2009-2010 M. Satyanarayanan Microsoft Networking Research Summit, Bellevue, WA, 2010-06-02 2 Face Recognition Today © 2009-2010 M. Satyanarayanan Microsoft Networking Research Summit, Bellevue, WA, 2010-06-02 3 What’s The Catch? These are resource-intensive applications • State-of-art performance and quality only with room full of servers • How do we achieve this “in the wild”? (on resource-poor, energy-limited mobile hardware) Obvious solution: leverage the cloud! But your cloud may be far away End-to-end latency matters for crisp interaction • e.g., real-time two-way language translation on mobile devices • e.g, augmented reality for cognitive assistance via “smart glasses” • and many other examples © 2009-2010 M. Satyanarayanan Microsoft Networking Research Summit, Bellevue, WA, 2010-06-02 4 Latency Hurts Even If Bandwidth Good (E.g. QuakeViz interactive benchmark on VNC thin client 100 Mbps) © 2009-2010 M. Satyanarayanan Microsoft Networking Research Summit, Bellevue, WA, 2010-06-02 5 Sample Internet2 RTTs (milliseconds) © 2009-2010 M. Satyanarayanan Microsoft Networking Research Summit, Bellevue, WA, 2010-06-02 6 Latency on 3G Networks “The wireless delay in the 3G network dominates the whole network path delay, e.g., latency to the first pingable hop is around 200ms, which is close to the end-to-end Ping latency to landmark servers distributed across the U.S.” from “Anatomizing Application Performance Differences on Smartphones”, to appear in MobiSys 2010 (Huang et al) © 2009-2010 M. Satyanarayanan Microsoft Networking Research Summit, Bellevue, WA, 2010-06-02 7 Solution: Create a Tiny Cloud Nearby Olympus Mobile Eye Trek Wearable Computer Android Phone WAN to distant cloud on Internet Low-latency high-bandwidth 1-hop wireless network Nokia N810 Tablet Handtalk Wearable Glove © 2009-2010 M. Satyanarayanan Coffee shop Cloudlet cloudlet = (compute cluster + wireless access point + wired Internet access + no battery limitations) “data center in a box” Microsoft Networking Research Summit, Bellevue, WA, 2010-06-02 8 Local Wireless Bandwidth Original motivation for cloudlets was latency But 1-hop wireless bandwidth to cloudlet also a win • wireless LAN bw typically 100X wireless WAN bw e.g. 802.11n ≈ 400 Mbps but HSPDA ≈ 2 Mbps • shipping large objects within interactive time bounds e.g. captured images in an augmented reality system 4MB JPEG image takes 80 ms @ 400 Mbps, but 16 seconds @ 2 Mbps © 2009-2010 M. Satyanarayanan Microsoft Networking Research Summit, Bellevue, WA, 2010-06-02 9 Cloudlet vs. Cloud Cloudlet Cloud State Only soft state Hard and soft state Management Appliance model: self-managed; little professional attention Utility model: professionally administered, 24x7 operator coverage Environment “Data center in a box” at customer premises Machine room with power conditioning and cooling Ownership Decentralized ownership by local business Centralized ownership by Amazon,Yahoo!, etc. Network LAN latency and bandwidth Internet latency and bandwidth Sharing Few users at a time 100s to 1000s of users © 2009-2010 M. Satyanarayanan Microsoft Networking Research Summit, Bellevue, WA, 2010-06-02 10 Key Challenges 1. Trusting infrastructure • tamper-resistant hardware (“first-world infrastructure”) • portable device as root of trust (e.g TrustSniffer) 2. Finding the exactly right software on it uniformity deployer value specificity end-user value © 2009-2010 M. Satyanarayanan inherent tension Microsoft Networking Research Summit, Bellevue, WA, 2010-06-02 11 Transient Customization Deliver fully configured virtual machine (VM) to infrastructure Problem: too large, too slow for transient use Solution: assemble VM on the fly dynamic VM synthesis • prefetch large, relatively static, widely-used piece (“base VM”) • deliver small patch (“VM overlay”) just before use • discard VM after use VM overlay can come from • mobile device over wireless link, or • web site under control of mobile device (URL and decryption key) © 2009-2010 M. Satyanarayanan Microsoft Networking Research Summit, Bellevue, WA, 2010-06-02 12 Dynamic VM Synthesis Preload base VM M o b i l e D e v i c e Discover & negotiate use of cloudlet (base + overlay) launch VM Execute launch VM Use cloudlet user-driven device-VM interactions C l o u d l e t Finish use Create VM residue Depart © 2009-2010 M. Satyanarayanan Discard VM Optional: cache VM overlay Microsoft Networking Research Summit, Bellevue, WA, 2010-06-02 13 Typical Overlay Sizes (base VM = 8GB Ubuntu Linux) Application Compressed VM Overlay Size (MB) Uncompressed VM Overlay Size (MB) Install Package Size (MB) AbiWord 119.5 364.2 10.0 GIMP 141.0 404.7 16.0 Gnumeric 165.3 519.8 16.0 Kpresenter 149.4 426.8 9.1 PathFind 196.6 437.0 36.8 SnapFind 63.7 222.0 8.8 Null 5.9 24.8 0.0 © 2009-2010 M. Satyanarayanan Microsoft Networking Research Summit, Bellevue, WA, 2010-06-02 14 VM Synthesis Time at 100Mbps (untuned proof-of-concept prototype) Other 140 Resume VM Largest standard deviation is 5.3% of mean 120 Apply VM overlay Nearly half the total All in the infrastructure Potentially optimizable Decompress VM overlay Transfer floppy disk Time in Seconds 100 Compress floppy disk Transfer VM overlay 80 60 40 20 0 AbiWord © 2009-2010 M. Satyanarayanan GIMP Gnumeric Kpresenter PathFind Microsoft Networking Research Summit, Bellevue, WA, 2010-06-02 SnapFind Null 15 When Bandwidth Drops to 10Mbps Other 350 Resume VM Largest standard deviation is 3.4% of mean 300 Apply VM overlay Decompress VM overlay Time in Seconds 250 Transfer floppy disk Compress floppy disk 200 Transfer VM overlay 150 100 50 0 AbiWord © 2009-2010 M. Satyanarayanan GIMP Gnumeric Kpresenter PathFind Microsoft Networking Research Summit, Bellevue, WA, 2010-06-02 SnapFind Null 16 Some Education is Needed “In the discussion of the proposal, several members of the panel were skeptical about the argument about the need extremely low latencies for handheld devices. In particular, handhelds are (historically) remarkably powerful computers capable of running user interfaces (the source of most latency sensitivity) locally. The panel also felt that the case for "cloudlets" was not compelling in contrast to other distributed system architectures such as relying alarge-scale cloud based on conventional data centers and using a geographically distributed three-layer web service architecture.” © 2009-2010 M. Satyanarayanan Microsoft Networking Research Summit, Bellevue, WA, 2010-06-02 17 In Closing Leverage the Cloud! (but keep the Swiss Army Knife handy for emergencies) © 2009-2010 M. Satyanarayanan Microsoft Networking Research Summit, Bellevue, WA, 2010-06-02 18