Networked I/O for Virtual Machines Approaches and Challenges Muli - - PowerPoint PPT Presentation

networked i o for virtual machines
SMART_READER_LITE
LIVE PREVIEW

Networked I/O for Virtual Machines Approaches and Challenges Muli - - PowerPoint PPT Presentation

Networked I/O for Virtual Machines Approaches and Challenges Muli Ben-Yehuda , Ben-Ami Yassour, Orit Wasserman { muli,benami,oritw } @il.ibm.com IBM Haifa Research Lab IBM Corporation 2008 c Israeli Networking Seminar, May 2008 Networked


slide-1
SLIDE 1

c

IBM Corporation 2008

Israeli Networking Seminar, May 2008

Networked I/O for Virtual Machines

Approaches and Challenges

Muli Ben-Yehuda, Ben-Ami Yassour, Orit Wasserman

{muli,benami,oritw}@il.ibm.com

IBM Haifa Research Lab

Networked I/O for Virtual Machines – p. 1/17

slide-2
SLIDE 2

c

IBM Corporation 2008

Israeli Networking Seminar, May 2008

Table of Contents

Virtualization Networked I/O for virtual machines Approaches Pass-through device access IOMMUs Challenges

Networked I/O for Virtual Machines – p. 2/17

slide-3
SLIDE 3

c

IBM Corporation 2008

Israeli Networking Seminar, May 2008

Virtualization

For foundations, see [Popek74]. This talk deals mainly with the open-source hypervisors Xen [Barham03] and KVM [Kivity07].

Networked I/O for Virtual Machines – p. 3/17

slide-4
SLIDE 4

c

IBM Corporation 2008

Israeli Networking Seminar, May 2008

Network I/O is tough

High packet rate (1GE ⇒ 10GE) Data must often be copied on receive High bandwidth, high throughput, low latency

Figure 1: Xen network CPU utilization vs. Linux [Santos07]

Networked I/O for Virtual Machines – p. 4/17

slide-5
SLIDE 5

c

IBM Corporation 2008

Israeli Networking Seminar, May 2008

Virtual Machine I/O

Virtual machines use three models for I/O Emulation Para-virtualized drivers Pass-through access

Networked I/O for Virtual Machines – p. 5/17

slide-6
SLIDE 6

c

IBM Corporation 2008

Israeli Networking Seminar, May 2008

Emulation

Hypervisor emulates real I/O devices [Sugerman01] Virtual machine uses its standard drivers Hypervisor traps device accesses (MMIO, PIO) Hypervisor emulates interrupts and DMA Interface limited to low-level, real device interface! Which is not a good fit for software emulation

= ⇒ High compatibility but low performance.

Networked I/O for Virtual Machines – p. 6/17

slide-7
SLIDE 7

c

IBM Corporation 2008

Israeli Networking Seminar, May 2008

Para-virtualization

Hypervisor and VM cooperate for more efficient I/O [Barham03] Hypervisor specific drivers installed in the VM Network device level or higher up the stack

= ⇒ Low compatibility but better performance [Santos08].

Networked I/O for Virtual Machines – p. 7/17

slide-8
SLIDE 8

c

IBM Corporation 2008

Israeli Networking Seminar, May 2008

Pass-through

Give VM direct access to a hardware device Without any software intermediaries between the virtual machine and the device Examples: Legacy adapters [Ben-Yehuda06] Self-virtualizing adapters [Liu06], [Willman07]

= ⇒ Best performance—but at a price. .

Networked I/O for Virtual Machines – p. 8/17

slide-9
SLIDE 9

c

IBM Corporation 2008

Israeli Networking Seminar, May 2008

Pass-through security

Untrusted VM programs a device, without any supervision. Device is DMA capable (all modern devices are). Which means the domain can program the device to

  • verwrite any memory location.

. . . including where the hypervisor lives . . . game over.

Networked I/O for Virtual Machines – p. 9/17

slide-10
SLIDE 10

c

IBM Corporation 2008

Israeli Networking Seminar, May 2008

Pass-through memory addressing

VM is not aware of host physical memory. VM is only aware of its own guest “physical” memory. Device DMAs need to end at the right place (host, not guest “physical” memory). VM programs device with guest physical addresses ⇒ DMAs end up at the wrong place!

Networked I/O for Virtual Machines – p. 10/17

slide-11
SLIDE 11

c

IBM Corporation 2008

Israeli Networking Seminar, May 2008

IOMMU to the rescue

IOMMU—think MMU for I/O devices—separate address spaces, protection from malicious devices! IOMMUs enable pass-through access for para-virtualized and fully-virtualized VMs. Intra-VM vs. Inter-VM protection [Willman08] But: IOMMUs have costs too [Ben-Yehuda07]

Networked I/O for Virtual Machines – p. 11/17

slide-12
SLIDE 12

c

IBM Corporation 2008

Israeli Networking Seminar, May 2008

Pass-through network throughput

Msg size < 1024: throughput as much as 45% less. Msg size >= 1024: throughput barely affected.

Networked I/O for Virtual Machines – p. 12/17

slide-13
SLIDE 13

c

IBM Corporation 2008

Israeli Networking Seminar, May 2008

Pass-through network CPU utilization

Pass-through CPU utilization is up to 40%–60% more!

Networked I/O for Virtual Machines – p. 13/17

slide-14
SLIDE 14

c

IBM Corporation 2008

Israeli Networking Seminar, May 2008

Live VM migration

host a host b VM

Networked I/O for Virtual Machines – p. 14/17

slide-15
SLIDE 15

c

IBM Corporation 2008

Israeli Networking Seminar, May 2008

Tying it all together

How can we get the same performance as bare metal? Throughput and CPU utilization . . . on 10GbE How can we get the performance of bare-metal with the benefits of virtual drivers? (e.g., live migration) A hybrid approach? [Willman07] Custom-made devices? [Liu07]

Networked I/O for Virtual Machines – p. 15/17

slide-16
SLIDE 16

c

IBM Corporation 2008

Israeli Networking Seminar, May 2008

Bibliography

Barham03: “Xen and the Art of Virtualization”, SOSP ’03 Ben-Yehuda06: “Utilizing IOMMUs for Virtualization in Linux and Xen”, OLS ’06 Ben-Yehuda07: “The Price of Safety: Evaluating IOMMU Performance”, OLS ’07 Liu06: “High Performance VMM-Bypass I/O in Virtual Machines”, USENIX ’06 Liu07: “Nomad: migrating OS-bypass networks in virtual machines”, VEE ’07 Kivity07: “kvm: The Kernel-Based Virtual Machine for Linux”, OLS ’07

Networked I/O for Virtual Machines – p. 16/17

slide-17
SLIDE 17

c

IBM Corporation 2008

Israeli Networking Seminar, May 2008

Bibliography cont.

Popek74: “Formal Requirements for Virtualizable Third Generation Architectures”, CACM 17(7), ’74 Santos08: “Bridging the Gap between Software and Hardware Techniques for I/O Virtualization”, USENIX ’08 Sugerman01: “Virtualizing I/O Devices on VMware Workstation’s Hosted Virtual Machine Monitor”, USENIX ’01 Willman07: “Concurrent Direct Network Access for Virtual Machine Monitors”, HPCA ’07 Willman08: “Protection Strategies for Direct Access to Virtualized I/O Devices”, USENIX ’08

Networked I/O for Virtual Machines – p. 17/17