SlideShare a Scribd company logo
Xen and the Art of Virtualization

Nikola Gvozdiev
Georgian Mihaila
Outline
Xen and the Art of Virtualization – Ian Pratt et al.
I.
II.
III.
IV.

The Art of Virtualization
Xen, goals and design
Xen evaluation
The future looks bright
Typical system components
Process
1

Process
2

Process
3

Process
4

Operating System

Hardware
3
Basic idea

Linux

Mac OS X

Windows XP

Virtualization layer
Hardware
4
Some definitions
• Host/guest: machine or software
• Domain: running VM + guest OS executes
• Hypervisor or Virtual Machine Monitor (VMM):
software or firmware that creates a virtual
machine on the host hardware

5
Why virtualize?
• More resources, subdivide for better use
• 1+ app(s)/OS/server:
# servers
sys admin complexity & time
• Scarce resources & unwilling cooperation:
resource containers & accountability

6
Some applications
• Resource optimization
• Infrastructure as a Service (IaaS)
• Application mobility/migration
• Containers/virus/worm (sandboxing)

7
Types of hardware virtualization
(software, memory, storage, data, network)

• Full virtualization (VMware)
– run OS/software unmodified
• Partial virtualization
– software may need modification to run
• Paravirtualization (Xen)
– software unmodified runs in modified OS as
separate system
8
Outline
Xen and the Art of Virtualization – Ian Pratt et al.
I.
II.
III.
IV.

The Art of Virtualization
Xen, goals and design
Xen evaluation
The future looks bright
Virtualization, at what cost?
•
•
•
•

Specialized hardware $
No commodity OS ♥
100% binary compatibility, speed
Speed
=> security ☠
or functionality

• Resource isolation/performance guarantees?
• So far, best effort provisioning => risk DoS
10
Xen goals
•
•
•
•
•

x86 architecture => $+=0
Commodity OS (Linux, BSD, XP) => ♥++
Share resources safely & in a managed fashion => ☠-- ♥++
No performance/functionality sacrifice => ♥++
Up to 100 VM instances on the same server => ?++

• (Free -GNU/GPL- => $--)

11
The Xen paper
Focus on the VMM design
• How to multiplex physical resources at the
granularity of an entire OS and provide
performance isolation between guest OSes?
Prototype
• Full Linux, partial Win XP, ongoing NetBSD port

12
The Virtual Machine Interface (VMI)

13
Typical System call
User
Program
Program
executing

OS Kernel

call read()

Program
blocked
Program
executing

Kernel
performing read
read() returns

14
Virtualizing CPU
OS is most privileged hypervisor
Ring 3

Ring 2
Ring 1

Ring 0

Applications

guest OS
Hypervisor

x86
15
Control transfer
Domain (guest OS)
- Hypercall interface (synchronous software trap)
Event
Hypercall

Xen (VMM)
- Event mechanism (asynchronous)

16
High level view
User
program

Return - resume

Sys call (set instructions)

User mode (low privilege)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Kernel mode (high privilege)

Kernel

Kernel
Translate sys call to procedure
call (set instructions)

Put data from registers
to where it is needed

CPU/Driver

Driver
*Loaded at boot time

Write device registers
to initiate I/O

17
High level view
User
program

Return - resume

Sys call (set instructions)

User mode (low privilege)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Kernel mode (high privilege)

Code
Kernel executing in Ring 0 silently fails
Kernel

Translate sys call to procedure
call (set instructions)

Put data from registers
to where it is needed

CPU/Driver

Driver
*Loaded at boot time

Write device registers
to initiate I/O

18
Exceptions
• Typical exceptions
– System calls: register ‘fast’ exception handler
(in Exception Vector Table) which is accessed
directly by the processor, without indirecting
via ring 0
– Page faults: code executing in ring 0 only can
read the faulting address from register CR2,
therefore faults are delivered via Xen

19
Virtualizing CPU cont’d
• CPU scheduling
– Borrowed Virtual Time (BVT) scheduling
algorithm

Work-conserving
Low-latency wake-up (dispatch)
Timers : real, virtual, wall-clock
20
Memory mapping (relocation) cont’d
0xFFFF FFFF

Shared Kernel Memory

1GB

0xC000 0000
0xBFFF FFFF

Process 1

Process 2

Process 3

Virtual Memory
Addresses

3GB

0x0000 0000

21
Virtualizing memory management
(cont’d)
• x86 architecture
– No software managed TLB (walk the page table structure
in hardware to recover misses) and no tags (flush TLB for
address space switch)
• Guest OSes are responsible for allocating and managing the
hardware page tables, minimizing Xen involvement
• Xen exists in a 64MB section at the top of every address
space, avoiding a TLB flush when entering and leaving the
hypervisor

22
Xen

I need a new
page table

Guest OS

