240 likes | 683 Views
Subhabrata Bhattacharya High Performance Computing . System Virtualization. Agenda. System virtualization - an overview Need for virtualization Virtualization – Evolution as a technology Technologies Feature Comparison Virtualization in practice Questions.
E N D
Subhabrata Bhattacharya High Performance Computing System Virtualization
Agenda • System virtualization - an overview • Need for virtualization • Virtualization – Evolution as a technology • Technologies • Feature Comparison • Virtualization in practice • Questions
System Virtualization – An Overview “A framework or methodology of dividing the resources of a computer into multiple execution environments, by applying one or more concepts or technologies such as hardware and software partitioning, time-sharing, partial or complete machine simulation, emulation, quality of service, and many others” http://www.kernelthread.com/publications/virtualization/
Why is it required? • Isolation • Logically separated environment for application • Simultaneous execution of applications • Resolution of conflicting resources • Utilisation • Tailored use of computer resources • Dynamic provisioning • Adherence to SLA
Virtualization – Evolution as a technology • IBM's CP/CMS during late 1965 • Processor multiplexing • Introduction of Virtual machines • IBM's VM/360 • CP (Control Program) • CMS (Conversational Monitor System) • RSCS (Resource Spooling and Communications System)
IBM's VM/370 Architecture • Control Program • General Multiprogramming • Low-level resource mapping • Conversational Monitor System • Managing Filesystem operations • Creating VM interfaces • Resource Spooling & Comm. System • Interrupt-driven multitasking system • Handling Network I/O
Further improvements • Specialised hardware supporting Virtualization • Virtual Machine Facility/370 (VM/370) on S/370 XA • Specific CPU instructions to leverage performance • “Assists” eliminated hardware emulation • Virtual Machine Assists (VMA) • Extended Control Program Support (ECPS) • Shadow-table-bypass : H/w for direct access to Memory map tables • Unmodified code execution in Virtual Machines
Improvements on IA-32 (x86) • Ring (Privileged modes) of instruction execution • Non privileged instructions directly execute on processor • Privileged instructions when executed trap to VM Monitor • Software VMM detects problematic instructions
Hardware Assisted Virtualization • IBM's Power 5 hypervisor • Logical partitioning (LPAR) of Memory, Disk space • Dynamic adding, deleting, modifying of LPAR • Micro-partitioning (Distributing CPU clock cycles over LPARs) • Supports Linux, AIX 5.x, Virtual I/O server http://publib.boulder.ibm.com/infocenter/eserver/v1r2/index.jsp?topic=/eicaz/eicazpsys.htm
X86 based virtualization techniques • Intel Vanderpool Technology • Virtual Machine Extensions in IA-32 based processors • Registers set VMX bits on/off for VM transition operations • Special mechanisms for saving Guest VM context switches • Operations like TLB updates are implemented in hardware • AMD's Pacifica • Memory Management through optimized Nested Page Tables • Device Exclusion Vector helps direct memory access sans VMM • Tagged TLB – entire TLB flush not necessary after VM switch
Software virtualization techniques • Emulation • Instruction-set/pure emulation : 8086 emulator on IA-32 • OS-API emulation : wine • Hosted virtualization • VMWare ESX server, User Mode Linux • Para-virtualization • Xen, Denali • Container based virtualization • Linux Vserver, Solaris Zones, BSD Jails, FreeVPs, OpenVz
Architecture Para-virtualization (Type 1) Hosted-virtualization (Type 2) http://publib.boulder.ibm.com/infocenter/eserver/v1r2/index.jsp?topic=/eicaz/eicazisys.htm
User Mode Linux Architecture http://user-mode-linux.sourceforge.net/slides/als2000/img2.html
Key Features • Guest kernel runs as user process on Linux Host kernel • Host intercepts Guest system calls, validates, translates and executes • System calls in host simulate device driver interfaces for guests • Kernel boot on Read Only fs; make changes on virtual device (CoW) • On demand addition/removal of Virtual Block Devices & Network devices • File-system Mirroring through hostfs • Security through SELinux
Advantages Drawbacks • Open source, free • Port available for Linux (2.4.x & 2.6.x) • Near native performance • All Linux benefits are integrated • Highly flexible • Portable in other architectures • Run UML within itself (self hosting) • Only available for Linux • Significant overhead • Lack of high-level management tools • Standard Linux kernel vulnerabilities
Xen Architecture http://www.cl.cam.ac.uk/netos/papers/2003-xensosp.pdf, p-5
Key Features • Hypervisor runs directly on top of hardware • Guest OS code need to be modified to interact with hypervisor • Dynamic resource provisioning supported • Available physical memory modified through BALLOONING • Disk space added/reduced through Virtual Block Devices • Ad-hoc adding/removing Virtual Interfaces for Network I/O • Hypervisor code backs up TLB flushes/updates • Guest OS are unique Domains with non-zero positive numbers • Domain zero has control interface • Simplified VM Migration, suspend, state saving operations
Advantages Drawbacks • Open source, free • Port available for Linux (2.4.x & 2.6.x), FreeBSD, NetBSD 5.x, Plan 9 and Windows XP • Near native performance • Highly scalable architecture • User friendly management console • Major Linux Distribution come with pre-compiled Xen kernels • Active support community • Guest OS code need to be modified • Only compatible with x86 • Software managed VM switches have handful overhead (would be eliminated through advanced processors)
Key Features • User space divided into secure CONTEXTS • Context 0 (root) – boot vserver kernel and manage other guests • Context 1 (spectator) – overview of all other process • Context > 1(guest) • Exploits standard Linux kernel features • Linux Capabilities: eg. CAP_SYS_MODULE • Resource Limits: eg. RLIMIT_CPU • File Attributes: eg. UNRM, SECRM (block reinitialization) • Vulnerabilities of chroot() addressed through barrier mechanism • Migration through Linux utilities: rsync, dump, restore
Advantages Drawbacks • Open source, free • Kernel available for Linux (2.4.x & 2.6.x) • Single OS image • Highly scalable • Insignificant overhead • Efficient context security mechanism • Simplified administration • Active support community • Only available for Linux • Inflexibility in Kernel configuration for guests
Virtualization in Practice • Web Hosting • High availability Application Server clustering • Redundant Database Server systems • Test/debug harnesses • Grid computing