© 2010 VMware Inc. All rights reserved Virtualization and Cloud Computing Vera Asodi VMware

  • View
    214

  • Download
    2

Embed Size (px)

Citation preview

  • Slide 1
  • 2010 VMware Inc. All rights reserved Virtualization and Cloud Computing Vera Asodi VMware
  • Slide 2
  • 2 What is Virtualization? Virtualization is a technology that allows you to transform hardware into software Virtualization allows you to run multiple operating systems simultaneously on a single computer
  • Slide 3
  • 3 History 1960s - IBM implemented virtualization as a way to logically partition mainframe computers into separate virtual machines to enable multitasking. 1960s - MIT Project MAC aimed to design and implement a better time sharing system. 1990s VMware invented x86 based architecture virtualization.
  • Slide 4
  • 4 Virtual Machine
  • Slide 5
  • 5 Traditional vs. Virtual Architecture Traditional ArchitectureVirtual Architecture
  • Slide 6
  • 6 Benefits of Virtualization Encapsulation - VMs can be described in a file Possible to snapshot Easy to move Enables running multiple operating systems Consolidation & use of unused computation power Resource management High availability & disaster recovery Create Base Environment Safe testing of new software Easy Management
  • Slide 7
  • 7 Virtual Center
  • Slide 8
  • 8 Types of Virtualization VMM Host OS VMM APP HostedBare Metal APP VMware player VMware workstation Microsoft virtual PC Sun VirtualBox QEMU KVM VMware ESX Microsoft Hyper-V XEN
  • Slide 9
  • 9 Virtualization installs like application rather than like OS Can run alongside conventional applications Avoid code duplication OS already has process scheduler, memory management, device support etc. More suitable for personal users Better performance with lower overhead Highly efficient direct I/O pass- through architecture for network and disk Complete control over hardware Advanced features like live migration available Suitable for production environments Types of Virtualization (cont.) HostedBare Metal
  • Slide 10
  • 10 Running a VM The Virtual Machine Monitor (VMM) or Hypervisor is the software layer that runs the VMs. There are several ways of doing that.
  • Slide 11
  • 11 Emulation Emulation: Do what the CPU does in SW. Example: addl %ebx, %eax is emulated as: enum {EAX=0, EBX=1, ECX=2, EDX=3, }; unsigned long regs[8]; regs[EAX] += regs[EBX]; Pro: simple Con: slow Instead of emulation, it would be more efficient to run the VM directly on the host CPU.
  • Slide 12
  • 12 The Difficulty of Virtualization Traditional ArchitectureBare Metal Virtualized Architecture Guest OS VMM User Apps Host Computer System Hardware Ring 3 Ring 2 Ring 1 Ring 0 User Apps Host Computer System Hardware Ring 3 Ring 2 Ring 1 Ring 0 OS The problem: the guest OS runs in ring 1, while some privileged instructions need to run in ring 0.
  • Slide 13
  • 13 Trap and Emulate Run the VM directly on the host CPU. Trap and emulate sensitive instructions. Pros: Efficient Cons: Harder to implement Need hardware support - not all sensitive instructions cause a trap when executed in a non-privileged mode.
  • Slide 14
  • 14 Binary Translation Run the VM directly on the host CPU. The VMM takes a block of binary instructions that are about to be executed and dynamically translates it into safe instructions. Translation: Most of the instructions translate identically. Sensitive instructions are translated into safe ones. Pros: More efficient than emulation No need for hardware support Cons: Less efficient than trap and emulate Hard to implement
  • Slide 15
  • 15 Paravirtualization The OS of the VM is modified so that it calls the hypervisor when it has to execute sensitive instructions. Pros: Efficient No need for hardware support Cons: Need a modified version of the guest OS, that is aware to the fact that it runs on a VM.
  • Slide 16
  • 16 Running a VM - Summary Emulation and binary translation: No need for modification of HW or guest OS. Emulation slow, binary translation more efficient. Trap and emulate: HW modification is required. Improved performance. Paravirtualization: OS modified and aware. Improved performance. The technologies used in the industry are mainly trap and emulate and binary translation, or a combination of both.
  • Slide 17
  • 17 I/O Virtualization Types of I/O: Block (hard disk) Network User input: keyboard, mouse Sound Video Most performance critical: Block Network
  • Slide 18
  • 18 NIC Network Interface Card The NIC is responsible for transmitting and receiving packets through the network. The packets that are transmitted and received are written in the memory. There are registers to which the driver writes the instructions to the NIC. The NIC sends interrupts to the host when it finishes its task.
  • Slide 19
  • 19 I/O Virtualization - Emulation Hypervisor implements a virtual NIC (by the specification of a real NIC, e.g., Intel, Realtek, Broadcom). NIC registers are variables. The hypervisor passes the instructions to the registers of the physical NIC. When physical NIC interrupts, hypervisor injects the interrupt into guest. Hypervisor vNICs pNIC
  • Slide 20
  • 20 I/O Virtualization Emulation (cont.) Pros: Unmodified guest (guest already has drivers for Intel NICs). Cons: Slow every access to every NIC register causes a VM exit (trap to hypervisor). Hypervisor needs to emulate complex hardware.
  • Slide 21
  • 21 I/O Virtualization - Paravirtualization Add virtual NIC driver into guest (frontend). Implement the virtual NIC in the hypervisor (backend). Everything works just like in the emulation case except protocol between frontend and backend Hypervisor vNICs pNIC
  • Slide 22
  • 22 I/O Virtualization Paravirtualization (cont.) Paravirtual protocol: Instead of writing to registers, guest calls the hypervisor, passes it start address and length as arguments Hypervisor knows what it should do Paravirtual protocol can be high-level, e.g., ring of buffers to transmit (so NIC doesnt stay idle after one transmission), and independent of particular NIC registers Pro: fast no need to emulate physical device Con: requires guest driver
  • Slide 23
  • 23 I/O Virtualization Direct Access Pull NIC out of the host, and plug it into the guest. Guest is allowed to access NIC registers directly, no hypervisor intervention. Host cannot access NIC anymore. Pros: As fast as possible Cons: Need NIC per guest (plus one for host). Cannot encapsulate guest packets, monitor or modify them at the hypervisor level. Hypervisor vNICs pNICs
  • Slide 24
  • 24 Hypervisor I/O Virtualization SR-IOV Single Root I/O Virtualization Contains a physical function controlled by the host, used to create multiple virtual functions. Each virtual function is assigned to a guest (like in direct assignment). Each guest thinks it has full control of the NIC, accesses registers directly (like in direct access). The NIC does multiplexing/demultiplexing of traffic. vNICs pNIC
  • Slide 25
  • 25 I/O Virtualization SR-IOV (cont.) Pros: As fast as possible Need only one NIC (as opposed to direct assignment) Cons: Few hypervisors fully support it Expensive Requires new hardware Cannot encapsulate guest packets, monitor or modify them at the hypervisor level.
  • Slide 26
  • 26 Live Migration
  • Slide 27
  • 27 Global Performance Optimization Heavy Load Lighter Load Imbalanced Giant Computer Balanced Giant Computer
  • Slide 28
  • 28 PWRAPPs Global Power Optimization 20% Average Power Savings
  • Slide 29
  • 29 Live Migration State 11 22 nn Continue until n is small enough (depends on the desired downtime)
  • Slide 30
  • 30 HW/SW Separation
  • Slide 31
  • 31 Cloud Computing
  • Slide 32
  • 32 Cloud Computing Abstract the technology infrastructure The user doesnt have to know There is a compute power out there available for use Flexible * Dynamic * On Demand * Efficient
  • Slide 33
  • 33 Principles of Cloud Computing The user should focus on the Application All the rest is taken care of by the Cloud Provider Internal Cloud
  • Slide 34
  • 34 Types of Clouds SaaS Software as a Service IaaS Infrastructure as a Service PaaS Platform as a Service
  • Slide 35
  • 35 SaaS Software as a Service Examples: Gmail, Salesforce.com The cloud provider provides a SW that is available for use over the internet. The user only pays for usage rather than buy the SW. The user does not have to worry about installation, upgrades, and the infrastructure needed for the SW.
  • Slide 36
  • 36 IaaS Infrastructure as a Service Example: Amazon EC2 The cloud provider provides the user a computer with CPU, memory, storage, network, etc. that is available for use through the internet. The user pays for the CPU cycles and network usage. The user does not have to buy the HW and provide the space, electricity maintenance, etc. Very suitable for startups.
  • Slide 37
  • 37 PaaS Platform as a Service Example: Googles App Engine The cloud provider provides not only the infrastructure but also the application stack (e.g. JVM, web server, development and testing tools). The user needs only to add the code.
  • Slide 38
  • 38 Benefits of Cloud Computing Tap into external computing power quickly, as needed Accessible using standard internet protocols Consumption based pricing - reduced costs Lower maintenance costs High availability Scalability Improved economics due to shared infrastructure Eco-friendly
  • Slide 39
  • 39