Pool of
reserved
memory

23
Xen
Guest OS
I’ll get it
myself

Pool of
reserved
memory

24
Xen
Guest OS

Register

Pool of
reserved
memory

Xen

25
Xen
Guest OS

Read

Pool of
reserved
memory

Update

Xen

Write (batch, up to 8 MB)

26
Xen
Guest OS

Memory page flipped

Pool of
reserved
memory

Xen

• Reduce memory footprint
• Avoid copies

27
Virtualizing Device I/O
(disk, network interface)

• Xen exposes device abstractions
• I/O data is transferred to and from each domain via
Xen, using shared memory, asynchronous buffer
descriptor rings

28
Data Transfer : I/O Rings

29
Xen design

30
Outline
Xen and the Art of Virtualization – Ian Pratt et al.
I.
II.
III.
IV.

The Art of Virtualization
Xen, goals and design
Xen evaluation
The future looks bright
Cost of porting an OS

In both OSes, the architecture-specific sections
are effectively a port of the x86 code to their
paravirtualized architecture.

32
Evaluation
• Based on Linux 2.4.21 (neither XP nor NetBSD
fully functional)
• Thoroughly compared to 2 other systems
– VMware Workstation (binary translation)
– UML (run Linux as a Linux process)

• Performs better than solutions with restrictive
licenses (ESX Server)

33
Relative Performance
CPU-bound tasks
• Relatively easy for all VMMs
• Little interaction with the OS

Legend
L – Linux
X – XenoLinux
V – VMware
U – User-mode Linux
34
Relative Performance
Tasks with more I/O
• About 7% of the time spent
in OS doing I/O and memory
management
• This portion of time gets
expanded for each VMM
but to a different extent

35
Relative Performance

36
Microbenchmarks

• As expected fork, exec and sh require large number
of page updates which slow things down
• On the up side these can be batched (up to 8MB of
address space constructed per hypercall)
37
Microbenchmarks

• Hmmm …. no calls into XEN yet …

38
Microbenchmarks

• Overhead due to a hypercall when switching context
in a guest OS (in order to change base of page table)
• The larger the working set the smaller the relative
overhead
39
Microbenchmarks

• 2 transitions into XEN
– One for the page fault handler
– One to actually get the page
40
Microbenchmarks

• Page flipping really pays off – no unnecessary data
copying
• More overhead for smaller packets – we still need to
deal with every header
41
Concurrent VMs
• Unexpectedly low
SMP performance
for 1 instance of
Apache
• As expected
adding another
domain leads to a
sharp jump in
performance
under XEN
• More domains –
more overhead
42
Concurrent VMs
• Performance
differentiation
works as expected
with IR
• But fails with OLTP
• Probably due to
inefficiencies with
the disk
scheduling
algorithm
• Bands matter !!!

43
Isolation
SPEC
WEB99

OSDB-IR

Guest
OS

Guest
OS

Guest
OS

Hypervisor (XEN)

Hardware

Guest
OS

• Run uncooperative
user applications, see
if they bring down the
system
• 2 “bad” domains vs 2
“good” ones
• XEN delivers good
performance even in
this case
• What about an
uncooperative OS ?

44
Scalability

• Very low footprint per domain (4 - 6MB memory, 20KB
state)
• Benchmark is compute-bound and Linux assigns long time
slices, XEN needs some tweaking
• Even without it does pretty well (but no absolute values)
45
Criticism
• No comparison between fundamentally similar
techniques (e.g. the big IBM mainframe)
• Memory footprint almost not mentioned
• Most tests performed with limited number of
domains, while the paper’s main goal is to
demonstrate performance with 100 domains
• Benchmarks used relevant today ?

46
Outline
Xen and the Art of Virtualization – Ian Pratt et al.
I.
II.
III.
IV.

The Art of Virtualization
Xen, goals and design
Xen evaluation
The future looks bright
Related work
• Started by IBM in the 70s
• Resurgence lately (at time of publication) as
hardware got fast enough to run multiple OS
• Unlike in other solutions isolation/security is
“implicitly” enforced by the hypervisor
• One of the first attempts at paravirtualization the
other two are:
– IBM zSeries mainframes (Linux)
– Denali (quite a bit different)

48
Xen vs. Denali ?
Feature

Xen

Denali

# VM

100

1000

Target existing ABI

Yes

No (does not fully support x86
segmentation, used in Net BSD,
Linux, Windows XP)

Supports application multiplexing

Yes

No (1 app/OS)

Supports multiple address spaces

Yes

No (prototype virtual MMU
developed, helping Denali) => no
evaluation

Memory management support at the
virtualization layer

Yes

No (VMM performs all paging to
and from disk)

Performance isolation

Yes, each guest OS performs
own paging using guaranteed
memory reservation and disk
allocation

No, malicious VM can encourage
thrashing behavior

