Advanced Computer Networks. Network I/O Virtualization



Similar documents
BHyVe. BSD Hypervisor. Neel Natu Peter Grehan

Network Virtualization Technologies and their Effect on Performance

Assessing the Performance of Virtualization Technologies for NFV: a Preliminary Benchmarking

Virtualization. P. A. Wilsey. The text highlighted in green in these slides contain external hyperlinks. 1 / 16

Cloud^H^H^H^H^H Virtualization Technology. Andrew Jones May 2011

KVM: Kernel-based Virtualization Driver

KVM on S390x. Revolutionizing the Mainframe

High-performance vnic framework for hypervisor-based NFV with userspace vswitch Yoshihiro Nakajima, Hitoshi Masutani, Hirokazu Takahashi NTT Labs.

VON/K: A Fast Virtual Overlay Network Embedded in KVM Hypervisor for High Performance Computing

Virtual Machines. COMP 3361: Operating Systems I Winter

How To Understand The Power Of A Virtual Machine Monitor (Vm) In A Linux Computer System (Or A Virtualized Computer)

KVM Architecture Overview

KVM: A Hypervisor for All Seasons. Avi Kivity avi@qumranet.com

Intel Ethernet and Configuring Single Root I/O Virtualization (SR-IOV) on Microsoft* Windows* Server 2012 Hyper-V. Technical Brief v1.

RCL: Design and Open Specification

vpf_ring: Towards Wire-Speed Network Monitoring Using Virtual Machines

Broadcom Ethernet Network Controller Enhanced Virtualization Functionality

Uses for Virtual Machines. Virtual Machines. There are several uses for virtual machines:

Full and Para Virtualization

Introduction to Virtualization & KVM

Networked I/O for Virtual Machines

Toward a practical HPC Cloud : Performance tuning of a virtualized HPC cluster

PCI-SIG SR-IOV Primer. An Introduction to SR-IOV Technology Intel LAN Access Division

kvm: Kernel-based Virtual Machine for Linux

Nested Virtualization

Virtualization Technologies

The QEMU/KVM Hypervisor

Architecture of the Kernel-based Virtual Machine (KVM)

Hardware Based Virtualization Technologies. Elsie Wahlig Platform Software Architect

vpf_ring: Towards Wire-Speed Network Monitoring Using Virtual Machines

Masters Project Proposal

RCL: Software Prototype

DPDK Summit 2014 DPDK in a Virtual World

COS 318: Operating Systems. Virtual Machine Monitors

Chapter 5 Cloud Resource Virtualization

Enabling Intel Virtualization Technology Features and Benefits

Virtualization. Jia Rao Assistant Professor in CS

Virtualization. Pradipta De

Hypervisors and Virtual Machines

Knut Omang Ifi/Oracle 19 Oct, 2015

Virtualization. Dr. Yingwu Zhu

Virtualization. Jukka K. Nurminen

x86 ISA Modifications to support Virtual Machines

I/O Virtualization Using Mellanox InfiniBand And Channel I/O Virtualization (CIOV) Technology

