SlideShare a Scribd company logo
1 of 25
Xen and the Art of
Virtualization
By
SATHISHKUMAR G
(sathishsak111@gmail.com)
Introduction
 Challenges to build virtual machines
 Performance isolation
 Scheduling priority
 Memory demand
 Network traffic
 Disk accesses
 Support for various OS platforms
 Small performance overhead
Xen
 Multiplexes resources at the granularity of an
entire OS
 As opposed to process-level multiplexing
 Price: higher overhead
 Target: 100 virtual OSes per machine
Xen: Approach and Overview
 Conventional approach
 Full virtualization
 Cannot access the hardware
 Problematic for certain privileged instructions (e.g.,
traps)
 No real-time guarantees
Xen: Approach and Overview
 Xen: paravirtualization
 Provides some exposures to the underlying HW
 Better performance
 Need modifications to the OS
 No modifications to applications
Memory Management
 Depending on the hardware supports
 Software managed TLB
 Associate address space IDs with TLB tags
 Allow coexistence of OSes
 Avoid TLB flushing across OS boundaries
Memory Management
 X86 does not have software managed TLB
 Xen exists at the top 64MB of every address
space
 Avoid TLB flushing when an guest OS enter/exist
Xen
 Each OS can only map to memory it owns
 Writes are validated by Xen
CPU
 X86 supports 4 levels of privileges
 0 for OS, and 3 for applications
 Xen downgrades the privilege of OSes
 System-call and page-fault handlers registered to
Xen
 “fast handlers” for most exceptions, Xen isn’t
involved
Device I/O
 Xen exposes a set of simple device
abstractions
The Cost of Porting an OS to Xen
 Privileged instructions
 Page table access
 Network driver
 Block device driver
 <2% of code-base
Control Management
 Separation of policy and mechanism
 Domain0 hosts the application-level
management software
 Creation and deletion
of virtual network
interfaces and block
devices
Control Transfer: Hypercalls and
Events
 Hypercall: synchronous calls from a domain
to Xen
 Analogous to system calls
 Events: asynchronous notifications from Xen
to domains
 Replace device interrupts
Data Transfer: I/O Rings
 Zero-copy semantics
CPU Scheduling
 Borrowed virtual time scheduling
 Allows temporary violations of fair sharing to
favor recently-woken domains
 Goal: reduce wake-up latency
Time and Timers
 Xen provides each guest OS with
 Real time (since machine boot)
 Virtual time (time spent for execution)
 Wall-clock time
 Each guest OS can program a pair of alarm
timers
 Real time
 Virtual time
Virtual Address Translation
 No shadow pages (VMWare)
 Xen provides constrained but direct MMU
updates
 All guest OSes have read-only accesses to
page tables
 Updates are batched into a single hypercall
Physical Memory
 Reserved at domain creation times
 Memory statically partitioned among domains
Network
 Virtual firewall-router attached to all domains
 Round-robin packet scheduler
 To send a packet, enqueue a buffer descriptor
into the transmit rang
 Use scatter-gather DMA (no packet copying)
 A domain needs to exchange page frame to avoid
copying
 Page-aligned buffering
Disk
 Only Domain0 has direct access to disks
 Other domains need to use virtual block
devices
 Use the I/O ring
 Reorder requests prior to enqueuing them on the
ring
 If permitted, Xen will also reorder requests to
improve performance
 Use DMA (zero copy)
Evaluation
 Dell 2650 dual processor
 2.4 GHz Xeon server
 2GB RAM
 3 Gb Ethernet NIC
 1 Hitachi DK32eJ 146 GB 10k RPM SCSI
disk
 Linux 2.4.21 (native)
Relative Performance
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Linux Xen VMWare UML
SPEC INT2000 score
CPU Intensive
Little I/O and OS interaction
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Linux Xen VMWare UML
SPEC WEB99
180Mb/s TCP traffic
Disk read-write on 2GB dataset
Concurrent Virtual Machines
Multiple Apache
processes in Linux
vs.
One Apache process in
each guest OS
Performance Isolation
 4 Domains
 2 running benchmarks
 1 running dd
 1 running a fork bomb in the background
 2 antisocial domains contributed only 4%
performance degradation
Scalability
Thank you

More Related Content

What's hot

Understand oracle real application cluster
Understand oracle real application clusterUnderstand oracle real application cluster
Understand oracle real application cluster
Satishbabu Gunukula
 
Firefox operating system
Firefox operating systemFirefox operating system
Firefox operating system
Nishant Mehare
 

What's hot (20)

From printk to QEMU: Xen/Linux Kernel debugging
From printk to QEMU: Xen/Linux Kernel debuggingFrom printk to QEMU: Xen/Linux Kernel debugging
From printk to QEMU: Xen/Linux Kernel debugging
 