Virtualizes namespaces of all machine
resources

No (Secure access control
within hypervisor only)

Yes (resource isolation through
impossible naming)
49
Future work and impact
• Huge impact of the paper, sparked a lot of
interest, the project is still very much alive
• They did actually complete the XP port, but due
to licensing restrictions it never got published
• Currently only supports Windows as guest if the
hardware supports virtualization
• More recent versions of the project try to push
complexity away from the hypervisor
• However, paravirtualization nowadays is only
used if the hardware does not support
virtualization natively
50
Any questions?

More Related Content

What's hot

Paravirtualization
ParavirtualizationParavirtualization
Paravirtualization
Shahbaz Sidhu
 
Virtualization 101: Everything You Need To Know To Get Started With VMware
Virtualization 101: Everything You Need To Know To Get Started With VMwareVirtualization 101: Everything You Need To Know To Get Started With VMware
Virtualization 101: Everything You Need To Know To Get Started With VMware
Datapath Consulting
 
Microsoft Windows Server 2022 Overview
Microsoft Windows Server 2022 OverviewMicrosoft Windows Server 2022 Overview
Microsoft Windows Server 2022 Overview
David J Rosenthal
 
An Introduction To Server Virtualisation
An Introduction To Server VirtualisationAn Introduction To Server Virtualisation
An Introduction To Server Virtualisation
Alan McSweeney
 
Virtual machine
Virtual machineVirtual machine
Virtual machine
Rinaldo John
 
Red Hat Openshift on Microsoft Azure
Red Hat Openshift on Microsoft AzureRed Hat Openshift on Microsoft Azure
Red Hat Openshift on Microsoft Azure
John Archer
 
What is Virtualization
What is VirtualizationWhat is Virtualization
What is Virtualization
Dhrupesh Kotadiya
 
Storage Virtualization
Storage VirtualizationStorage Virtualization
Storage Virtualization
Mehul Jariwala
 
Virtualization
VirtualizationVirtualization
Virtualization
Shivam Singh
 
Virtualization basics
Virtualization basics Virtualization basics
Virtualization basics
Chandrani Ray Chowdhury
 
Xen Hypervisor
Xen HypervisorXen Hypervisor
Xen Hypervisor
Susheel Thakur
 
Virtualization
VirtualizationVirtualization
Virtualization
Birju Tank
 
VMware vSphere technical presentation
VMware vSphere technical presentationVMware vSphere technical presentation
VMware vSphere technical presentation
aleyeldean
 
The Nitro Project: Next-Generation EC2 Infrastructure - AWS Online Tech Talks
The Nitro Project: Next-Generation EC2 Infrastructure - AWS Online Tech TalksThe Nitro Project: Next-Generation EC2 Infrastructure - AWS Online Tech Talks
The Nitro Project: Next-Generation EC2 Infrastructure - AWS Online Tech Talks
Amazon Web Services
 
Advanced performance troubleshooting using esxtop
Advanced performance troubleshooting using esxtopAdvanced performance troubleshooting using esxtop
Advanced performance troubleshooting using esxtop
Alan Renouf
 
Virtual Machine
Virtual MachineVirtual Machine
Virtual Machine
Prakhar Maurya
 
VMware - Virtual SAN - IT Changes Everything
VMware - Virtual SAN - IT Changes EverythingVMware - Virtual SAN - IT Changes Everything
VMware - Virtual SAN - IT Changes Everything
VMUG IT
 
Virtualization.ppt
Virtualization.pptVirtualization.ppt
Virtualization.ppt
vishal choudhary
 
What is Virtualization
What is VirtualizationWhat is Virtualization
What is Virtualization
Israel Marcus
 
IBM Websphere concepts
IBM Websphere conceptsIBM Websphere concepts
IBM Websphere concepts
Kuldeep Saxena
 

What's hot (20)

Paravirtualization
ParavirtualizationParavirtualization
Paravirtualization
 
Virtualization 101: Everything You Need To Know To Get Started With VMware
Virtualization 101: Everything You Need To Know To Get Started With VMwareVirtualization 101: Everything You Need To Know To Get Started With VMware
Virtualization 101: Everything You Need To Know To Get Started With VMware
 
Microsoft Windows Server 2022 Overview
Microsoft Windows Server 2022 OverviewMicrosoft Windows Server 2022 Overview
Microsoft Windows Server 2022 Overview
 
An Introduction To Server Virtualisation
An Introduction To Server VirtualisationAn Introduction To Server Virtualisation
An Introduction To Server Virtualisation
 
Virtual machine
Virtual machineVirtual machine
Virtual machine
 
Red Hat Openshift on Microsoft Azure
Red Hat Openshift on Microsoft AzureRed Hat Openshift on Microsoft Azure
Red Hat Openshift on Microsoft Azure
 