How To Make A Minecraft Iommus Work On A Linux Kernel (Virtual) With A Virtual Machine (Virtual Machine) And A Powerpoint (Virtual Powerpoint) (Virtual Memory) (Iommu) (Vm) (

Installing & Using KVM with Virtual Machine Manager COSC 495

Virtualization in Linux KVM + QEMU

RPM Brotherhood: KVM VIRTUALIZATION TECHNOLOGY

Virtual device passthrough for high speed VM networking

CPET 581 Cloud Computing: Technologies and Enterprise IT Strategies. Virtualization of Clusters and Data Centers

Virtualization Technology. Zhiming Shen

Enabling Technologies for Distributed Computing

VALE, a Switched Ethernet for Virtual Machines

Module I-7410 Advanced Linux FS-11 Part1: Virtualization with KVM

Basics in Energy Information (& Communication) Systems Virtualization / Virtual Machines

SDN software switch Lagopus and NFV enabled software node

KVM PERFORMANCE IMPROVEMENTS AND OPTIMIZATIONS. Mark Wagner Principal SW Engineer, Red Hat August 14, 2011

Real-Time KVM for the Masses Unrestricted Siemens AG All rights reserved

KVM KERNEL BASED VIRTUAL MACHINE

Intel Virtualization Technology Overview Yu Ke

A quantitative comparison between xen and kvm

Chapter 16: Virtual Machines. Operating System Concepts 9 th Edition

Broadcom Ethernet Network Controller Enhanced Virtualization Functionality

SR-IOV Networking in Xen: Architecture, Design and Implementation Yaozu Dong, Zhao Yu and Greg Rose

Cloud Computing CS

CS 695 Topics in Virtualization and Cloud Computing. More Introduction + Processor Virtualization

Kernel Virtual Machine

2972 Linux Options and Best Practices for Scaleup Virtualization

Tracing Kernel Virtual Machines (KVM) and Linux Containers (LXC)

Performance Profiling in a Virtualized Environment

Network Function Virtualization Packet Processing Performance of Virtualized Platforms with Linux* and Intel Architecture

How to Configure Intel Ethernet Converged Network Adapter-Enabled Virtual Functions on VMware* ESXi* 5.1

How To Create A Cloud Based System For Aaas (Networking)

Distributed Systems. Virtualization. Paul Krzyzanowski

Securing Your Cloud with Xen Project s Advanced Security Features

Virtualization. Types of Interfaces

Enabling Technologies for Distributed and Cloud Computing

Enterprise-Class Virtualization with Open Source Technologies

COM 444 Cloud Computing

VIRTUALIZATION 101. Brainstorm Conference 2013 PRESENTER INTRODUCTIONS

Virtual machines and operating systems

Virtual WiFi: Bring Virtualization from Wired to Wireless

Brian Walters VMware Virtual Platform. Linux J. 1999, 63es, Article 6 (July 1999).

Beyond the Hypervisor

Virtualization analysis

Virtualization Overview

VMkit A lightweight hypervisor library for Barrelfish

Nested Virtualization

Bridging the Gap between Software and Hardware Techniques for I/O Virtualization

KVM Security Comparison

I/O in Linux Hypervisors and Virtual Machines Lecture for the Embedded Systems Course CSD, University of Crete (May 12 & 14, 2015)

Practical Applications of Virtualization. Mike Phillips IAP 2008 SIPB IAP Series

Virtual Machines. Virtualization

Using Linux as Hypervisor with KVM

Transcription:

Advanced Computer Networks 263 3501 00 Network I/O Virtualization Patrick Stuedi Spring Semester 2014 Oriana Riva, Department of Computer Science ETH Zürich 1

Outline Last week: Today: Software Defined Networking OpenFlow Network I/O Virtualization Paravirtualization SR-IOV 2

Data Transfer Non-Virtualized syscall OS TCP/IP Driver privileged instructions NIC 1) : syscall, e.g., socket.write() 2) OS driver: issue PCI commands Set up DMA operation 3) NIC: transmit data raise interrupt when done 3

Virtualization and Hypervisors VM1 VM2 VM3 Hypervisor Hardware 4

Virtualization and Hypervisors VM1 VM2 VM3 How does Hypervisor network access work? Hardware 5

Option 1: Full Device Emulation OS unaware that it is being virtualized Hypervisor emulates device at the lowest level Privileged instructions from guest driver trap into hypervisor Advantage: no changes to the guest OS required Disadvantage: Inefficient Complex OS Traps Device Emulation Hypervisor Hardware 6

Option 1: Paravirtualization OS aware that it is being virtualized Runs special paravirtual device drivers Hypervisor cooperates with guest OS through paravirtual interfaces Advantage: Better performance Simple Disadvantage: Requires changes to the guest OS OS Paravirtual Driver Interfaces Device Emulation Hypervisor Hardware 7

Paravirtualization with VirtIO OS Front-end drivers virtio Back-end drivers Device Emulation KVM Hypervisor Back-end drivers Device Emulation lguest Hypervisor Hardware VirtIO: I/O virtualization framework for Linux Framework for developing paravirtual drivers Split driver model: front-end and back-end driver APIs for front-end and back-end to communicate 8

Example: KVM Hypervisor VM1 guest mode (guest user, guest kernel) Single Linux Process Based on Intel VT-x Additional guest execution mode I/O at guest OS trap into KVM (VM Exit) KVM schedules QEMU process to emulate I/O operation user mode QEMU VM Enter & VM Exit KVM module Hypervisor User user mode kernel mode /dev/kvm Hardware Starting new guest = starting QEMU process QEMU process interacts with KVM through ioctl on /dev/kvm to Allocated memory for guest Start guest 9...

VirtIO and KVM QEMU VirtIO Back-end 1 tx rx OS VirtIO-Net Driver (Front-end) VirtIO shared memory 3 KVM module 2 4 Hypervisor tap Real NIC 1) VirtIO-Net driver adds packet to shared VirtIO memory 2) VirtIO-Net driver causes trap into KVM 3) KVM schedules QEMU VirtIO Back-end 4) VirtIO back-end gets packet from shared VirtIO memory and emulates I/O (via system call) 5) KVM resumes guest 10

Vhost: Improved VirtIO Backend OS QEMU VirtIO-Net Driver tx rx KVM module Hypervisor vhost net tap Real NIC Vhost puts VirtIO emulation code into the kernel Instead of performing system calls from userspace (QEMU) 11

Inter-VM communication VM1 VM2 VM3 Hypervisor NIC 12

Inter-VM communication VM1 VM2 VM3 Hypervisor How does inter-vm Hardware communication work? 13

Switch in Hypervisor Bridge/switch NIC HV 14

