Computer Laboratory Virtualizing the Data Center with Xen Steve Hand University of Cambridge and XenSource.

Slides:



Advertisements
Similar presentations
Virtual Server Presented by Mohammad Pourzaferany.
Advertisements

Profit from the cloud TM Parallels Dynamic Infrastructure AndOpenStack.
Xen Virtualization Andrew Hamilton
© 2008 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice In search of a virtual yardstick:
Introduction to Virtualization
Cloud Computing and Virtualization Sorav Bansal CloudCamp 2010 IIT Delhi.
Server Virtualization Gina Myers. Definition Creating virtual machines (VMs) “VMs are software entities that emulate a real machine’s functionality” ◦
Build Test Integrat e Deploy Develop Languages Frameworks Cloud and Infra Data platforms.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
Intro to Virtualization Andrew Hamilton TJ IT Technician.
Virtual Machines. Virtualization Virtualization deals with “extending or replacing an existing interface so as to mimic the behavior of another system”
Virtualization for Cloud Computing
VIRTUALISATION OF HADOOP CLUSTERS Dr G Sudha Sadasivam Assistant Professor Department of CSE PSGCT.
Resource Management in Virtualization-based Data Centers Bhuvan Urgaonkar Computer Systems Laboratory Pennsylvania State University Bhuvan Urgaonkar Computer.
WHAT IS PRIVATE CLOUD? Michał Jędrzejczak Główny Architekt Rozwiązań Infrastruktury IT
Methodologies, strategies and experiences Virtualization.
Real Security for Server Virtualization Rajiv Motwani 2 nd October 2010.
Copyright © 2010 Platform Computing Corporation. All Rights Reserved.1 The CERN Cloud Computing Project William Lu, Ph.D. Platform Computing.
Virtualization Concept. Virtualization  Real: it exists, you can see it.  Transparent: it exists, you cannot see it  Virtual: it does not exist, you.
Zen and the Art of Virtualization Paul Barham, et al. University of Cambridge, Microsoft Research Cambridge Published by ACM SOSP’03 Presented by Tina.
Virtualization Virtualization is the creation of substitutes for real resources – abstraction of real resources Users/Applications are typically unaware.
Making the Virtualization Decision. Agenda The Virtualization Umbrella Server Virtualization Architectures The Players Getting Started.
Microkernels, virtualization, exokernels Tutorial 1 – CSC469.
SAIGONTECH COPPERATIVE EDUCATION NETWORKING Spring 2010 Seminar #1 VIRTUALIZATION EVERYWHERE.
SAIGONTECH COPPERATIVE EDUCATION NETWORKING Spring 2009 Seminar #1 VIRTUALIZATION EVERYWHERE.
INTRODUCTION TO CLOUD COMPUTING CS 595 LECTURE 2.
Secure & flexible monitoring of virtual machine University of Mazandran Science & Tecnology By : Esmaill Khanlarpour January.
การติดตั้งและทดสอบการทำคลัสเต อร์เสมือนบน Xen, ROCKS, และไท ยกริด Roll Implementation of Virtualization Clusters based on Xen, ROCKS, and ThaiGrid Roll.
USTH Presentation Power-aware Scheduler for Virtualization TRAN Giang Son Prof. Daniel HAGIMONT Oct 19th, 2011.
Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker.
Virtual Machine Monitors: Technology and Trends Jonathan Kaldor CS614 / F07.
Virtual Machine and its Role in Distributed Systems.
Politecnico di Torino Dipartimento di Automatica ed Informatica TORSEC Group Performance of Xen’s Secured Virtual Networks Emanuele Cesena Paolo Carlo.
Hadi Salimi Distributed Systems Lab, School of Computer Engineering, Iran University of Science and Technology, Fall 2010 Performance.
A Brief Intro to Virtualiztion. What is Virtualization? An abstraction Usually performed via software Many different types –Hardware –Software –Data –Network.
COMS E Cloud Computing and Data Center Networking Sambit Sahu
First experience of submission to the EGEE/RDIG Grid of jobs prepared for non standart OSs by means of virtualization. I.Gorbunov, A.Kryukov SINP MSU,
Xen Basics A Primer for the CPS 110 Programming Assignments Angela Dalton.
MIS 304 Professor Fang Fang Alan Orther. What is Virtualization? How Does it Work? How is it Good for Businesses? Questions?
Server Virtualization
Dynamic and Secure Application Consolidation with Nested Virtualization and Library OS in Cloud Kouta Sannomiya and Kenichi Kourai (Kyushu Institute of.
Introduction to virtualization
Full and Para Virtualization
Virtualization One computer can do the job of multiple computers, by sharing the resources of a single computer across multiple environments. Turning hardware.
Operating-System Structures
VM vs Container Xen, KVM, VMware, etc. Hardware emulation / paravirtualization Can run different OSs on the same box Dozens of instances OS sprawl problem.
© 2009 Pittsburgh Supercomputing Center Server Virtualization and Security Kevin Sullivan Copyright Kevin Sullivan, Pittsburgh Supercomputing.
Server Virtualization Panel Nicholas Hay Kyle Papworth Lyle Severance
Virtualization Assessment. Strategy for web hosting Reduce costs by consolidating services onto the fewest number of physical machines
VIRTUAL MACHINE – VMWARE. VIRTUAL MACHINE (VM) What is a VM? – A virtual machine (VM) is a software implementation of a computing environment in which.
Powered by virtualization By Alex Talampas.  Let’s you run multiple virtual machines on a single physical machine.
Open Source Virtualization Andrey Meganov RHCA, RHCX Consultant / VDEL
Virtualization - an introduction Gordon Ross Computing Service.
VM vs Container Xen, KVM, VMware, etc. ● Hardware emulation / paravirtualization ● Can run different OSs on the same box ● Dozens of instances ● OS sprawl.
Virtualization for Cloud Computing
Presented by Yoon-Soo Lee
Virtualization Virtualization is the creation of substitutes for real resources – abstraction of real resources Users/Applications are typically unaware.
Build a low-touch, highly scalable cloud with IBM SmartCloud Provisioning Academic Initiative © 2011 IBM Corporation.
Java Win32 native Java VM Linux OS ARM VM Runtime Windows OS
Virtualization overview
Virtual Servers.
A Brief Intro to Virtualiztion
A Brief Intro to Virtualiztion
Cloud Computing It's feature, uses,types of cloud deployment model,and different types of services of models
Virtualization Virtualization is the creation of substitutes for real resources – abstraction of real resources Users/Applications are typically unaware.
OS Virtualization.
AppFabric: Platform for Delivering Next Generation Applications over Global multi-Cloud Environments Next generation application use-cases such as IoT,
Virtual machines benefits
Virtualization Dr. S. R. Ahmed.
Presentation transcript:

Computer Laboratory Virtualizing the Data Center with Xen Steve Hand University of Cambridge and XenSource

What is Xen Anyway? Open source hypervisor –run multiple OSes on one machine –dynamic sizing of virtual machine –much improved manageability Pioneered paravirtualization –modify OS kernel to run on Xen –(applications mods not required) –extremely low overhead (~1%) Massive development effort –first (open source) release –today have hundreds of talented community developers

Problem: Success of Scale-out OS+app per server provisioning leads to server sprawl Server utilization rates <10% Expensive to maintain, house, power, and cool Slow to provision, inflexible to change or scale Poor resilience to failures

Solution: Virtualize With Xen Consolidation: fewer servers slashes CapEx and OpEx Higher utilization: make the most of existing investments Instant on provisioning: any app on any server, any time Robustness to failures and auto-restart of VMs on failure

Further Virtualization Benefits Separating the OS from the hardware –Users no longer forced to upgrade OS to run on latest hardware Device support is part of the platform –Write one device driver rather than N –Better for system reliability/availability –Faster to get new hardware deployed Enables Virtual Appliances –Applications encapsulated with their OS –Easy configuration and management

Virtualization Possibilities Value-added functionality from outside OS: –Fire-walling / network IDS / inverse firewall –VPN tunnelling; LAN authentication –Virus, mal-ware and exploit scanning –OS patch-level status monitoring –Performance monitoring and instrumentation –Storage backup and snapshots –Local disk as just a cache for network storage –Carry your world on a USB stick –Multi-level secure systems

This talk Introduction Xen 3 –para-virtualization, I/O architecture –hardware virtualization (today + tomorrow) XenEnterprise: overview and performance Case Study: Live Migration Outlook

Xen 3.0 (5th Dec 2005) Secure isolation between VMs Resource control and QoS x86 32/PAE36/64 plus HVM; IA64, Power PV guest kernel needs to be ported –User-level apps and libraries run unmodified Execution performance close to native Broad (linux) hardware support Live Relocation of VMs between Xen nodes Latest stable release is 3.1 (May 2007)

Xen 3.x Architecture Event Channel Virtual MMUVirtual CPU Control IF Hardware (SMP, MMU, physical memory, Ethernet, SCSI/IDE) Native Device Drivers GuestOS (XenLinux) Device Manager & Control s/w VM0 GuestOS (XenLinux) Unmodified User Software VM1 Front-End Device Drivers GuestOS (XenLinux) Unmodified User Software VM2 Front-End Device Drivers Unmodified GuestOS (WinXP)) Unmodified User Software VM3 Safe HW IF Xen Virtual Machine Monitor Back-End HVM x86_32 x86_64 IA64 AGP ACPI PCI SMP Front-End Device Drivers