What is Virtualization
What is VirtualizationWhat is Virtualization
What is Virtualization
 
Storage Virtualization
Storage VirtualizationStorage Virtualization
Storage Virtualization
 
Virtualization
VirtualizationVirtualization
Virtualization
 
Virtualization basics
Virtualization basics Virtualization basics
Virtualization basics
 
Xen Hypervisor
Xen HypervisorXen Hypervisor
Xen Hypervisor
 
Virtualization
VirtualizationVirtualization
Virtualization
 
VMware vSphere technical presentation
VMware vSphere technical presentationVMware vSphere technical presentation
VMware vSphere technical presentation
 
The Nitro Project: Next-Generation EC2 Infrastructure - AWS Online Tech Talks
The Nitro Project: Next-Generation EC2 Infrastructure - AWS Online Tech TalksThe Nitro Project: Next-Generation EC2 Infrastructure - AWS Online Tech Talks
The Nitro Project: Next-Generation EC2 Infrastructure - AWS Online Tech Talks
 
Advanced performance troubleshooting using esxtop
Advanced performance troubleshooting using esxtopAdvanced performance troubleshooting using esxtop
Advanced performance troubleshooting using esxtop
 
Virtual Machine
Virtual MachineVirtual Machine
Virtual Machine
 
VMware - Virtual SAN - IT Changes Everything
VMware - Virtual SAN - IT Changes EverythingVMware - Virtual SAN - IT Changes Everything
VMware - Virtual SAN - IT Changes Everything
 
Virtualization.ppt
Virtualization.pptVirtualization.ppt
Virtualization.ppt
 
What is Virtualization
What is VirtualizationWhat is Virtualization
What is Virtualization
 
IBM Websphere concepts
IBM Websphere conceptsIBM Websphere concepts
IBM Websphere concepts
 

Similar to Xen and the Art of Virtualization

17-virtualization.pptx
17-virtualization.pptx17-virtualization.pptx
17-virtualization.pptx
KowsalyaJayakumar2
 
Xen Euro Par07
Xen Euro Par07Xen Euro Par07
Xen Euro Par07
congvc
 
RHEL5 XEN HandOnTraining_v0.4.pdf
RHEL5 XEN HandOnTraining_v0.4.pdfRHEL5 XEN HandOnTraining_v0.4.pdf
RHEL5 XEN HandOnTraining_v0.4.pdf
Paul Yang
 
Oscon 2012 : From Datacenter to the Cloud - Featuring Xen and XCP
Oscon 2012 : From Datacenter to the Cloud - Featuring Xen and XCPOscon 2012 : From Datacenter to the Cloud - Featuring Xen and XCP
Oscon 2012 : From Datacenter to the Cloud - Featuring Xen and XCP
The Linux Foundation
 
Xen revisited
Xen revisitedXen revisited
Xen revisited
Shahbaz Sidhu
 
ClickOS_EE80777777777777777777777777777.pptx
ClickOS_EE80777777777777777777777777777.pptxClickOS_EE80777777777777777777777777777.pptx
ClickOS_EE80777777777777777777777777777.pptx
BiHongPhc
 
OSSEU18: NVDIMM and Virtualization - George Dunlap, Citrix
OSSEU18: NVDIMM and Virtualization  - George Dunlap, CitrixOSSEU18: NVDIMM and Virtualization  - George Dunlap, Citrix
OSSEU18: NVDIMM and Virtualization - George Dunlap, Citrix
The Linux Foundation
 
A Xen Case Study
A Xen Case StudyA Xen Case Study
A Xen Case Study
Kris Buytaert
 
Bridging the Semantic Gap in Virtualized Environment
Bridging the Semantic Gap in Virtualized EnvironmentBridging the Semantic Gap in Virtualized Environment
Bridging the Semantic Gap in Virtualized Environment
Andy Lee
 
Windows ce
Windows ceWindows ce
Windows ce
SyedAhamed44
 
XPDDS18: NVDIMM Overview - George Dunlap, Citrix
XPDDS18: NVDIMM Overview - George Dunlap, Citrix XPDDS18: NVDIMM Overview - George Dunlap, Citrix
XPDDS18: NVDIMM Overview - George Dunlap, Citrix
The Linux Foundation
 
Vmwareperformancetroubleshooting 100224104321-phpapp02 (1)
Vmwareperformancetroubleshooting 100224104321-phpapp02 (1)Vmwareperformancetroubleshooting 100224104321-phpapp02 (1)
Vmwareperformancetroubleshooting 100224104321-phpapp02 (1)
Suresh Kumar
 
Vmwareperformancetroubleshooting 100224104321-phpapp02
Vmwareperformancetroubleshooting 100224104321-phpapp02Vmwareperformancetroubleshooting 100224104321-phpapp02
Vmwareperformancetroubleshooting 100224104321-phpapp02
Suresh Kumar
 
