Presentation is loading. Please wait.

Presentation is loading. Please wait.

Xen: The Art of Virtualization

Similar presentations


Presentation on theme: "Xen: The Art of Virtualization"— Presentation transcript:

1 Xen: The Art of Virtualization
Paul Barham , Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, Ian Pratt, Andrew Warfield Presented By: Tim Trippel EECS 582 – W16

2 Overview Design Goals Xen Architecture Subsystem Virtualization
Performance Evaluation

3 Design Goals Challenge: no hardware support for virtualization at the time

4 Design Goals Challenge: no hardware support for virtualization at the time Performance: Run multiple (100) different OSes on single machine

5 Design Goals Challenge: no hardware support for virtualization at the time Performance: Run multiple (100) different OSes on single machine Deployability: Support Unmodified ABIs

6 Design Goals Challenge: no hardware support for virtualization at the time Performance: Run multiple (100) different OSes on single machine Deployability: Support Unmodified ABIs Security: Strong hidden isolation

7 Hypervisor Architectures
Guest OS Processes

8 Xen Architecture

9 Xen Architecture Hypercall

10 Xen Architecture Async. Event

11 Full Virtualization vs. Paravirtualization
Full Virtualization = virtual hardware exposed is functionally identical to machine hardware Paravirtualization = virtual hardware is similar to underlying machine architecture Full Virtualization: PRO: no need to modify guest OSes CON: not all architectures were designed for full virtualization (i.e. x86) more privilege levels needed MMU tough to virtualize since hardware handles operations situations when real and virtual resource visibility is desirable timers (TCP timeouts) Machine addresses (improve memory paging performance) Paravirtualization: PRO: improved performance (and easier to virtualize x86 architecture) CON: must modify OS slightly

12 Full Virtualization vs. Paravirtualization
Full Virtualization = virtual hardware exposed is functionally identical to machine hardware Paravirtualization = Full Virtualization: PRO: no need to modify guest OSes CON: not all architectures were designed for full virtualization (i.e. x86) more privilege levels needed MMU tough to virtualize since hardware handles operations situations when real and virtual resource visibility is desirable timers (TCP timeouts) Machine addresses (improve memory paging performance) Paravirtualization: PRO: improved performance (and easier to virtualize x86 architecture) CON: must modify OS slightly Requires Modification of Guest OS

13 Full Virtualization vs. Paravirtualization
Full Virtualization = virtual hardware exposed is functionally identical to machine hardware Paravirtualization = Full Virtualization: PRO: no need to modify guest OSes CON: not all architectures were designed for full virtualization (i.e. x86) more privilege levels needed MMU tough to virtualize since hardware handles operations Paravirtualization: improved performance (and easier to virtualize x86 architectures must modify OS slightly Xen

14 Virtualizing Memory Management
Recall virtual address translation: Easier if TLB is software controlled Easier if TLB is tagged

15 Virtualizing Memory Management
Recall virtual address translation: Easier if TLB is software controlled Easier if TLB is tagged by address-space Flushing TLB is EXPENSIVE → especially for Shadow Paging Both NOT supported by x86 at the time: TLB Miss - PT must be HW accessible TLB Flushes - Context Switches

16 Shadow vs. Direct Paging
Flushing TLB is EXPENSIVE → especially for Shadow Paging

17 Shadow vs. Direct Paging
Validate PT Update w/ Hypercall

18 Shadow vs. Direct Paging
Validate PT Update w/ Hypercall READ ONLY!

19 Avoiding TLB Flushes Allow Xen to exist in top 64MB of every address space (does not violate ABI) Top 64MB is not remappable by guest OS Xen Memory Xen Memory Context Switch OS Memory OS Memory Process Memory Process Memory

20 x86 Architecture at the Time
Virtualizing the CPU Ring 3 - Applications Ring 2 - Unused Ring 1 - Unused Ring Compropression Ring 0 - OS Kernel x86 Architecture at the Time

21 x86 Architecture at the Time
Virtualizing the CPU Ring 3 - Applications Ring 2 - Unused Ring 1 - Unused Ring Compropression Hypervisor? Ring 0 - OS Kernel x86 Architecture at the Time

22 Virtualizing the CPU x86 Xen Solution Ring 3 - Applications
Ring 2 - Unused Ring 1 - Guest OS Ring Compropression Ring 0 - Hypervisor x86 Xen Solution

23 Separate Address Spaces
Virtualizing the CPU Ring 3 - Applications Separate Address Spaces Ring 2 - Unused Ring 1 - Guest OS Ring 1 - Applications Ring 1 - Guest OS Ring Compropression Ring 0 - Hypervisor Ring 0 - Hypervisor x86 Xen Solution Alt. Xen Solution

24 Virtualizing the CPU x86 VMX Technology Ring 3 - Applications
Ring 2 - Unused Ring 1 - Unused x86 VMX Technology Ring 0 - Guest OS Ring Compropression Ring -1 - Hypervisor

25 Virtualizing Hardware Devices
Do not fully virtualizing specific devices with emulation Do create clean device abstraction asynchronous descriptor rings

26 Virtualizing Hardware Devices
Asynchronous descriptor rings allow Xen to reorder ops for performance allow zero-copy transfer VM can batch requests before invoking hypercall VM instruct Xen to batch responses

27 Virtualizing Networking
DomX Virtual Network Interface VIF = Virtual Network Interface Two descriptor rings (RX & TX) VFR = Virtual Firewall Router Dom0 installs/maintains rules Round-robin packet scheduler TX RX Virtual Firewall Router

28 Virtualizing Scheduling & Timers
Domain scheduling can be adjusted/managed by Domain0 implemented Borrowed Virtual Time algorithm to minimize domain wakeup for an event; i.e. correctly estimate TCP RTT can implement other scheduling algorithm Three Timers: Real Time - nanoseconds passed since machine boot Virtual Time - only advanced when domain is executing used by guest OS scheduler Wall-clock Time offset of real time

29 Performance Evaluation - Single Guest OS

30 Scalability

31 Conclusion Paravirtualization (PV) can offer performance gains over full virtualization PV requires modifying OS Virtualizing microarchitectures without hardware support is challenging

32 Discussion Points With hardware virtualization support, is paravirtualization still worthwhile? How is Xen’s device I/O abstraction similar to Arrakis? How do Xen VMs compare with Docker Containers?


Download ppt "Xen: The Art of Virtualization"

Similar presentations


Ads by Google