Para-Virtualization in Xen Xen extensions to x86 arch –Like x86, but Xen invoked for privileged ops –Avoids binary rewriting –Minimize number of privilege transitions into Xen –Modifications relatively simple and self-contained Modify kernel to understand virtualised env. –Wall-clock time vs. virtual processor time Desire both types of alarm timer –Expose real resource availability Enables OS to optimise its own behaviour

x86 CPU virtualization Xen runs in ring 0 (most privileged) Ring 1/2 for guest OS, 3 for user-space –GPF if guest attempts to use privileged instr Xen lives in top 64MB of linear addr space –Segmentation used to protect Xen as switching page tables too slow on standard x86 Hypercalls jump to Xen in ring 0 –Indirection via hypercall page allows flexibility Guest OS may install fast trap handler –Direct user-space to guest OS system calls

Para-Virtualizing the MMU Guest OSes allocate and manage own PTs –Hypercall to change PT base Xen must validate PT updates before use –Allows incremental updates, avoids revalidation Validation rules applied to each PTE: –1. Guest may only map pages it owns* –2. Pagetable pages may only be mapped RO Xen traps PTE updates and emulates, or unhooks PTE page for bulk updates

SMP Guest Kernels Xen 3.x supports multiple VCPUs –Virtual IPIs sent via Xen event channels –Currently up to 32 VCPUs supported Simple hotplug/unplug of VCPUs –From within VM or via control tools –Optimize one active VCPU case by binary patching spinlocks NB: Many applications exhibit poor SMP scalability – often better off running multiple instances each in their own OS

