Xen and the Art of. Virtualization. Ian Pratt



Similar documents
Full and Para Virtualization

Virtualization. Types of Interfaces

Hybrid Virtualization The Next Generation of XenLinux

Models For Modeling and Measuring the Performance of a Xen Virtual Server

COS 318: Operating Systems. Virtual Machine Monitors

Xen and the Art of Virtualization

The Xen of Virtualization

Optimizing Network Virtualization in Xen

Virtual machines and operating systems

INFO5010 Advanced Topics in IT: Cloud Computing

Optimizing Network Virtualization in Xen

Enterprise-Class Virtualization with Open Source Technologies

Virtual Machine Monitors. Dr. Marc E. Fiuczynski Research Scholar Princeton University

Virtualization. Jia Rao Assistant Professor in CS

Xen Live Migration. Networks and Distributed Systems Seminar, 24 April Matúš Harvan Xen Live Migration 1

Microkernels, virtualization, exokernels. Tutorial 1 CSC469

Virtualization Technology. Zhiming Shen

Chapter 5 Cloud Resource Virtualization

VMware and CPU Virtualization Technology. Jack Lo Sr. Director, R&D

Cloud Computing CS

Performance tuning Xen

Hardware Based Virtualization Technologies. Elsie Wahlig Platform Software Architect

CS 695 Topics in Virtualization and Cloud Computing. More Introduction + Processor Virtualization

Uses for Virtual Machines. Virtual Machines. There are several uses for virtual machines:

Virtualization. Pradipta De

Virtualization. Explain how today s virtualization movement is actually a reinvention

Nested Virtualization

Basics of Virtualisation

Knut Omang Ifi/Oracle 19 Oct, 2015

Virtualization for Cloud Computing

COS 318: Operating Systems. Virtual Machine Monitors

KVM: A Hypervisor for All Seasons. Avi Kivity avi@qumranet.com

Using Linux as Hypervisor with KVM

Distributed Systems. Virtualization. Paul Krzyzanowski

Chapter 14 Virtual Machines

Virtualization Technologies

Virtualization. Dr. Yingwu Zhu

Hypervisors. Introduction. Introduction. Introduction. Introduction. Introduction. Credits:

Intel s Virtualization Extensions (VT-x) So you want to build a hypervisor?

COM 444 Cloud Computing

CS5460: Operating Systems. Lecture: Virtualization 2. Anton Burtsev March, 2013

Cloud Computing. Up until now

2972 Linux Options and Best Practices for Scaleup Virtualization

Virtual Machines. COMP 3361: Operating Systems I Winter

An Introduction to Virtual Machines Implementation and Applications

Basics in Energy Information (& Communication) Systems Virtualization / Virtual Machines

nanohub.org An Overview of Virtualization Techniques

Distributed and Cloud Computing

The Art of Virtualization with Free Software

x86 ISA Modifications to support Virtual Machines

Virtualization Technologies and Blackboard: The Future of Blackboard Software on Multi-Core Technologies

Virtual Machine Synchronization for High Availability Clusters

Intel Virtualization Technology Overview Yu Ke

Container-based operating system virtualization: a scalable, high-performance alternative to hypervisors

Enabling Technologies for Distributed Computing

Virtualization with Windows

Bridging the Gap between Software and Hardware Techniques for I/O Virtualization

A quantitative comparison between xen and kvm

Virtualization benefits Introduction to XenSource How Xen is changing virtualization The Xen hypervisor architecture Xen paravirtualization

Virtualization. ! Physical Hardware. ! Software. ! Isolation. ! Software Abstraction. ! Encapsulation. ! Virtualization Layer. !

Satish Mohan. Head Engineering. AMD Developer Conference, Bangalore

Architecture of the Kernel-based Virtual Machine (KVM)

COS 318: Operating Systems

kvm: Kernel-based Virtual Machine for Linux

Outline. Outline. Why virtualization? Why not virtualize? Today s data center. Cloud computing. Virtual resource pool

OS Virtualization. CSC 456 Final Presentation Brandon D. Shroyer

Hybrid-Virtualization Enhanced Virtualization for Linux*

