Presentation is loading. Please wait.

Presentation is loading. Please wait.

Virtualization and Cloud Computing

Similar presentations


Presentation on theme: "Virtualization and Cloud Computing"— Presentation transcript:

1 Virtualization and Cloud Computing
Vera Asodi VMware

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

3 History 1960’s - IBM implemented virtualization as a way to logically partition mainframe computers into separate virtual machines to enable multitasking. 1960’s - MIT – Project ‘MAC’ – aimed to design and implement a better time sharing system. 1990’s – VMware invented x86 based architecture virtualization.

4 Virtual Machine

5 Traditional Architecture
Traditional vs. Virtual Architecture Traditional Architecture Virtual Architecture

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

7 Virtual Center

8 Types of Virtualization
Hosted Bare Metal VMM APP APP Host OS VMM VMM – Virtual Machine Monitor (or hypervisor) – a software layer that allows virtual machines to run on a physical machine. The OS of the host (the physical machine) is called Host OS, and the OS of the VMs is called Guest OS. VMware player VMware workstation Microsoft virtual PC Sun VirtualBox QEMU KVM VMware ESX Microsoft Hyper-V XEN

9 Types of Virtualization (cont.)
Hosted Bare Metal 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

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.

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.

12 The Difficulty of Virtualization
Traditional Architecture Bare Metal Virtualized Architecture Ring 3 User Apps Ring 3 User Apps Ring 2 Ring 2 Ring 1 Ring 1 Guest OS Ring 0 OS Ring 0 VMM Host Computer System Hardware Host Computer System Hardware Challenge – x86 operating system are designed to run directly on the bare-metal hardware, so they naturally assume they fully ‘own’ the computer hardware. Some sensitive & privileged instruction have different semantics when not executed in Ring 0 The difficulty is in trapping and translating these sensitive and privileged instructions The problem: the guest OS runs in ring 1, while some privileged instructions need to run in ring 0.

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.

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

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.

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.

17 I/O Virtualization Types of I/O: Block (hard disk) Network
User input: keyboard, mouse Sound Video Most performance critical: Block

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. For example, in transmission: The OS prepares the packets in a memory buffer The driver writes the start address and the length of the packet to the appropriate registers The driver writes ‘GO’ to the appropriate register The NIC reads the packet and sends it on the wire The NIC interrupts the host to notify it that the transmission was completed and it is ready to receive the next packet

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. vNICs Hypervisor pNIC

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.

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 vNICs Hypervisor pNIC

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 doesn’t stay idle after one transmission), and independent of particular NIC registers Pro: fast – no need to emulate physical device Con: requires guest driver

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. vNICs Hypervisor pNICs

24 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 Hypervisor pNIC

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.

26 Title Month Year Live Migration

27 Global Performance Optimization
Title Month Year Global Performance Optimization Balanced Giant Computer Imbalanced Giant Computer Heavy Load Lighter Load

28 Global Power Optimization
Title Month Year Global Power Optimization 20% Average Power Savings PWR APPs

29 Continue until n is small enough (depends on the desired downtime)
Title Month Year Live Migration State 1 Continue until n is small enough (depends on the desired downtime) 2 Want to move a VM from one physical host to another with (almost) no downtime. Copy the state of the VM During the time the state is copied, the VM kept on running, so we have to copy the diff 1 During the time 1 is copied, the VM kept on running, so we have to copy the diff 2 1 is much smaller than the whole state  the time it takes to copy it is much shorter  2 is much smaller than 1  the time it takes to copy it is much shorter  3 is much smaller than 2 and so on… Continue until the diff is so small that the time it takes to copy it is short enough to be considered as no downtime – then shut down the VM, copy it and restart it. n

30 HW/SW Separation

31 Cloud Computing

32 Cloud Computing Abstract the technology infrastructure
The user doesn’t have to know There is a compute power out there available for use Flexible * Dynamic * On Demand * Efficient

33 Principles of Cloud Computing
Internal Cloud The user should focus on the Application All the rest is taken care of by the Cloud Provider

34 Types of Clouds SaaS – Software as a Service
IaaS – Infrastructure as a Service PaaS – Platform as a Service

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.

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.

37 PaaS Platform as a Service Example: Google’s 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.

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

39


Download ppt "Virtualization and Cloud Computing"

Similar presentations


Ads by Google