Android OTA updates
Android OTA updatesAndroid OTA updates
Android OTA updates
 
Android Security Internals
Android Security InternalsAndroid Security Internals
Android Security Internals
 
Oracle AHF Insights 23c
Oracle AHF Insights 23cOracle AHF Insights 23c
Oracle AHF Insights 23c
 
Unix vs Linux | Difference Between Unix & Linux | Edureka
Unix vs Linux | Difference Between Unix & Linux | EdurekaUnix vs Linux | Difference Between Unix & Linux | Edureka
Unix vs Linux | Difference Between Unix & Linux | Edureka
 
Operating Systems
Operating SystemsOperating Systems
Operating Systems
 
UKOUG Techfest 2019 Central user Administration of Oracle Databases
UKOUG Techfest 2019 Central user Administration of Oracle DatabasesUKOUG Techfest 2019 Central user Administration of Oracle Databases
UKOUG Techfest 2019 Central user Administration of Oracle Databases
 
Google chrome OS
Google chrome OSGoogle chrome OS
Google chrome OS
 
Linux kernel Architecture and Properties
Linux kernel Architecture and PropertiesLinux kernel Architecture and Properties
Linux kernel Architecture and Properties
 
Three Optimization Tips for C++
Three Optimization Tips for C++Three Optimization Tips for C++
Three Optimization Tips for C++
 
Linux Memory Management with CMA (Contiguous Memory Allocator)
Linux Memory Management with CMA (Contiguous Memory Allocator)Linux Memory Management with CMA (Contiguous Memory Allocator)
Linux Memory Management with CMA (Contiguous Memory Allocator)
 
Linux OS presentation
Linux OS presentationLinux OS presentation
Linux OS presentation
 
Standard Edition High Availability (SEHA) - The Why, What & How
Standard Edition High Availability (SEHA) - The Why, What & HowStandard Edition High Availability (SEHA) - The Why, What & How
Standard Edition High Availability (SEHA) - The Why, What & How
 
Trusted firmware deep_dive_v1.0_
Trusted firmware deep_dive_v1.0_Trusted firmware deep_dive_v1.0_
Trusted firmware deep_dive_v1.0_
 
Firefox os ppt
Firefox os pptFirefox os ppt
Firefox os ppt
 
Understand oracle real application cluster
Understand oracle real application clusterUnderstand oracle real application cluster
Understand oracle real application cluster
 
Linux kernel architecture
Linux kernel architectureLinux kernel architecture
Linux kernel architecture
 
Process management- This ppt contains all required information regarding oper...
Process management- This ppt contains all required information regarding oper...Process management- This ppt contains all required information regarding oper...
Process management- This ppt contains all required information regarding oper...
 
2022 March Patch Tuesday
2022 March Patch Tuesday2022 March Patch Tuesday
2022 March Patch Tuesday
 
Firefox operating system
Firefox operating systemFirefox operating system
Firefox operating system
 

Similar to Xen and the Art of Virtualization

Xen Euro Par07
Xen Euro Par07Xen Euro Par07
Xen Euro Par07
congvc
 
Clusters (Distributed computing)
Clusters (Distributed computing)Clusters (Distributed computing)
Clusters (Distributed computing)
Sri Prasanna
 
Xen and the Art of Virtualization
Xen and the Art of VirtualizationXen and the Art of Virtualization
Xen and the Art of Virtualization
Susheel Thakur
 
Multi site Clustering with Windows Server 2008 Enterprise
Multi site Clustering with Windows Server 2008 EnterpriseMulti site Clustering with Windows Server 2008 Enterprise
Multi site Clustering with Windows Server 2008 Enterprise
Paulo Freitas
 
Virtual Pc Seminar
Virtual Pc SeminarVirtual Pc Seminar
Virtual Pc Seminar
guest5b5549
 
Rootconf nilesh2012
Rootconf nilesh2012Rootconf nilesh2012
Rootconf nilesh2012
nilesh_b
 
VMware Performance Troubleshooting
VMware Performance TroubleshootingVMware Performance Troubleshooting
VMware Performance Troubleshooting
glbsolutions
 

Similar to Xen and the Art of Virtualization (20)

Xen & the Art of Virtualization
Xen & the Art of VirtualizationXen & the Art of Virtualization
Xen & the Art of Virtualization
 
Xen Euro Par07
Xen Euro Par07Xen Euro Par07
Xen Euro Par07
 
Xen Hypervisor
Xen HypervisorXen Hypervisor
Xen Hypervisor
 
Xen & virtualization
Xen & virtualizationXen & virtualization
Xen & virtualization
 
