1 / 42

Applications of Virtual Machines For Scalable, Reliable, And Interactive Internet Services

Applications of Virtual Machines For Scalable, Reliable, And Interactive Internet Services. Ph.D. Oral Examination Amr A. Awadallah June 24 th , 2006 aaa@cs.stanford.edu http://www.awadallah.com/vmatrix. What is The vMatrix?. MySQL, Apache. OS2: Linux.

orrin
Download Presentation

Applications of Virtual Machines For Scalable, Reliable, And Interactive Internet Services

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Applications of Virtual Machines For Scalable, Reliable, And Interactive Internet Services Ph.D. Oral ExaminationAmr A. AwadallahJune 24th, 2006aaa@cs.stanford.edu http://www.awadallah.com/vmatrix

  2. What is The vMatrix? Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  3. MySQL, Apache OS2: Linux Virtual Machine 2:vCPU, vMem, vDisk, vNet Virtual Machine Monitors Oracle, IIS OS1: Windows 2000 Virtual Machine 1:vCPU, vMem, vDisk, vNet Virtual Machine Monitor (aka Hypervisor) Real Machine (CPU, Memory, Disks, Network) Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  4. Live Demo of VMware player: Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  5. The vMatrix! A network for delivering virtual machines (VMs) between real machines (RMs) running the virtual machine monitor (VMM) software. Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  6. Contribution An overlay network of VMMs (the vMatrix) enables backward-compatible improvement of the scalability, reliability, and interactivity of Internet services. Applications:1. Dynamic Content Distribution2. Server Switching3. Fair placement of Game Servers Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  7. First Application: Dynamic Content Distribution Motivation: To enable distribution of dynamic content. (40% of web requests) Definition:Dynamic content is web pages which are constructed by programs that execute on the server at the time a request is made. (e.g. http://maps.yahoo.com) Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  8. Today Is Static Mirroring Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  9. Dynamic Content Distribution Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  10. Two Tier Architecture Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  11. Main Problem It is very hard to copy services due to all the dependencies that code has on system libraries, third-party modules, operating systems, and server hardware. Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  12. Internet 64.58.77.28 NAT/LB 192.168.1.10 VM1 VM2 DNS maps.yahoo.com  64.58.77.28 Challenges: Mobility (NAT) VMM RM VM Agent Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  13. Internet 64.58.77.28 NAT/LB Challenges: Security (VPNs) VPN 192.168.1.10 VM1 VM2 Intranet 172.21.162.9 c009.proxy.yahoo.com VMM RM DNS VM Agent maps.yahoo.com  64.58.77.28 Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  14. N2 N1 BACK END BACK END FRONT END BACK END • Perception! FRONT END Two Tier Challenges • Response Time N1 Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  15. FRONT END BACK END Two Tier Challenges • Availability Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  16. The AJAX Solution Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  17. Advantages • Faster Response Time • Higher Availability • Network Bandwidth Savings • Backward Compatibility Disadvantage • VM files are very large (order of gigabytes)! Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  18. Second Application: Server Multiplexing Motivation: To allow statistical sharing of servers between services. Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  19. Static Servers (ala Circuit Switching) FINANCE SPORTS Load Balancer Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  20. Server Switching (ala Packet Switching) FINANCE & SPORTS vMatrix Oracle Load Balancer Key: Peak of Sums < Sum of Peaks Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  21. What makes Switching hard ? • Software Dependencies • Hardware Dependencies • People Dependencies Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  22. VM VM VM VM VM VM VM VM VM VMM VMM VMM VMM VMM RM RM RM RM RM VM VM VM VM VM VM VM VM vMatrix Framework: Production Cluster: Live operational VMs, typically only one VM per RM Loading Chambers: Development and Maintenance Cluster, there could be more than one VM per RM here. The Oracle: This is the main control program Hibernation Nest: VM files are suspended and stored here for later retrieval. Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  23. Lifecycle of a server VM 1. A large number of virtual servers are stored as dormant files on a SAN or Netapps Hibernation Nest 2. A number of virtual servers are activated in a shared RM so that developers & system admins can upgrade, debug, or patch them. Loading Chambers 3. A virtual server is activated on a dedicated RM and exposed to live load. Instantiated Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  24. PHP-Nuke and osCommerce Internet Services PHP (Hyper Text Processor) Apache Web Server MySQL Database Operating System: Red Hat Linux 9 Virtual Machine exposes a PIII-550MHz with 512MB RAM and 5.5GB hard disk. VMware ESX VMM Server (consumes 184MB RAM, 3.5GB hard disk and 5% CPU) Real Machine (PIII-550MHz, 640MB RAM, 9GB hard disk) Yahoo! Autos Search Network API YSS (Yahoo Structured Search) YLIB (Yahoo C/C++ Libraries) Operating System: Yahoo FreeBSD 4.8 Virtual Machine exposes a PIII-550MHz with 1024MB RAM and 5.5GB hard disk. VMware ESX VMM Server (consumes 184MB RAM, 3.5GB hard disk and 5% CPU) Real Machine (PIII-550MHz, 640MB RAM, 9GB hard disk) Sample Implementations: Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  25. Advantages • Presents developers with isolation model they expect • Backward Compatibility • Efficient Resource Utilization (People and Power) • Peak Absorption • Faster Recovery Disadvantages • VM files are very large (order of gigabytes)! • VM Software is not free  • Operating System Licensing Issues Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  26. Third Application: Equi-Ping Game Server Placement For Pre-Arranged First-Person-Shooter Multiplayer Matches Motivation: To place game server hosts optimally such that all participating players have a fairer game experience. Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  27. Delay Sensitivity of Online Games: Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  28. Screenshot from Halo PC: Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  29. The Problem: Unfair Lag 30ms Game Server 130ms Clan A Clan B Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  30. The Solution: Equi-Ping Server Virtual Game Server in VM VMM Real Machine 80ms 80ms Clan A Clan B Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  31. Equi-ping placement problem • Red dots are servers, green dots are players, we need to pick the Red dot that is equi-distant from all players. Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  32. Equi-ping placement Algorithm S = set of m servers available to host the match. P = set of n players participating in this match. RTTs,p = round-trip-time (ping) from server s to player p The Algorithm has 3 main steps: 1. Disregard all servers that have any RTTs,p larger than 180ms • For each server s, we compute a closeness factor Cs representing the average differential ping between the players if server s is picked: • Pick the server with smallest Cs The order of complexity of this algorithm is O(n2m) ≈ O(m) since m»n Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  33. Halo PC Game Server (278MB) Operating System: Windows XP (1.8GB) Virtual Machine exposes a PIII-550MHz with 512MB RAM and 5.5GB hard disk. VMware ESX VMM Server (consumes 184MB RAM, 3.5GB hard disk and 5% CPU) Real Machine (PIII-550MHz, 640MB RAM, 9GB hard disk) Halo PC VM Server Stack Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  34. Advantages: • Equi-ping placement of game servers to minimize round-trip-time difference between participants • Backward compatibility leading to zero cost for converting existing • Economies of scale: this network can be shared among many games Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  35. Applications Summary • Dynamic Content Distribution which improves interactivity for Internet services. • Server Switching which improves resource utilization, availability and enables peek absorption. • Equi-ping server placement for game host servers which is very important for the fairness of online FPS games. Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  36. Related Work Common drawback: no backward compatibility. • Disk Imaging / Ghosting, (no concurrent VMs). • Application Servers: IBM WebSphere, ATG Dynamo, BEA WebLogic, JBoss, (no strict isolation, interface violations). • Java Virtual Machine (J#/C#/.Net), (needs recoding, low performance). • Packagers: Debian APT, Redhat RPM, PRC, (no isolation). • Light Weight OSes (Denali), (new OS API, needs recoding). • OS Virtualization (Ensim, Ejasent, EXETender, Chrooting), (tied to OS). • Active Proxy Caches (ICAP, Active cache, OPES) Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  37. Papers "The vMatrix: A Network of Virtual Machine Monitors for Dynamic Content Distribution", Amr Awadallah and Mendel Rosenblum, 7th International Workshop on Web Content Caching and Distribution (WCW 2002), Boulder, Colorado, August 2002 "The vMatrix: Server Switching", Amr A. Awadallah and Mendel Rosenblum, IEEE 10th International Workshop on Future Trends in Distributed Computing Systems (IEEE FTDCS 2004), Suzhou, China, May 2004. "The vMatrix: Equi-Ping Game Server Placement For Pre-Arranged First-Person-Shooter Multiplayer Matches", Amr A. Awadallah and Mendel Rosenblum, The 4th ACS/IEEE International Conference on Computer Systems and Applications (AICCSA 2006), Dubai/Sharjah, UAE, March 2006 Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  38. Other Papers "TCP-BFA: Buffer Fill Avoidance", Amr A. Awadallah and Chetan Rai, IFIP High Performance Networking Conference, Vienna, Austria, September 1998. "Analysis of a packet switch with memories running slower than the line-rate", Sundar Iyer, Amr A. Awadallah, and Nick McKeown, IEEE INFOCOM 2000, Tel-Aviv, Israel, March 2000. Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  39. Conclusion The vMatrix is an overlay network of virtual machine monitors enabling delivery of virtual machines between real machines. The vMatrix is a practical backward-compatible solution for improving the scalability, reliability, and interactivity of existing Internet applications. Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  40. Thank You Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  41. Appendix: VMware Perl API # To register a new VM on a server $VMMserver->register($vmconfig); # To start and stop a VM $VM->start(); $VM->stop(); # To suspend and resume a VM $VM->suspend(); $VM->resume(); # To get CPU, Memory, Net, IO stats $VM->get(“Status.Stats.vm.cpuUsage”, 5*60); # Check if VM is running (heart-beat) $VM->get(“Status.Power”); use VMware::Control; use VMware::Control::Server; use VMware::Control::VM; my $VMMserver = VMware::Control::Server ::new($hostname, $port, $user, $password); $VMMserver->connect(); my $VM = VMware::Control::VM ::new($server, $vmconfig); $VM->connect(); # To get a list of all VMs on a server my @vmlist = $VMMserver->enumerate(); Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

  42. FRONT END FRONT END FRONT END BACK END Two Tier Challenges • Replication Stanford University – CSL – 7/24/2006 – Amr A. Awadallah PhD Oral Exam

More Related