Switched Vhost in KVM Advantage: low latency (1 software copy) OS OS OS Disadvantage: uses host CPU cycles VirtIO-Net Driver VirtIO-Net Driver VirtIO-Net Driver vhost net vhost net vhost net KVM tap tap tap bridge Real NIC 15

Switch Externally......either in External switch: Simplifies configuration: all switching controlled/configured by the network Latency = 2xDMA + 2hops Hypervisor NIC NIC Latency = 2xDMA 16

Where are we? Option 1: Full emulation No changes to guest required Complex Inefficient Option 2: Paravirtualization Requires special guest drivers Enhanced performance Option 3: Passthrough No hypervisor involvement: best performance Problems: 17

Where are we? Option 1: Full emulation No changes to guest required Complex Inefficient Option 2: Paravirtualization Requires special guest drivers Enhanced performance Not good enough! Still requires hypervisor involvement, e.g., interrupt relaying Option 3: Passthrough No hypervisor involvement: best performance Problems: 18

Where are we? Option 1: Full emulation No changes to guest required Complex Inefficient Option 2: Paravirtualization Requires special guest drivers Enhanced performance Not good enough! Still requires hypervisor involvement, e.g., interrupt relaying Option 3: Passthrough Directly assign NIC to VM No hypervisor involvement: best performance 19

Paravirtual vs Passthrough in KVM VM1 OS VM2 OS VirtIO-Net Driver Physical Driver tx rx KVM module Hypervisor vhost net tap NIC exclusively assigned to VM2 Real NIC Real NIC 20

Challenges with Passthrough / Direct Assignment VM tied to specific NIC hardware Makes VM migration more difficult VM driver issues DMA requests using VM addresses Incorrect: VM physical addresses are host virtual addresses (!) Security concern: addresses may belong to other VM Potential solution: let VM translate it's physical addresses to real DMA addresses - Still safety problem: exposes driver details to hypervisor, bugs in driver could result in incorrect translations Solution: Use an IOMMU to translate/validate DMA requests from the device Need a different NIC for each VM Solution: SR-IOV, emulate multiple NICs at hardware level 21

Challenges with Passthrough / Direct Assignment VM tied to specific NIC hardware Makes VM migration more difficult VM driver issues DMA requests using VM addresses Incorrect: VM physical addresses are host virtual addresses (!) Security concern: addresses may belong to other VM Potential solution: let VM translate it's physical addresses to real DMA addresses - Still safety problem: exposes driver details to hypervisor, bugs in driver could result in incorrect translations Solution: Use an IOMMU to translate/validate DMA requests from the device Need a different NIC for each VM Solution: SR-IOV, emulate multiple NICs at hardware level 22

Memory Address Terminology Virtual Address Address in some virtual address space in a process running in the guest OS Physical Address: Hardware address as seen by the guest OS, i.e., physical address in the virtual machine Machine address: Real hardware address on the physical machine as seen by the Hypervisor 23

IOMMU IOMMU Memory controller Main memory PCIe function (e.g. NIC) 24

IOMMU VMM programs IOMMU with VM-physical to machine address translations IOMMU Memory controller Main memory PCIe function (e.g. NIC) 25

IOMMU VMM programs IOMMU with VM-physical to machine address translations IOMMU Memory controller Main memory OS programs NIC with VMphysical address of DMA PCIe function (e.g. NIC) 26

IOMMU VMM programs IOMMU with VM-physical to machine address translations IOMMU Memory controller Main memory OS programs NIC with VMphysical address of DMA NIC issues a DMA request to VM physical memory PCIe function (e.g. NIC) 27

IOMMU IOMMU checks and translates to machine (real) address for transfer VMM programs IOMMU with VM-physical to machine address translations IOMMU Memory controller Main memory OS programs NIC with VMphysical address of DMA NIC issues a DMA request to VM physical memory PCIe function (e.g. NIC) 28

IOMMU IOMMU checks and translates to machine (real) address for transfer VMM programs IOMMU with VM-physical to machine address translations IOMMU Memory controller Main memory OS programs NIC with VMphysical address of DMA NIC issues a DMA request to VM physical memory Memory controller accesses memory PCIe function (e.g. NIC) 29

SR-IOV Single-Root I/O Virtualization Key idea: dynamically create new PCI devices Physical Function (PF): original device, full functionality Virtual Function (VF): extra device, limited functionality VFs created/destroyed via PF registers For Networking: Partitions a network card's resources With direct assignment can implement passthrough 30

SR-IOV in Action OS Physical Driver OS Physical Driver OS Physical Driver Hypervisor Physical Driver Virtual Function SR-IOV NIC Virtual Function IOMMU PCI Virtual Function Virtual Ethernet Bridge/Switch Physical Function 31

References I/O Virtualization, Mendel Rosenblum, ACM Queue, January 2012 Kernel-based Virtual Machine Technology, Yasunori Goto, Fujitsu Technical Journal, July 2011 VirtIO: Towards a De-Facto Standard For Virtual I/O Devices, Rusty Russel, ACM SIGOPS Operating s Review, July 2008 32