Understanding Full Virtualization, Paravirtualization, and Hardware Assist. Introduction...1 Overview of x86 Virtualization...2 CPU Virtualization...

Virtualization. Jukka K. Nurminen

RPM Brotherhood: KVM VIRTUALIZATION TECHNOLOGY

Enabling Technologies for Distributed and Cloud Computing

Cloud Architecture and Virtualisation. Lecture 4 Virtualisation

Brian Walters VMware Virtual Platform. Linux J. 1999, 63es, Article 6 (July 1999).

Computing in High- Energy-Physics: How Virtualization meets the Grid

Introduction to Virtual Machines

Dynamic Load Balancing of Virtual Machines using QEMU-KVM

Cloud^H^H^H^H^H Virtualization Technology. Andrew Jones May 2011

Virtualization. Clothing the Wolf in Wool. Wednesday, April 17, 13

Virtual Machine Security

VMware Server 2.0 Essentials. Virtualization Deployment and Management

Virtualization is set to become a key requirement

Oracle Database Scalability in VMware ESX VMware ESX 3.5

Virtualization VMware Inc. All rights reserved

x86 Virtualization Hardware Support Pla$orm Virtualiza.on

Windows Server Virtualization & The Windows Hypervisor

Virtual Machines.

Chapter 16: Virtual Machines. Operating System Concepts 9 th Edition

Cloud Operating Systems for Servers

GUEST OPERATING SYSTEM BASED PERFORMANCE COMPARISON OF VMWARE AND XEN HYPERVISOR

CPET 581 Cloud Computing: Technologies and Enterprise IT Strategies. Virtualization of Clusters and Data Centers

Data Centers and Cloud Computing

Clouds Under the Covers. Elgazzar - CISC Fall

Advanced Computer Networks. Network I/O Virtualization

Lecture 2 Cloud Computing & Virtualization. Cloud Application Development (SE808, School of Software, Sun Yat-Sen University) Yabo (Arber) Xu

Transcription:

Xen and the Art of Virtualization Ian Pratt Keir Fraser, Steve Hand, Christian Limpach, Dan Magenheimer (HP), Mike Wray (HP), R Neugebauer (Intel), M Williamson (Intel) Computer Laboratory

Outline Virtualization overview Xen 2.0 Features Architecture Performance Xen para-virtualized binary interface Linux 2.6 on Xen/x86 Work in Progress

Virtualization Overview Single OS image: Ensim, Vservers, CKRM Group user processes into resource containers Hard to get strong isolation Full virtualization: VMware, VirtualPC Run multiple unmodified guest OSes Hard to efficiently virtualize x86 Para-virtualization: UML, Xen Run multiple guest OSes ported to special arch Arch Xen/x86 is very close to normal x86

Xen 2.0 Features Secure isolation between VMs Resource control and QoS Only guest kernel needs to be ported All user-level apps and libraries run unmodified Linux 2.4/2.6, NetBSD, FreeBSD, WinXP Execution performance is close to native Live Migration of VMs between Xen nodes Xen hardware support: SMP; x86 / x86_64 / ia64; all Linux drivers

Xen 1.2 Architecture Domain 0 Domain 1 Domain 2 Domain 3 Unmodified User- Level Application Software Ported Guest Operating Systems Xen Hypervisor Hardware

Xen 2.0 Architecture Domain 0 Domain 1 Domain 2 Domain 3 Unmodified User- Level Application Software Ported Guest Operating Systems Xen Hypervisor Hardware

System Performance 1.1 1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0.0 L X V U L X V U L X V U L X V U SPEC INT2000 (score) Linux build time (s) OSDB-OLTP (tup/s) SPEC WEB99 (score) Benchmark suite running on Linux (L), Xen (X), VMware Workstation (V), and UML (U)

Xen Para-Virtualization Arch Xen/x86 like x86, but replace privileged instructions with Xen hypercalls Avoids binary rewriting and fault trapping For Linux 2.6, only arch-dep files modified Modify OS to understand virtualised env. Wall-clock time vs. virtual processor time Xen provides both types of alarm timer Expose real resource availability Enables OS to optimise 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 Guest OS may install fast trap handler Direct ring user-space to guest OS system calls MMU virtualisation: shadow vs. direct-mode