Thread
ThreadThread
5. IO virtualization
5. IO virtualization5. IO virtualization
5. IO virtualization
Hwanju Kim
 
Clusters (Distributed computing)
Clusters (Distributed computing)Clusters (Distributed computing)
Clusters (Distributed computing)
Sri Prasanna
 
Noah - Robust and Flexible Operating System Compatibility Architecture - Cont...
Noah - Robust and Flexible Operating System Compatibility Architecture - Cont...Noah - Robust and Flexible Operating System Compatibility Architecture - Cont...
Noah - Robust and Flexible Operating System Compatibility Architecture - Cont...
Takaya Saeki
 
Io sy.stemppt
Io sy.stempptIo sy.stemppt
Io sy.stemppt
muthumani mahesh
 
Current and Future of Non-Volatile Memory on Linux
Current and Future of Non-Volatile Memory on LinuxCurrent and Future of Non-Volatile Memory on Linux
Current and Future of Non-Volatile Memory on Linux
mountpoint.io
 
Virtual Machine Performance
Virtual Machine PerformanceVirtual Machine Performance
Virtual Machine Performance
Qian Lin
 

Similar to Xen and the Art of Virtualization (20)

17-virtualization.pptx
17-virtualization.pptx17-virtualization.pptx
17-virtualization.pptx
 
Xen Euro Par07
Xen Euro Par07Xen Euro Par07
Xen Euro Par07
 
RHEL5 XEN HandOnTraining_v0.4.pdf
RHEL5 XEN HandOnTraining_v0.4.pdfRHEL5 XEN HandOnTraining_v0.4.pdf
RHEL5 XEN HandOnTraining_v0.4.pdf
 
Oscon 2012 : From Datacenter to the Cloud - Featuring Xen and XCP
Oscon 2012 : From Datacenter to the Cloud - Featuring Xen and XCPOscon 2012 : From Datacenter to the Cloud - Featuring Xen and XCP
Oscon 2012 : From Datacenter to the Cloud - Featuring Xen and XCP
 
Xen revisited
Xen revisitedXen revisited
Xen revisited
 
ClickOS_EE80777777777777777777777777777.pptx
ClickOS_EE80777777777777777777777777777.pptxClickOS_EE80777777777777777777777777777.pptx
ClickOS_EE80777777777777777777777777777.pptx
 
OSSEU18: NVDIMM and Virtualization - George Dunlap, Citrix
OSSEU18: NVDIMM and Virtualization  - George Dunlap, CitrixOSSEU18: NVDIMM and Virtualization  - George Dunlap, Citrix
OSSEU18: NVDIMM and Virtualization - George Dunlap, Citrix
 
A Xen Case Study
A Xen Case StudyA Xen Case Study
A Xen Case Study
 
Bridging the Semantic Gap in Virtualized Environment
Bridging the Semantic Gap in Virtualized EnvironmentBridging the Semantic Gap in Virtualized Environment
Bridging the Semantic Gap in Virtualized Environment
 
Windows ce
Windows ceWindows ce
Windows ce
 
XPDDS18: NVDIMM Overview - George Dunlap, Citrix
XPDDS18: NVDIMM Overview - George Dunlap, Citrix XPDDS18: NVDIMM Overview - George Dunlap, Citrix
XPDDS18: NVDIMM Overview - George Dunlap, Citrix
 
Vmwareperformancetroubleshooting 100224104321-phpapp02 (1)
Vmwareperformancetroubleshooting 100224104321-phpapp02 (1)Vmwareperformancetroubleshooting 100224104321-phpapp02 (1)
Vmwareperformancetroubleshooting 100224104321-phpapp02 (1)
 
Vmwareperformancetroubleshooting 100224104321-phpapp02
Vmwareperformancetroubleshooting 100224104321-phpapp02Vmwareperformancetroubleshooting 100224104321-phpapp02
Vmwareperformancetroubleshooting 100224104321-phpapp02
 
Thread
ThreadThread
Thread
 
5. IO virtualization
5. IO virtualization5. IO virtualization
5. IO virtualization
 
Clusters (Distributed computing)
Clusters (Distributed computing)Clusters (Distributed computing)
Clusters (Distributed computing)
 
Noah - Robust and Flexible Operating System Compatibility Architecture - Cont...
Noah - Robust and Flexible Operating System Compatibility Architecture - Cont...Noah - Robust and Flexible Operating System Compatibility Architecture - Cont...
Noah - Robust and Flexible Operating System Compatibility Architecture - Cont...
 
Io sy.stemppt
Io sy.stempptIo sy.stemppt
Io sy.stemppt
 
Current and Future of Non-Volatile Memory on Linux
Current and Future of Non-Volatile Memory on LinuxCurrent and Future of Non-Volatile Memory on Linux
Current and Future of Non-Volatile Memory on Linux
 