Clusters (Distributed computing)
Clusters (Distributed computing)Clusters (Distributed computing)
Clusters (Distributed computing)
 
Xen and the Art of Virtualization
Xen and the Art of VirtualizationXen and the Art of Virtualization
Xen and the Art of Virtualization
 
Multi site Clustering with Windows Server 2008 Enterprise
Multi site Clustering with Windows Server 2008 EnterpriseMulti site Clustering with Windows Server 2008 Enterprise
Multi site Clustering with Windows Server 2008 Enterprise
 
More on Virtualization 3.pptx
More on Virtualization 3.pptxMore on Virtualization 3.pptx
More on Virtualization 3.pptx
 
Sql saturday dc vm ware
Sql saturday dc vm wareSql saturday dc vm ware
Sql saturday dc vm ware
 
Virtual Pc Seminar
Virtual Pc SeminarVirtual Pc Seminar
Virtual Pc Seminar
 
OLUG_xen.ppt
OLUG_xen.pptOLUG_xen.ppt
OLUG_xen.ppt
 
Intro to virtualization
Intro to virtualizationIntro to virtualization
Intro to virtualization
 
Io sy.stemppt
Io sy.stempptIo sy.stemppt
Io sy.stemppt
 
LOAD BALANCING OF APPLICATIONS USING XEN HYPERVISOR
LOAD BALANCING OF APPLICATIONS  USING XEN HYPERVISORLOAD BALANCING OF APPLICATIONS  USING XEN HYPERVISOR
LOAD BALANCING OF APPLICATIONS USING XEN HYPERVISOR
 
Slide final
Slide finalSlide final
Slide final
 
Aplura virtualization slides
Aplura virtualization slidesAplura virtualization slides
Aplura virtualization slides
 
Rootconf nilesh2012
Rootconf nilesh2012Rootconf nilesh2012
Rootconf nilesh2012
 
VMware Performance Troubleshooting
VMware Performance TroubleshootingVMware Performance Troubleshooting
VMware Performance Troubleshooting
 
Techorama 2017 - What's new in Windows Server 2016
 Techorama 2017 - What's new in Windows Server 2016 Techorama 2017 - What's new in Windows Server 2016
Techorama 2017 - What's new in Windows Server 2016
 
ELC21: VM-to-VM Communication Mechanisms for Embedded
ELC21: VM-to-VM Communication Mechanisms for EmbeddedELC21: VM-to-VM Communication Mechanisms for Embedded
ELC21: VM-to-VM Communication Mechanisms for Embedded
 

More from sathish sak

More from sathish sak (20)

TRANSPARENT CONCRE
TRANSPARENT CONCRETRANSPARENT CONCRE
TRANSPARENT CONCRE
 
Stationary Waves
Stationary WavesStationary Waves
Stationary Waves
 
Electrical Activity of the Heart
Electrical Activity of the HeartElectrical Activity of the Heart
Electrical Activity of the Heart
 
Electrical Activity of the Heart
Electrical Activity of the HeartElectrical Activity of the Heart
Electrical Activity of the Heart
 
Software process life cycles
Software process life cyclesSoftware process life cycles
Software process life cycles
 
Digital Logic Circuits
Digital Logic CircuitsDigital Logic Circuits
Digital Logic Circuits
 
Real-Time Scheduling
Real-Time SchedulingReal-Time Scheduling
Real-Time Scheduling
 
Real-Time Signal Processing: Implementation and Application
Real-Time Signal Processing:  Implementation and ApplicationReal-Time Signal Processing:  Implementation and Application
Real-Time Signal Processing: Implementation and Application
 
DIGITAL SIGNAL PROCESSOR OVERVIEW
DIGITAL SIGNAL PROCESSOR OVERVIEWDIGITAL SIGNAL PROCESSOR OVERVIEW
DIGITAL SIGNAL PROCESSOR OVERVIEW
 
FRACTAL ROBOTICS
FRACTAL  ROBOTICSFRACTAL  ROBOTICS
FRACTAL ROBOTICS
 
Electro bike
Electro bikeElectro bike
Electro bike
 
ROBOTIC SURGERY
ROBOTIC SURGERYROBOTIC SURGERY
ROBOTIC SURGERY
 
POWER GENERATION OF THERMAL POWER PLANT
POWER GENERATION OF THERMAL POWER PLANTPOWER GENERATION OF THERMAL POWER PLANT
POWER GENERATION OF THERMAL POWER PLANT
 
mathematics application fiels of engineering
mathematics application fiels of engineeringmathematics application fiels of engineering
mathematics application fiels of engineering
 
Plastics…
Plastics…Plastics…
Plastics…
 
ENGINEERING
ENGINEERINGENGINEERING
ENGINEERING
 