MMU Virtualizion : Shadow-Mode guest reads Virtual Pseudo-physical guest writes Accessed & dirty bits Updates Guest OS Virtual Machine MMU VMM Hardware

MMU Virtualization : Direct-Mode guest reads guest writes Virtual Machine Guest OS MMU Xen VMM Hardware

Para-Virtualizing the MMU Guest OSes allocate and manage own PTs Hypercall to change PT base Xen must validate PT updates before use Updates may be queued and batch processed Validation rules applied to each PTE: 1. Guest may only map pages it owns* 2. Pagetable pages may only be mapped RO Xen tracks page ownership and current use L4/L3/L2/L1/Normal (plus ref count)

MMU Micro-Benchmarks 1.1 1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0.0 L X V U Page fault (µs) L X V U Process fork (µs) lmbench results on Linux (L), Xen (X), VMWare Workstation (V), and UML (U)

Queued Update Interface (Xen 1.2) guest reads guest writes Virtual Machine Guest OS validation MMU Xen VMM Hardware

Writeable Page Tables (1) guest reads first guest write Virtual Machine Guest OS page fault MMU Xen VMM Hardware

Writeable Page Tables (2) guest reads guest writes X Virtual Machine Guest OS MMU Xen VMM Hardware

Writeable Page Tables (3) guest reads guest writes X Virtual Machine Guest OS page fault MMU Xen VMM Hardware

Writeable Page Tables (4) guest reads guest writes Virtual Machine Guest OS validate MMU Xen VMM Hardware

Segmentation Support Segmentation req d by thread libraries Xen supports virtualised GDT and LDT Segment must not overlap Xen 64MB area NPT TLS library uses 4GB segs with ve offset! Emulation plus binary rewriting required x86_64 has no support for segment limits Forced to use paging, but only have 2 prot levels Xen ring 0; OS and user in ring 3 w/ PT switch Opteron s TLB flush filter CAM makes this fast

I/O Architecture Xen IO-Spaces delegate guest OSes protected access to specified h/w devices Virtual PCI configuration space Virtual interrupts 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

Device Channel Interface

TCP results 1.1 1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0.0 L X V U L X V U L X V U L X V U Tx, MTU 1500 (Mbps) Rx, MTU 1500 (Mbps) Tx, MTU 500 (Mbps) Rx, MTU 500 (Mbps) TCP bandwidth on Linux (L), Xen (X), VMWare Workstation (V), and UML (U)

Isolated Driver VMs 350 300 250 200 150 100 50 0 0 5 10 15 20 25 30 35 40 time (s)

Live migration for clusters Pre-copy approach: VM continues to run lift domain on to shadow page tables Bitmap of dirtied pages; scan; transmit dirtied Atomic zero bitmap & make PTEs read-only Iterate until no forward progress, then stop VM and transfer remainder Rewrite page tables for new MFNs; Restart Migrate MAC or send unsolicited ARP-Reply Downtime typically 10 s of milliseconds (though very application dependent)

Scalability Scalability principally limited by Application resource requirements several 10 s of VMs on server-class machines Balloon driver used to control domain memory usage by returning pages to Xen Normal OS paging mechanisms can deflate quiescent domains to <4MB Xen per-guest memory usage <32KB Additional multiplexing overhead negligible

Scalability 1000 800 600 400 200 0 L 2 X L 4 X L 8 X L 16 X Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X)

Resource Differentation Aggregate throughput relative to one instance 2.0 1.5 1.0 0.5 0.0 2 4 8 8(diff) OSDB-IR 2 4 8 8(diff) OSDB-OLTP Simultaneous OSDB-IR and OSDB-OLTP Instances on Xen

On-Going Work xend web control interface Cluster management tools Load balancing SMP guest OSes (have SMP hosts already) Support for Intel VT/LT x86 extensions Will enable full virtualization VM Checkpointing Debugging and fault tolerance

Conclusions Xen is a complete and robust GPL VMM Outstanding performance and scalability Excellent resource control and protection Linux 2.6 port required no modifications to core code http://xen.sf.net