Performance: SPECJBB Average 0.75% overhead Native 3 GHz Xeon 1GB memory / guest EL vs EL-xen 3 GHz Xeon 1GB memory / guest EL vs EL-xen

Performance: dbench < 5% Overhead up to 8 way SMP

Kernel build 32b PAE; Parallel make, 4 processes per CPU 5% 8% 13% 18% 23% Source: XenSource, Inc: 10/06 # Virtual CPUs

I/O Architecture Xen IO-Spaces delegate guest OSes protected access to specified h/w devices –Virtual PCI configuration space –Virtual interrupts –(Need IOMMU for full DMA protection) Devices are virtualised and exported to other VMs via Device Channels –Safe asynchronous shared memory transport –Backend drivers export to frontend drivers –Net: use normal bridging, routing, iptables –Block: export any blk dev e.g. sda4,loop0,vg3 (Infiniband / Smart NICs for direct guest IO)

Isolated Driver Domains Event Channel Virtual MMUVirtual CPU Control IF Hardware (SMP, MMU, physical memory, Ethernet, SCSI/IDE) Native Device Driver GuestOS (XenLinux) Device Manager & Control s/w VM0 Native Device Driver GuestOS (XenLinux) VM1 Front-End Device Drivers GuestOS (XenLinux) Unmodified User Software VM2 Front-End Device Drivers GuestOS (XenBSD) Unmodified User Software VM3 Safe HW IF Xen Virtual Machine Monitor Back-End Driver Domain

Isolated Driver VMs Run device drivers in separate domains Detect failure e.g. –Illegal access –Timeout Kill domain, restart E.g. 275ms outage from failed Ethernet driver time (s)

Hardware Virtualization (1) Paravirtualization… –has fundamental benefits… (c/f MS Viridian) –but is limited to OSes with PV kernels. Recently seen new CPUs from Intel, AMD –enable safe trapping of difficult instructions –provide additional privilege layers (rings) –currently shipping in most modern server, desktop and notebook systems Solves part of the problem, but…

