Xen and the Art of Virtualization Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugeba...
Outline <ul><li>Why Virtualization? </li></ul><ul><li>Overview of Xen </li></ul><ul><li>Benchmark Results </li></ul><ul><l...
Outline <ul><li>Why Virtualization? </li></ul><ul><li>Overview of Xen </li></ul><ul><li>Benchmark Results </li></ul><ul><l...
Why Virtualization? <ul><li>Problem Domain </li></ul><ul><li>Virtualization </li></ul><ul><li>Paravirtualization </li></ul>
Problem Domain <ul><li>Need to execute a diverse range of applications and services </li></ul><ul><ul><li>Need to support ...
Virtualization <ul><li>Present the illusion of many small Virtual Machines to run multiple instances of different Operatin...
Paravirtualization <ul><li>Present an idealized VM abstraction to guest OSes </li></ul><ul><ul><li>Differs from underlying...
Outline <ul><li>Why Virtualization? </li></ul><ul><li>Overview of Xen </li></ul><ul><li>Benchmark Results </li></ul><ul><l...
Overview of Xen <ul><li>High-Performance, Paravirtualized Virtual Machine Monitor/Hypervisor </li></ul><ul><li>Runs on 32-...
Machine Running Xen Hypervisor H/W (SMP x86, physical memory, enet, SCSI/IDE) Domain0 Control Interface Virtual Physical M...
Virtual Machine Interface <ul><li>CPU </li></ul><ul><li>Memory </li></ul><ul><li>Device I/O </li></ul><ul><li>Control Mana...
Virtualized CPU <ul><li>CPU Execution </li></ul><ul><ul><li>Non-Privileged Instructions can run directly on “bare hardware...
Memory Management 1 <ul><li>Page Tables </li></ul><ul><ul><li>Guests responsible for managing their own page tables </li><...
Memory Management 2 <ul><li>Physical Memory </li></ul><ul><ul><li>Most Operating Systems expect contiguous memory addresse...
Device I/O <ul><li>Xen exposes a set of clean and simple device abstractions </li></ul><ul><li>I/O data transferred betwee...
Control Management <ul><li>Domain0 </li></ul><ul><ul><li>Created at Xen boot-time </li></ul></ul><ul><ul><li>Has access to...
Control Transfer <ul><li>Hypercalls </li></ul><ul><ul><li>Synchronous communication between Hypervisor and Guest </li></ul...
Data Transfer <ul><li>I/O Rings </li></ul><ul><ul><li>Mechanism to allow efficient moving of data vertically through syste...
Outline <ul><li>Why Virtualization? </li></ul><ul><li>Overview of Xen </li></ul><ul><li>Benchmark Results </li></ul><ul><l...
Benchmark Results <ul><li>Compare Linux to different Virtualization techniques </li></ul><ul><li>XenoLinux compared agains...
Performance L X V U SPEC INT2000 (score) L X V U Linux build time (s) L X V U OSDB-OLTP (tup/s) L X V U SPEC WEB99 (score)...
Concurrent VM L X 2 L X 4 L X 8 L X 16 0 200 400 600 800 1000 Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) So...
Additional Results <ul><li>Performance Isolation </li></ul><ul><ul><li>Execute domains with “anti-social” processes </li><...
Outline <ul><li>Why Virtualization? </li></ul><ul><li>Overview of Xen </li></ul><ul><li>Architecture </li></ul><ul><li>Ben...
Xen Today <ul><li>Current Version: Xen 3.2 (Released Jan ‘08) </li></ul><ul><li>Supports HW Virtualization Extensions (Int...
Outline <ul><li>Why Virtualization? </li></ul><ul><li>Overview of Xen </li></ul><ul><li>Benchmark Results </li></ul><ul><l...
Conclusion <ul><li>Xen provides excellent platform for deploying a wide variety of differing applications </li></ul><ul><l...
Outline <ul><li>Why Virtualization? </li></ul><ul><li>Overview of Xen </li></ul><ul><li>Benchmark Results </li></ul><ul><l...
References <ul><li>www.xen.org </li></ul><ul><li>www.cl.cam.ac.uk/research/srg/netos/xen </li></ul>
Questions/Comments?
Upcoming SlideShare
Loading in...5
×

9b.ppt

402

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
402
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

9b.ppt

  1. 1. Xen and the Art of Virtualization Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, Ian Pratt, Andrew Warfield University of Cambridge Computer Laboratory Presented by: Brandon Elting
  2. 2. Outline <ul><li>Why Virtualization? </li></ul><ul><li>Overview of Xen </li></ul><ul><li>Benchmark Results </li></ul><ul><li>Xen Today </li></ul><ul><li>Conclusion </li></ul>
  3. 3. Outline <ul><li>Why Virtualization? </li></ul><ul><li>Overview of Xen </li></ul><ul><li>Benchmark Results </li></ul><ul><li>Xen Today </li></ul><ul><li>Conclusion </li></ul>
  4. 4. Why Virtualization? <ul><li>Problem Domain </li></ul><ul><li>Virtualization </li></ul><ul><li>Paravirtualization </li></ul>
  5. 5. Problem Domain <ul><li>Need to execute a diverse range of applications and services </li></ul><ul><ul><li>Need to support multiple OSes and configurations </li></ul></ul><ul><ul><li>Solution: Run multiple processes on a single machine </li></ul></ul><ul><ul><ul><li>Unfortunate configuration interactions </li></ul></ul></ul><ul><ul><li>Solution: Run separate OSes on different machines </li></ul></ul><ul><ul><ul><li>Maintenance Issues </li></ul></ul></ul><ul><ul><ul><li>Keep machines busy </li></ul></ul></ul><ul><li>Support Legacy Software on Modern Hardware </li></ul>
  6. 6. Virtualization <ul><li>Present the illusion of many small Virtual Machines to run multiple instances of different Operating Systems concurrently </li></ul><ul><ul><li>Virtual Machine exactly like physical machine </li></ul></ul><ul><li>Pros </li></ul><ul><ul><li>Can run unmodified OSes in VM </li></ul></ul><ul><li>Cons </li></ul><ul><ul><li>Performance </li></ul></ul><ul><ul><li>Uncooperative hardware </li></ul></ul><ul><ul><ul><li>Solution: binary rewriting </li></ul></ul></ul><ul><li>Examples </li></ul><ul><ul><li>VM/370, VMware, Disco </li></ul></ul>
  7. 7. Paravirtualization <ul><li>Present an idealized VM abstraction to guest OSes </li></ul><ul><ul><li>Differs from underlying hardware interface </li></ul></ul><ul><li>Pros </li></ul><ul><ul><li>Can deal with difficult to virtualize architectures </li></ul></ul><ul><ul><li>Exposing both a virtual and real interface leads to potential performance enhancements </li></ul></ul><ul><li>Cons </li></ul><ul><ul><li>Must port existing OSes to run on paravirtualized host </li></ul></ul><ul><li>Example </li></ul><ul><ul><li>Denali </li></ul></ul>
  8. 8. Outline <ul><li>Why Virtualization? </li></ul><ul><li>Overview of Xen </li></ul><ul><li>Benchmark Results </li></ul><ul><li>Xen Today </li></ul><ul><li>Conclusion </li></ul>
  9. 9. Overview of Xen <ul><li>High-Performance, Paravirtualized Virtual Machine Monitor/Hypervisor </li></ul><ul><li>Runs on 32-bit x86 Processors </li></ul><ul><li>Provides an environment to execute up to 100 VM instances simultaneously </li></ul><ul><li>Focus on Performance Isolation </li></ul><ul><li>Attempts to minimize overhead associated with virtualization </li></ul><ul><li>Supports Ported Guest Operating Systems </li></ul><ul><ul><li>XenoLinux - Port of Linux 2.4 </li></ul></ul><ul><ul><li>XenoXP - Port of Windows XP (in development) </li></ul></ul>
  10. 10. Machine Running Xen Hypervisor H/W (SMP x86, physical memory, enet, SCSI/IDE) Domain0 Control Interface Virtual Physical Memory Virtual x86 CPU Virtual Network Virtual BlockDev XEN GuestOS (XenoLinux) Control Plane Software Xeno-Aware Device Drivers GuestOS (XenoXP) User Software Xeno-Aware Device Drivers GuestOS (XenoBSD) User Software Xeno-Aware Device Drivers GuestOS (XenoLinux) User Software Xeno-Aware Device Drivers
  11. 11. Virtual Machine Interface <ul><li>CPU </li></ul><ul><li>Memory </li></ul><ul><li>Device I/O </li></ul><ul><li>Control Management </li></ul>
  12. 12. Virtualized CPU <ul><li>CPU Execution </li></ul><ul><ul><li>Non-Privileged Instructions can run directly on “bare hardware” </li></ul></ul><ul><ul><li>Privileged operations must be marshaled by Xen </li></ul></ul><ul><li>Privilege Levels </li></ul><ul><ul><li>x86 has four privileged levels (rings) 0-3 (0=more … 3=less) </li></ul></ul><ul><ul><li>Xen runs at ring0, Guest OS at ring1, apps at ring3 </li></ul></ul><ul><li>Exception Handling </li></ul><ul><ul><li>Guest provides virtual IDT </li></ul></ul><ul><ul><li>Most ISRs same as on real x86 hardware, page-fault is special case </li></ul></ul><ul><li>Interrupts and Events </li></ul><ul><ul><li>Handled via “event channels,” Xen upcalls into guest </li></ul></ul><ul><ul><li>Maskable, analogous to disabling interrupts </li></ul></ul><ul><ul><li>‘ Fast’ exception handler for Guest OS system-calls </li></ul></ul>
  13. 13. Memory Management 1 <ul><li>Page Tables </li></ul><ul><ul><li>Guests responsible for managing their own page tables </li></ul></ul><ul><ul><li>Updates to page tables must go through Xen </li></ul></ul><ul><ul><li>Guests have direct read access to page tables </li></ul></ul><ul><ul><li>Updates to page tables can be batched </li></ul></ul><ul><ul><li>Page frames contain reference count and type </li></ul></ul><ul><li>Translation Lookaside Buffer </li></ul><ul><ul><li>x86’s hardware managed TLB complicates virtualization </li></ul></ul><ul><ul><li>Xen mapped to the top 64MB of each address space, saves TLB flushes </li></ul></ul><ul><li>Segmentation </li></ul><ul><ul><li>Handled in a similar manner as page tables </li></ul></ul>
  14. 14. Memory Management 2 <ul><li>Physical Memory </li></ul><ul><ul><li>Most Operating Systems expect contiguous memory addresses </li></ul></ul><ul><ul><li>Illusion of contiguous physical memory provided by physical-hardware map </li></ul></ul><ul><ul><li>Exposing both hardware and physical memory addresses provides area for optimization </li></ul></ul><ul><ul><ul><li>Cache locality </li></ul></ul></ul>
  15. 15. Device I/O <ul><li>Xen exposes a set of clean and simple device abstractions </li></ul><ul><li>I/O data transferred between guest and Xen via aync I/O Rings </li></ul><ul><li>Network Device </li></ul><ul><ul><li>VFR - Virtual Firewall-Router </li></ul></ul><ul><ul><li>VIF - Virtual Network Interface </li></ul></ul><ul><li>Disks </li></ul><ul><ul><li>VBD - Virtual Block Devices </li></ul></ul>
  16. 16. Control Management <ul><li>Domain0 </li></ul><ul><ul><li>Created at Xen boot-time </li></ul></ul><ul><ul><li>Has access to Xen’s control interface </li></ul></ul><ul><ul><li>Hosts application-level management software </li></ul></ul><ul><ul><li>Provides separation of policy and mechanism </li></ul></ul>
  17. 17. Control Transfer <ul><li>Hypercalls </li></ul><ul><ul><li>Synchronous communication between Hypervisor and Guest </li></ul></ul><ul><ul><li>Analogous to system calls </li></ul></ul><ul><li>Events </li></ul><ul><ul><li>Asynchronous notifications to domains </li></ul></ul><ul><ul><li>Used to notify domains of device driver interrupts </li></ul></ul><ul><ul><li>Lightweight notification of important events </li></ul></ul><ul><ul><ul><li>ie. Domain-termination requests </li></ul></ul></ul>
  18. 18. Data Transfer <ul><li>I/O Rings </li></ul><ul><ul><li>Mechanism to allow efficient moving of data vertically through system </li></ul></ul><ul><ul><li>Based around two pairs of producer-consumer pointers </li></ul></ul><ul><ul><li>Unique request ids allow reordering </li></ul></ul><ul><ul><li>Allows producer to enqueue multiple requests and defer notifying consumer </li></ul></ul>
  19. 19. Outline <ul><li>Why Virtualization? </li></ul><ul><li>Overview of Xen </li></ul><ul><li>Benchmark Results </li></ul><ul><li>Xen Today </li></ul><ul><li>Conclusion </li></ul>
  20. 20. Benchmark Results <ul><li>Compare Linux to different Virtualization techniques </li></ul><ul><li>XenoLinux compared against </li></ul><ul><ul><li>Linux, VMWare, User-Mode Linux </li></ul></ul><ul><li>Benchmarks </li></ul><ul><ul><li>SPEC: cpu intensive </li></ul></ul><ul><ul><li>Linux build: 7% of time spent in kernel </li></ul></ul><ul><ul><li>OSDB-IR/OLTP: OS intensive, many domain transitions </li></ul></ul><ul><ul><li>Dbench: filesystem intensive </li></ul></ul><ul><ul><li>SPEC WEB99: good overall measure </li></ul></ul>
  21. 21. Performance L X V U SPEC INT2000 (score) L X V U Linux build time (s) L X V U OSDB-OLTP (tup/s) L X V U SPEC WEB99 (score) 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 Benchmark suite running on Linux (L), Xen (X), VMware Workstation (V), and UML (U) Source: xen-lwe2005-short.ppt
  22. 22. Concurrent VM L X 2 L X 4 L X 8 L X 16 0 200 400 600 800 1000 Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) Source: xen-lwe2005-short.ppt
  23. 23. Additional Results <ul><li>Performance Isolation </li></ul><ul><ul><li>Execute domains with “anti-social” processes </li></ul></ul><ul><ul><li>OSDB-IR and SPEC WEB99 only slightly affected </li></ul></ul><ul><li>Scalability </li></ul><ul><ul><li>Run up to 100 VMs concurrently </li></ul></ul><ul><ul><li>Only a loss of 7.5% throughput compared to Linux </li></ul></ul>
  24. 24. Outline <ul><li>Why Virtualization? </li></ul><ul><li>Overview of Xen </li></ul><ul><li>Architecture </li></ul><ul><li>Benchmark Results </li></ul><ul><li>Xen Today </li></ul><ul><li>Conclusion </li></ul>
  25. 25. Xen Today <ul><li>Current Version: Xen 3.2 (Released Jan ‘08) </li></ul><ul><li>Supports HW Virtualization Extensions (Intel IVT, AMD-V) </li></ul><ul><ul><li>Runs unmodified OSes </li></ul></ul><ul><li>Supports SMP Virtualized Guest OSes </li></ul><ul><li>Supported OSes: Windows, Linux, Solaris, BSD, … </li></ul><ul><li>Virtualizes Architectures: x86, x86/64, IA64, PowerPC, … </li></ul><ul><li>Live VM Relocation </li></ul><ul><ul><li>Load balancing across a cluster </li></ul></ul><ul><li>Graphics Virtualization: Direct3D, OpenGL </li></ul>
  26. 26. Outline <ul><li>Why Virtualization? </li></ul><ul><li>Overview of Xen </li></ul><ul><li>Benchmark Results </li></ul><ul><li>Xen Today </li></ul><ul><li>Conclusion </li></ul>
  27. 27. Conclusion <ul><li>Xen provides excellent platform for deploying a wide variety of differing applications </li></ul><ul><li>Xen provides necessary protection and performance isolation </li></ul><ul><li>Paravirtualization provides near native performance </li></ul>
  28. 28. Outline <ul><li>Why Virtualization? </li></ul><ul><li>Overview of Xen </li></ul><ul><li>Benchmark Results </li></ul><ul><li>Xen Today </li></ul><ul><li>Conclusion </li></ul>
  29. 29. References <ul><li>www.xen.org </li></ul><ul><li>www.cl.cam.ac.uk/research/srg/netos/xen </li></ul>
  30. 30. Questions/Comments?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×