Virtual Machine Performance
Virtual Machine PerformanceVirtual Machine Performance
Virtual Machine Performance
 

More from Susheel Thakur

A Study on Energy Efficient Server Consolidation Heuristics for Virtualized C...
A Study on Energy Efficient Server Consolidation Heuristics for Virtualized C...A Study on Energy Efficient Server Consolidation Heuristics for Virtualized C...
A Study on Energy Efficient Server Consolidation Heuristics for Virtualized C...
Susheel Thakur
 
Server Consolidation Algorithms for Virtualized Cloud Environment: A Performa...
Server Consolidation Algorithms for Virtualized Cloud Environment: A Performa...Server Consolidation Algorithms for Virtualized Cloud Environment: A Performa...
Server Consolidation Algorithms for Virtualized Cloud Environment: A Performa...
Susheel Thakur
 
Performance Evaluation of Server Consolidation Algorithms in Virtualized Clo...
Performance Evaluation of Server Consolidation Algorithms  in Virtualized Clo...Performance Evaluation of Server Consolidation Algorithms  in Virtualized Clo...
Performance Evaluation of Server Consolidation Algorithms in Virtualized Clo...
Susheel Thakur
 
Performance Analysis of Server Consolidation Algorithms in Virtualized Cloud...
Performance Analysis of Server Consolidation Algorithms in  Virtualized Cloud...Performance Analysis of Server Consolidation Algorithms in  Virtualized Cloud...
Performance Analysis of Server Consolidation Algorithms in Virtualized Cloud...
Susheel Thakur
 
Xen Cloud Platform Installation Guide
Xen Cloud Platform Installation GuideXen Cloud Platform Installation Guide
Xen Cloud Platform Installation Guide
Susheel Thakur
 
Srs for virtual eucation
Srs for virtual eucationSrs for virtual eucation
Srs for virtual eucation
Susheel Thakur
 
Trees
TreesTrees
SERVER COSOLIDATION ALGORITHMS FOR CLOUD COMPUTING: A REVIEW
SERVER COSOLIDATION ALGORITHMS FOR CLOUD COMPUTING: A REVIEWSERVER COSOLIDATION ALGORITHMS FOR CLOUD COMPUTING: A REVIEW
SERVER COSOLIDATION ALGORITHMS FOR CLOUD COMPUTING: A REVIEW
Susheel Thakur
 
Line drawing algorithms
Line drawing algorithmsLine drawing algorithms
Line drawing algorithms
Susheel Thakur
 

More from Susheel Thakur (9)

A Study on Energy Efficient Server Consolidation Heuristics for Virtualized C...
A Study on Energy Efficient Server Consolidation Heuristics for Virtualized C...A Study on Energy Efficient Server Consolidation Heuristics for Virtualized C...
A Study on Energy Efficient Server Consolidation Heuristics for Virtualized C...
 
Server Consolidation Algorithms for Virtualized Cloud Environment: A Performa...
Server Consolidation Algorithms for Virtualized Cloud Environment: A Performa...Server Consolidation Algorithms for Virtualized Cloud Environment: A Performa...
Server Consolidation Algorithms for Virtualized Cloud Environment: A Performa...
 
Performance Evaluation of Server Consolidation Algorithms in Virtualized Clo...
Performance Evaluation of Server Consolidation Algorithms  in Virtualized Clo...Performance Evaluation of Server Consolidation Algorithms  in Virtualized Clo...
Performance Evaluation of Server Consolidation Algorithms in Virtualized Clo...
 
Performance Analysis of Server Consolidation Algorithms in Virtualized Cloud...
Performance Analysis of Server Consolidation Algorithms in  Virtualized Cloud...Performance Analysis of Server Consolidation Algorithms in  Virtualized Cloud...
Performance Analysis of Server Consolidation Algorithms in Virtualized Cloud...
 
Xen Cloud Platform Installation Guide
Xen Cloud Platform Installation GuideXen Cloud Platform Installation Guide
Xen Cloud Platform Installation Guide
 
Srs for virtual eucation
Srs for virtual eucationSrs for virtual eucation
Srs for virtual eucation
 
Trees
TreesTrees
Trees
 
SERVER COSOLIDATION ALGORITHMS FOR CLOUD COMPUTING: A REVIEW
SERVER COSOLIDATION ALGORITHMS FOR CLOUD COMPUTING: A REVIEWSERVER COSOLIDATION ALGORITHMS FOR CLOUD COMPUTING: A REVIEW
SERVER COSOLIDATION ALGORITHMS FOR CLOUD COMPUTING: A REVIEW
 
Line drawing algorithms
Line drawing algorithmsLine drawing algorithms
Line drawing algorithms
 