Hardware Virtualization (2) CPU is only part of the system –also need to consider memory and I/O Memory: –OS wants contiguous physical memory, but Xen needs to share between many OSes –Need to dynamically translate between guest physical and real physical addresses –Use shadow page tables to mirror guest OS page tables (and implicit no paging mode) Xen 3.0 includes software shadow page tables; future x86 processors will include hardware support.

Hardware Virtualization (3) Finally we need to solve the I/O issue –non-PV OSes dont know about Xen –hence run standard PC ISA/PCI drivers Just emulate devices in software? –complex, fragile and non-performant… –… but ok as backstop mechanism. Better: –add PV (or enlightened) device drivers to OS –well-defined driver model makes this relatively easy –get PV performance benefits for I/O path

Xen 3: Hardware Virtual Machines Enable Guest OSes to be run without modification –E.g. legacy Linux, Solaris x86, Windows XP/2003 CPU provides vmexits for certain privileged instrs Shadow page tables used to virtualize MMU Xen provides simple platform emulation –BIOS, apic, iopaic, rtc, net (pcnet32), IDE emulation Install paravirtualized drivers after booting for high- performance IO Possibility for CPU and memory paravirtualization –Non-invasive hypervisor hints from OS

Native Device Drivers Control Panel (xm/xend) Front end Virtual Drivers Linux xen64 Device Models Guest BIOS Unmodified OS Domain N Linux xen64 Callback / Hypercall VMExit Virtual Platform 0D Backend Virtual driver Native Device Drivers Domain 0 Event channel 0P 1/3P 3P I/O: PIT, APIC, PIC, IOAPICProcessorMemory Control InterfaceHypercallsEvent ChannelScheduler Guest BIOS Unmodified OS VMExit Virtual Platform 3D HVM Architecture Guest VM (HVM) (32-bit mode) Guest VM (HVM) (64-bit mode)

Progressive Paravirtualization Hypercall API available to HVM guests Selectively add PV extensions to optimize –Network and Block IO –XenAPIC (event channels) –MMU operations multicast TLB flush PTE updates (faster than page fault) page sharing –Time (wall-clock and virtual time) –CPU and memory hotplug

Native Device Drivers Control Panel (xm/xend) Front end Virtual Drivers Linux xen64 Device Models Guest BIOS Unmodified OS Domain N Linux xen64 Callback / Hypercall VMExit Virtual Platform 0D Backend Virtual driver Native Device Drivers Domain 0 Event channel 0P 1/3P 3P I/O: PIT, APIC, PIC, IOAPICProcessorMemory Control InterfaceHypercallsEvent ChannelScheduler FE Virtual Drivers Guest BIOS Unmodified OS VMExit Virtual Platform FE Virtual Drivers 3D PIC/APIC/IOAPIC emulation Guest VM (HVM) (32-bit mode) Guest VM (HVM) (64-bit mode) Xen Enhanced HVM I/O

HVM I/O Performance Measured with ttcp (1500 byte MTU) Emulated I/O PV on HVM Pure PV Source: XenSource, Sep 06

Native Device Drivers Control Panel (xm/xend) Front end Virtual Drivers Linux xen64 Guest BIOS Unmodified OS Domain N Linux xen64 Callback / Hypercall VMExit Virtual Platform 0D Guest VM (HVM) (32-bit mode) Backend Virtual driver Native Device Drivers Domain 0 Event channel 0P 1/3P 3P I/O: PIT, APIC, PIC, IOAPICProcessorMemory Control InterfaceHypercallsEvent ChannelScheduler FE Virtual Drivers Guest BIOS Unmodified OS VMExit Virtual Platform Guest VM (HVM) (64-bit mode) FE Virtual Drivers 3D IO Emulation Future plan: I/O stub domains. Device Models PIC/APIC/IOAPIC emulation

HW Virtualization Summary CPU virtualization available today –lets Xen support legacy/proprietary OSes Additional platform protection imminent –protect Xen from IO devices –full IOMMU extensions coming soon MMU virtualization also coming soon: –avoid the need for s/w shadow page tables –should improve performance and reduce complexity Device virtualization arriving from various folks: –networking already here (ethernet, infiniband) –[remote] storage in the works (NPIV, VSAN) –graphics and other devices sure to follow…

