Lecture20 15319 MHH
Lecture20 15319 MHH
CS 15-319
Virtualization Case Studies : Xen and VMware
Lecture 20
1
Today…
Last session
Resource Virtualization
Today’s session
Virtualization Case Studies
2
Virtualization Case Studies
In this lecture, we shall explore popular virtualization environments
Ubuntu Windows
RHEL Fedora
10.04 7
Hardware Hardware
Case Study: Xen
Xen
Xen is a virtual machine monitor that provides services to allow
multiple computer operating systems to execute on the same
hardware simultaneously.
Design Goal: Keep the hypervisor layer as small and as simple as possible.
Management tools, device drivers etc. run in a privileged VM
This enhances security, resource isolation
Levels of Protection in x86 and Xen
Intel’s x86 architecture provides levels of privilege for code
executing on the processor
Xen
Operating System
Guest Operating
Not used Systems
Not used
Not used
0 User Applications
User Applications
1
x86 “Rings” 2 Xen
3
Privilege Levels
Basics of Xen
Xen hypervisor runs on hardware
“Classic” system VM
The hypervisor is a thin layer with minimal
functionality
Xen
Hardware
Credit Scheduler
Proportional fair-share algorithm
Users can assign a weight and a cap for each VM, this influences the scheduling decision and affects the
CPU scheduling priority of VMs
Assigns credits for all VMs running on the host and debits credits from VMs periodically for each running
vCPU.
VM 1 VM 2
vCPU 1 vCPU 2 vCPU 3 vCPU 4 vCPU 5
Credit Scheduler (contd.)
vCPU priority is calculated based on the credits remaining for each vCPU and is
refreshed periodically.
Positive credit VMs are given status of OVER and negative credit vCPUs are given
status of UNDER.
VM 1 VM 2
vCPU 1 vCPU 2 vCPU 3 vCPU 4 vCPU 5
Case Study: VMWare
VMWare Products
VMWare has two types of Products:
Hosted VMMs
VMWare Workstation, VMWare GSX, VMWare Player, VMWare Fusion etc.
Guest
Applications
Guest OS
Host Applications
User Mode Virtual Hardware
VMApp
VMDriver
Priviliaged
Host OS VMMonitor
Mode
Hardware
VMware Bare Metal Architecture
VMware’s ESX/ESXi are system virtual
machines
Also known as “bare-metal” hypervisors.
Source: http://www.vmware.com/pdf/esx2_performance_implications.pdf
Processor Virtualization in VMware
VMWare uses dynamic binary translation
Allows code to run on the hardware at near-native speeds.
Except for privileged instructions such as traps, interrupts etc.
Guest OSes tend to utilize all the memory that is available to them.
It’s difficult to over-commit memory resources efficiently if the Guest OS does not release
memory resources from time to time.
In addition, the hypervisor can redirect the I/O request through the native OS drivers, this
allows the hypervisor to support more devices (but with reduced performance)