Recently uploaded

Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Precisely
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
Intelisync
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
Shinana2
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 

Recently uploaded (20)

Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 

Xen and the Art of Virtualization

  • 1. Xen and the Art of Virtualization Nikola Gvozdiev Georgian Mihaila
  • 2. Outline Xen and the Art of Virtualization – Ian Pratt et al. I. II. III. IV. The Art of Virtualization Xen, goals and design Xen evaluation The future looks bright
  • 4. Basic idea Linux Mac OS X Windows XP Virtualization layer Hardware 4
  • 5. Some definitions • Host/guest: machine or software • Domain: running VM + guest OS executes • Hypervisor or Virtual Machine Monitor (VMM): software or firmware that creates a virtual machine on the host hardware 5
  • 6. Why virtualize? • More resources, subdivide for better use • 1+ app(s)/OS/server: # servers sys admin complexity & time • Scarce resources & unwilling cooperation: resource containers & accountability 6
  • 7. Some applications • Resource optimization • Infrastructure as a Service (IaaS) • Application mobility/migration • Containers/virus/worm (sandboxing) 7
  • 8. Types of hardware virtualization (software, memory, storage, data, network) • Full virtualization (VMware) – run OS/software unmodified • Partial virtualization – software may need modification to run • Paravirtualization (Xen) – software unmodified runs in modified OS as separate system 8
  • 9. Outline Xen and the Art of Virtualization – Ian Pratt et al. I. II. III. IV. The Art of Virtualization Xen, goals and design Xen evaluation The future looks bright
  • 10. Virtualization, at what cost? • • • • Specialized hardware $ No commodity OS ♥ 100% binary compatibility, speed Speed => security ☠ or functionality • Resource isolation/performance guarantees? • So far, best effort provisioning => risk DoS 10
  • 11. Xen goals • • • • • x86 architecture => $+=0 Commodity OS (Linux, BSD, XP) => ♥++ Share resources safely & in a managed fashion => ☠-- ♥++ No performance/functionality sacrifice => ♥++ Up to 100 VM instances on the same server => ?++ • (Free -GNU/GPL- => $--) 11
  • 12. The Xen paper Focus on the VMM design • How to multiplex physical resources at the granularity of an entire OS and provide performance isolation between guest OSes? Prototype • Full Linux, partial Win XP, ongoing NetBSD port 12
  • 13. The Virtual Machine Interface (VMI) 13
  • 14. Typical System call User Program Program executing OS Kernel call read() Program blocked Program executing Kernel performing read read() returns 14
  • 15. Virtualizing CPU OS is most privileged hypervisor Ring 3 Ring 2 Ring 1 Ring 0 Applications guest OS Hypervisor x86 15
  • 16. Control transfer Domain (guest OS) - Hypercall interface (synchronous software trap) Event Hypercall Xen (VMM) - Event mechanism (asynchronous) 16
  • 17. High level view User program Return - resume Sys call (set instructions) User mode (low privilege) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Kernel mode (high privilege) Kernel Kernel Translate sys call to procedure call (set instructions) Put data from registers to where it is needed CPU/Driver Driver *Loaded at boot time Write device registers to initiate I/O 17
  • 18. High level view User program Return - resume Sys call (set instructions) User mode (low privilege) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Kernel mode (high privilege) Code Kernel executing in Ring 0 silently fails Kernel Translate sys call to procedure call (set instructions) Put data from registers to where it is needed CPU/Driver Driver *Loaded at boot time Write device registers to initiate I/O 18
  • 19. Exceptions • Typical exceptions – System calls: register ‘fast’ exception handler (in Exception Vector Table) which is accessed directly by the processor, without indirecting via ring 0 – Page faults: code executing in ring 0 only can read the faulting address from register CR2, therefore faults are delivered via Xen 19
  • 20. Virtualizing CPU cont’d • CPU scheduling – Borrowed Virtual Time (BVT) scheduling algorithm Work-conserving Low-latency wake-up (dispatch) Timers : real, virtual, wall-clock 20
  • 21. Memory mapping (relocation) cont’d 0xFFFF FFFF Shared Kernel Memory 1GB 0xC000 0000 0xBFFF FFFF Process 1 Process 2 Process 3 Virtual Memory Addresses 3GB 0x0000 0000 21
  • 22. Virtualizing memory management (cont’d) • x86 architecture – No software managed TLB (walk the page table structure in hardware to recover misses) and no tags (flush TLB for address space switch) • Guest OSes are responsible for allocating and managing the hardware page tables, minimizing Xen involvement • Xen exists in a 64MB section at the top of every address space, avoiding a TLB flush when entering and leaving the hypervisor 22
  • 23. Xen I need a new page table Guest OS Pool of reserved memory 23
  • 24. Xen Guest OS I’ll get it myself Pool of reserved memory 24
  • 27. Xen Guest OS Memory page flipped Pool of reserved memory Xen • Reduce memory footprint • Avoid copies 27
  • 28. Virtualizing Device I/O (disk, network interface) • Xen exposes device abstractions • I/O data is transferred to and from each domain via Xen, using shared memory, asynchronous buffer descriptor rings 28
  • 29. Data Transfer : I/O Rings 29
  • 31. Outline Xen and the Art of Virtualization – Ian Pratt et al. I. II. III. IV. The Art of Virtualization Xen, goals and design Xen evaluation The future looks bright
  • 32. Cost of porting an OS In both OSes, the architecture-specific sections are effectively a port of the x86 code to their paravirtualized architecture. 32
  • 33. Evaluation • Based on Linux 2.4.21 (neither XP nor NetBSD fully functional) • Thoroughly compared to 2 other systems – VMware Workstation (binary translation) – UML (run Linux as a Linux process) • Performs better than solutions with restrictive licenses (ESX Server) 33
  • 34. Relative Performance CPU-bound tasks • Relatively easy for all VMMs • Little interaction with the OS Legend L – Linux X – XenoLinux V – VMware U – User-mode Linux 34
  • 35. Relative Performance Tasks with more I/O • About 7% of the time spent in OS doing I/O and memory management • This portion of time gets expanded for each VMM but to a different extent 35
  • 37. Microbenchmarks • As expected fork, exec and sh require large number of page updates which slow things down • On the up side these can be batched (up to 8MB of address space constructed per hypercall) 37
  • 38. Microbenchmarks • Hmmm …. no calls into XEN yet … 38
  • 39. Microbenchmarks • Overhead due to a hypercall when switching context in a guest OS (in order to change base of page table) • The larger the working set the smaller the relative overhead 39
  • 40. Microbenchmarks • 2 transitions into XEN – One for the page fault handler – One to actually get the page 40
  • 41. Microbenchmarks • Page flipping really pays off – no unnecessary data copying • More overhead for smaller packets – we still need to deal with every header 41
  • 42. Concurrent VMs • Unexpectedly low SMP performance for 1 instance of Apache • As expected adding another domain leads to a sharp jump in performance under XEN • More domains – more overhead 42
  • 43. Concurrent VMs • Performance differentiation works as expected with IR • But fails with OLTP • Probably due to inefficiencies with the disk scheduling algorithm • Bands matter !!! 43
  • 44. Isolation SPEC WEB99 OSDB-IR Guest OS Guest OS Guest OS Hypervisor (XEN) Hardware Guest OS • Run uncooperative user applications, see if they bring down the system • 2 “bad” domains vs 2 “good” ones • XEN delivers good performance even in this case • What about an uncooperative OS ? 44
  • 45. Scalability • Very low footprint per domain (4 - 6MB memory, 20KB state) • Benchmark is compute-bound and Linux assigns long time slices, XEN needs some tweaking • Even without it does pretty well (but no absolute values) 45
  • 46. Criticism • No comparison between fundamentally similar techniques (e.g. the big IBM mainframe) • Memory footprint almost not mentioned • Most tests performed with limited number of domains, while the paper’s main goal is to demonstrate performance with 100 domains • Benchmarks used relevant today ? 46
  • 47. Outline Xen and the Art of Virtualization – Ian Pratt et al. I. II. III. IV. The Art of Virtualization Xen, goals and design Xen evaluation The future looks bright
  • 48. Related work • Started by IBM in the 70s • Resurgence lately (at time of publication) as hardware got fast enough to run multiple OS • Unlike in other solutions isolation/security is “implicitly” enforced by the hypervisor • One of the first attempts at paravirtualization the other two are: – IBM zSeries mainframes (Linux) – Denali (quite a bit different) 48
  • 49. Xen vs. Denali ? Feature Xen Denali # VM 100 1000 Target existing ABI Yes No (does not fully support x86 segmentation, used in Net BSD, Linux, Windows XP) Supports application multiplexing Yes No (1 app/OS) Supports multiple address spaces Yes No (prototype virtual MMU developed, helping Denali) => no evaluation Memory management support at the virtualization layer Yes No (VMM performs all paging to and from disk) Performance isolation Yes, each guest OS performs own paging using guaranteed memory reservation and disk allocation No, malicious VM can encourage thrashing behavior Virtualizes namespaces of all machine resources No (Secure access control within hypervisor only) Yes (resource isolation through impossible naming) 49
  • 50. Future work and impact • Huge impact of the paper, sparked a lot of interest, the project is still very much alive • They did actually complete the XP port, but due to licensing restrictions it never got published • Currently only supports Windows as guest if the hardware supports virtualization • More recent versions of the project try to push complexity away from the hypervisor • However, paravirtualization nowadays is only used if the hardware does not support virtualization natively 50