ENVIRONMENTAL POLLUTION
ENVIRONMENTALPOLLUTIONENVIRONMENTALPOLLUTION
ENVIRONMENTAL POLLUTION
 
RFID TECHNOLOGY
RFID TECHNOLOGYRFID TECHNOLOGY
RFID TECHNOLOGY
 
green chemistry
green chemistrygreen chemistry
green chemistry
 
NANOTECHNOLOGY
  NANOTECHNOLOGY	  NANOTECHNOLOGY
NANOTECHNOLOGY
 

Recently uploaded

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Recently uploaded (20)

LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 

Xen and the Art of Virtualization

  • 1. Xen and the Art of Virtualization By SATHISHKUMAR G (sathishsak111@gmail.com)
  • 2. Introduction  Challenges to build virtual machines  Performance isolation  Scheduling priority  Memory demand  Network traffic  Disk accesses  Support for various OS platforms  Small performance overhead
  • 3. Xen  Multiplexes resources at the granularity of an entire OS  As opposed to process-level multiplexing  Price: higher overhead  Target: 100 virtual OSes per machine
  • 4. Xen: Approach and Overview  Conventional approach  Full virtualization  Cannot access the hardware  Problematic for certain privileged instructions (e.g., traps)  No real-time guarantees
  • 5. Xen: Approach and Overview  Xen: paravirtualization  Provides some exposures to the underlying HW  Better performance  Need modifications to the OS  No modifications to applications
  • 6. Memory Management  Depending on the hardware supports  Software managed TLB  Associate address space IDs with TLB tags  Allow coexistence of OSes  Avoid TLB flushing across OS boundaries
  • 7. Memory Management  X86 does not have software managed TLB  Xen exists at the top 64MB of every address space  Avoid TLB flushing when an guest OS enter/exist Xen  Each OS can only map to memory it owns  Writes are validated by Xen
  • 8. CPU  X86 supports 4 levels of privileges  0 for OS, and 3 for applications  Xen downgrades the privilege of OSes  System-call and page-fault handlers registered to Xen  “fast handlers” for most exceptions, Xen isn’t involved
  • 9. Device I/O  Xen exposes a set of simple device abstractions
  • 10. The Cost of Porting an OS to Xen  Privileged instructions  Page table access  Network driver  Block device driver  <2% of code-base
  • 11. Control Management  Separation of policy and mechanism  Domain0 hosts the application-level management software  Creation and deletion of virtual network interfaces and block devices
  • 12. Control Transfer: Hypercalls and Events  Hypercall: synchronous calls from a domain to Xen  Analogous to system calls  Events: asynchronous notifications from Xen to domains  Replace device interrupts
  • 13. Data Transfer: I/O Rings  Zero-copy semantics
  • 14. CPU Scheduling  Borrowed virtual time scheduling  Allows temporary violations of fair sharing to favor recently-woken domains  Goal: reduce wake-up latency
  • 15. Time and Timers  Xen provides each guest OS with  Real time (since machine boot)  Virtual time (time spent for execution)  Wall-clock time  Each guest OS can program a pair of alarm timers  Real time  Virtual time
  • 16. Virtual Address Translation  No shadow pages (VMWare)  Xen provides constrained but direct MMU updates  All guest OSes have read-only accesses to page tables  Updates are batched into a single hypercall
  • 17. Physical Memory  Reserved at domain creation times  Memory statically partitioned among domains
  • 18. Network  Virtual firewall-router attached to all domains  Round-robin packet scheduler  To send a packet, enqueue a buffer descriptor into the transmit rang  Use scatter-gather DMA (no packet copying)  A domain needs to exchange page frame to avoid copying  Page-aligned buffering
  • 19. Disk  Only Domain0 has direct access to disks  Other domains need to use virtual block devices  Use the I/O ring  Reorder requests prior to enqueuing them on the ring  If permitted, Xen will also reorder requests to improve performance  Use DMA (zero copy)
  • 20. Evaluation  Dell 2650 dual processor  2.4 GHz Xeon server  2GB RAM  3 Gb Ethernet NIC  1 Hitachi DK32eJ 146 GB 10k RPM SCSI disk  Linux 2.4.21 (native)
  • 21. Relative Performance 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Linux Xen VMWare UML SPEC INT2000 score CPU Intensive Little I/O and OS interaction 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Linux Xen VMWare UML SPEC WEB99 180Mb/s TCP traffic Disk read-write on 2GB dataset
  • 22. Concurrent Virtual Machines Multiple Apache processes in Linux vs. One Apache process in each guest OS
  • 23. Performance Isolation  4 Domains  2 running benchmarks  1 running dd  1 running a fork bomb in the background  2 antisocial domains contributed only 4% performance degradation