Virtualization Part 2 – VMware. Virtualization 2 CS5204 – Operating Systems VMware: binary translation Hypervisor VMM Base Functionality (e.g. scheduling)

Slides:



Advertisements
Similar presentations
CS 443 Advanced OS Fabián E. Bustamante, Spring 2005 Memory Resource Management in VMware ESX Server Carl A. Waldspurger VMware, Inc. Appears in SOSDI.
Advertisements

Memory.
Virtualization Dr. Michael L. Collard
Operating Systems Lecture 10 Issues in Paging and Virtual Memory Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing.
Memory Resource Management in Vmware ESX Server Author: Carl A. Waldspurger Vmware, Inc. Present: Jun Tao.
Difference Engine: Harnessing Memory Redundancy in Virtual Machines by Diwaker Gupta et al. presented by Jonathan Berkhahn.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Lecture 13: Main Memory (Chapter 8)
XEN AND THE ART OF VIRTUALIZATION Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, lan Pratt, Andrew Warfield.
CSE 598B: Self-* Systems Memory Resource Management in VMware ESX Server by Carl A. Waldspurger Presented by: Arjun R. Nath (slide material adapted from.
Segmentation and Paging Considerations
CMPT 300: Final Review Chapters 8 – Memory Management: Ch. 8, 9 Address spaces Logical (virtual): generated by the CPU Physical: seen by the memory.
Paging and Virtual Memory. Memory management: Review  Fixed partitioning, dynamic partitioning  Problems Internal/external fragmentation A process can.
Network Implementation for Xen and KVM Class project for E : Network System Design and Implantation 12 Apr 2010 Kangkook Jee (kj2181)
Memory Management 2010.
1 Chapter 8 Virtual Memory Virtual memory is a storage allocation scheme in which secondary memory can be addressed as though it were part of main memory.
Computer Organization and Architecture
Virtual Machines. Virtualization Virtualization deals with “extending or replacing an existing interface so as to mimic the behavior of another system”
CIS 700 Machine Virtualization Autumn 2004.
Basics of Operating Systems March 4, 2001 Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard.
Introduction to Virtual Machines. Administration Presentation and class participation: 40% –Each student will present two and a half times this semester.
1 Virtualization – Part III VMware Ahmad Ibrahim.
Tanenbaum 8.3 See references
A Comparison of Software and Hardware Techniques for x86 Virtualization Keith Adams Ole Agesen Oct. 23, 2006.
Keith Adams, Ole Agesen 1st October 2009 Presented by Chwa Hoon Sung, Kang Joon Young A Comparison of Software and Hardware Techniques for x86 Virtualization.
Chapter 3 Memory Management: Virtual Memory
Microkernels, virtualization, exokernels Tutorial 1 – CSC469.
CS533 Concepts of Operating Systems Jonathan Walpole.
Virtualization The XEN Approach. Virtualization 2 CS5204 – Operating Systems XEN: paravirtualization References and Sources Paul Barham, et.al., “Xen.
Virtualization Concepts Presented by: Mariano Diaz.
Virtual Machine Monitors: Technology and Trends Jonathan Kaldor CS614 / F07.
Virtual Machine and its Role in Distributed Systems.
Embedded System Lab. 오명훈 Memory Resource Management in VMware ESX Server Carl A. Waldspurger VMware, Inc. Palo Alto, CA USA
Outline Basic VM Concepts Formal Definitions Virtualization Theorems
Our work on virtualization Chen Haogang, Wang Xiaolin {hchen, Institute of Network and Information Systems School of Electrical Engineering.
CS533 Concepts of Operating Systems Jonathan Walpole.
Chapter 9: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating Kernel.
Virtualization Part 2 – VMware Hardware Support. Virtualization 2 CS 5204 – Fall, 2008 VMware: binary translation Hypervisor VMM Base Functionality (e.g.
 Virtual machine systems: simulators for multiple copies of a machine on itself.  Virtual machine (VM): the simulated machine.  Virtual machine monitor.
1 Virtual Machine Memory Access Tracing With Hypervisor Exclusive Cache USENIX ‘07 Pin Lu & Kai Shen Department of Computer Science University of Rochester.
QEMU Binary Translation Ashish Kaila (akaila) Maneet Singh (maneets) 1.
CS 3204 Operating Systems Godmar Back Lecture 27.
VMWare MMU Ranjit Kolkar. Designed for efficient use of resources. ESX uses high-level resource management policies to compute a target memory allocation.
MEMORY RESOURCE MANAGEMENT IN VMWARE ESX SERVER 김정수
Swap Space and Other Memory Management Issues Operating Systems: Internals and Design Principles.
Full and Para Virtualization
Lecture 12 Virtualization Overview 1 Dec. 1, 2015 Prof. Kyu Ho Park “Understanding Full Virtualization, Paravirtualization, and Hardware Assist”, White.
1  2004 Morgan Kaufmann Publishers Chapter Seven Memory Hierarchy-3 by Patterson.
Operating-System Structures
CSE 451: Operating Systems Winter 2015 Module 25 Virtual Machine Monitors Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
NETW3005 Virtual Memory. Reading For this lecture, you should have read Chapter 9 (Sections 1-7). NETW3005 (Operating Systems) Lecture 08 - Virtual Memory2.
Memory Resource Management in VMware ESX Server By Carl A. Waldspurger Presented by Clyde Byrd III (some slides adapted from C. Waldspurger) EECS 582 –
Running Commodity Operating Systems on Scalable Multiprocessors Edouard Bugnion, Scott Devine and Mendel Rosenblum Presentation by Mark Smith.
Introduction to Virtualization
Virtualization.
CS 5204 Operating Systems Virtualization Godmar Back.
Memory Resource Management in VMware ESX Server
Presented by Mike Marty
CS 3214 Introduction to Computer Systems
CS 3214 Operating Systems Virtualization.
CS 3214 Operating Systems Virtualization Godmar Back.
Virtualization Dr. Michael L. Collard
Morgan Kaufmann Publishers
XenFS Sharing data in a virtualised environment
OS Virtualization.
Virtualization Layer Virtual Hardware Virtual Networking
Virtualization Techniques
Virtual Memory: Working Sets
Virtual Memory: Policies (Part II)
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
System Virtualization
Presentation transcript:

Virtualization Part 2 – VMware

Virtualization 2 CS5204 – Operating Systems VMware: binary translation Hypervisor VMM Base Functionality (e.g. scheduling) Enhanced Functionality References and Sources Carl Waldspurger, “Memory Resource Mangement in VMware ESX Server” Proceedings, 5 th Symposium on Operating Systems Design and Implementation, Boston, Massachusetts, December 9-11, 2002, 14 pages. Keith Adams, and Ole Agesen, “A Comparison of Software and Hardware Techniques for x86 Virtualization,” Proceedings, ASPLOS’06, San Jose, California, October 21, 2006, 12 pages.

Virtualization 3 CS5204 – Operating Systems Binary Translation Characteristics Binary – input is machine-level code Dynamic – occurs at runtime On demand – code translated when needed for execution System level – makes no assumption about guest code Subsetting – translates from full instruction set to safe subset Adaptive – adjust code based on guest behavior to achieve efficiency innocuous sensitive IDENT(ical) SIMULATE(d)

Virtualization 4 CS5204 – Operating Systems Binary Translation TU: translation unit (usually a basic block) CCF: compiled code fragment : continuation TU Binary Translator Translation Cache CCF PC[x][y] ([x], [y]) Hash Table execute Running time % translation Few cache hits Working set captured

Virtualization 5 CS5204 – Operating Systems Eliminating faults/traps Expensive traps/faults can be avoided Example: Pentium privileged instruction (rdtsc)  Trap-and-emulate: 2030 cycles  Callout-and-emulate: 1254 cycles  In-TC emulation: 216 cycles Process  Privileged instructions – eliminated by simple binary translation (BT)  Non-privileged instructions – eliminated by adaptive BT (a) detect a CCF containing an instruction that trap frequently (b) generate a new translation of the CCF to avoid the trap (perhaps inserting a call-out to an interpreter), and patch the original translation to execute the new translation

Virtualization 6 CS5204 – Operating Systems Memory resource management VMM (meta-level) memory management  Must identify both VM and pages within VM to replace  VMM replacement decisions may have unintended interactions with GuestOS page replacement policy  Worst-case scenario: double paging Strategies  “ballooning” – add memory demands on GuestOS so that the GuestOS decides which pages to replace Also used in Xen  Eliminating duplicate pages – even identical pages across different GuestOSs. VMM has sufficient perspective Clear savings when running numerous copies of same GuestOS  Allocation algorithm Balances memory utilization vs. performance isolation guarantees “taxes” idle memory

Virtualization 7 CS5204 – Operating Systems Ballooning “balloon” – module inserted into GuestOS as pseudo-device driver or kernel service Has no interface to GuestOS or applications Has a private channel for communication to VMM Polls VMM for current “balloon” size Balloon holds number of “pinned” page frames equal to its current size Inflating the balloon  Balloon requests additional “pinned” pages from GuestOS  Inflating the balloon causes GuestOS to select pages to be replaced using GuestOS page replacement policy  Balloon informs VMM of which physical page frames it has been allocated  VMM frees the machine page frames s corresponding to the physical page frames allocated to the balloon (thus freeing machine memory to allocate to other GuestOSs) Deflating the balloon  VMM reclaims machine page frames  VMM communicates to balloon  Balloon unpins/ frees physical page frames corresponding to new machine page frames  GuestOS uses its page replacement policy to page in needed pages

Virtualization 8 CS5204 – Operating Systems Content-based page sharing A hash table contains entries for shared pages already marked “copy-on-write” A key for a candidate page is generated from a hash value of the page’s contents A full comparison is made between the candidate page and a page with a matching key value Pages that match are shared – the page table entries for their VMMs point to the same machine page If no match is found, a “hint” frame is added to the hash table for possible future matches Writing to a shared page causes a page fault which causes a separate copy to be created for the writing GuestOS

Virtualization 9 CS5204 – Operating Systems Page sharing performance Identical Linux systems running same benchmark “best case” scenario Large fraction (67%) of memory sharable Considerable amount and percent of memory reclaimed Aggregate system throughput essentially unaffected

Virtualization 10 CS5204 – Operating Systems Measuring Cross-VM memory usage Each GuestOS is given a number of shares, S, against the total available machine memory. The shares-per-page represents the “price” that a GuestOS is willing to pay for a page of memory. The price is determined as follows: shares price page allocation fractional usage idle page cost The idle page cost is k = 1/(1-  ) where 0 ≤  < 1 is the “tax rate” that defaults to 0.75 The fractional usage, f, is determined by sampling (what fraction of 100 randomly selected pages are accesses in each 30 second period) and smoothing (using three different weights)

Virtualization 11 CS5204 – Operating Systems Memory tax experiment Initially, VM1 and VM2 converge to same memory allocation with  =0 (no idle memory tax) despite greater need for memory by VM2 When idle memory tax applied at default level (75%), VM1 relinquishes memory to VM2 which improves performance of VM2 by over 30% VM1: idles VM2: memory-intensive workload