What is XenEnterprise? Multi-Operating System –Windows, Linux and Solaris Bundled Management Console Easy to use –Xen and guest installers and P2V tools –For standard servers and blades High Performance Paravirtualization –Exploits hardware virtualization –Per guest resource guarantees Extensible Architecture –Secure, tiny, low maintenance –Extensible by ecosystem partners Ten minutes to Xen

Get Started with XenEnterprise Ten minutes to Xen »Packaged and supported virtualization platform for x86 servers »Includes the Xen TM Hypervisor »High performance bare metal virtualization for both Windows and Linux guests »Easy to use and install »Management console included for standard management of Xen systems and guests »Microsoft supports Windows customers on XenEnterprise »Download free from and try it out!

Resource usage statisticsWindows 2003 ServerWindows XP Easy VM CreationClone and Export VMsRed Hat Linux 4 A few XE 3.2 Screenshots…

SPECjbb2005 Sun JVM installed

w2k3 SPECcpu2000 integer (multi)

w2k3 Passmark-CPU results vs native

w2k3 Passmark memory vs native

Performance: Conclusions Xen PV guests typically pay ~1% (1VCPU) or ~2% (2VCPU) compared to native –ESX pays 12-21% for same benchmark XenEnterprise includes: –hardened and optimized OSS Xen –proprietary PV drivers for MS OSes –matches or beats ESX performance in nearly all cases Some room for further improvement…

Live Migration of VMs: Motivation VM migration enables: –High-availability Machine maintenance –Load balancing Statistical multiplexing gain Xen

Assumptions Networked storage –NAS: NFS, CIFS –SAN: Fibre Channel –iSCSI, network block dev –drdb network RAID Good connectivity –common L2 network –L3 re-routeing Xen Storage

Challenges VMs have lots of state in memory Some VMs have soft real-time requirements –E.g. web servers, databases, game servers –May be members of a cluster quorum Minimize down-time Performing relocation requires resources Bound and control resources used

Stage 0: pre-migration Stage 1: reservation Stage 2: iterative pre-copy Stage 3: stop-and-copy Stage 4: commitment Relocation Strategy VM active on host A Destination host selected (Block devices mirrored) Initialize container on target host Copy dirty pages in successive rounds Suspend VM on host A Redirect network traffic Synch remaining state Activate on host B VM state on host A released

Pre-Copy Migration: Round 1

Pre-Copy Migration: Round 2

Pre-Copy Migration: Final

Pages that are dirtied must be re-sent –Super hot pages e.g. process stacks; top of page free list –Buffer cache –Network receive / disk buffers Dirtying rate determines VM down-time –Shorter iterations less dirtying … Writeable Working Set

Rate Limited Relocation Dynamically adjust resources committed to performing page transfer –Dirty logging costs VM ~2-3% –CPU and network usage closely linked E.g. first copy iteration at 100Mb/s, then increase based on observed dirtying rate –Minimize impact of relocation on server while minimizing down-time

Web Server Migration

Iterative Progress: SPECWeb 52s

Iterative Progress: Quake3

Quake 3 Server relocation

Xen 3.1 Highlights Released May 18 th 2007 Lots of new features: –32-on-64 PV guest support run PAE PV guests on a 64-bit Xen! –Save/restore/migrate for HVM guests –Dynamic memory control for HVM guests –Blktap copy-on-write support (incl checkpoint) –XenAPI 1.0 support XML configuration files for virtual machines VM life-cycle management operations; and Secure on- or off-box XML-RPC with many bindings.

Xen 3.x Roadmap Continued improved of full-virtualization –HVM (VT/AMD-V) optimizations –DMA protection of Xen, dom0 –Optimizations for (software) shadow modes Client deployments: support for 3D graphics, etc Live/continuous checkpoint / rollback –disaster recovery for the masses Better NUMA (memory + scheduling) Smart I/O enhancements XenSE : Open Trusted Computing

Backed By All Major IT Vendors * Logos are registered trademarks of their owners

Summary Xen is re-shaping the IT industry Commoditize the hypervisor Key to volume adoption of virtualization Paravirtualization in the next release of all OSes XenSource Delivers Volume Virtualization XenEnterprise shipping now Closely aligned with our ecosystem to deliver full- featured, open and extensible solutions Partnered with all key OSVs to deliver an interoperable virtualized infrastructure

Thanks! EuroSys 2008 Venue: Glasgow, Scotland, Apr Important dates: –1–14 Sep 2007: submission of abstracts –2–21 Sep 2007: submission of papers –2–20 Dec 2007: notification to authors More details at