44
Weather Report June 2012

Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

Weather ReportJune 2012

Page 2: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

2

Agenda● What is KVM ● Performance● Networking● Block● RAS● Desktop● Cloud

Page 3: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

3

KVM Architecture

userspace

kernel

Page 4: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

4

Why reinvent the wheel?

Focus on virtualization.

Page 5: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

5

KVM Architecture

Heavyweight exit

Lightweight exit

Page 6: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

6

KVM features

VT-x/AMD-V

EPT/NPT

SMP Guests

Live Migration

OvercommitCPU, Memory, I/O

Hotplug

High Performance I/O

SR-IOV

VT-d/IOMMUKSM

NUMASPICE

Power Management

Massive scalability

sVirt

SVVP & WHQL

PCI Device Assignment

VEPA

Transparent huge pages

Page 7: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

7

What does it add up to?

Page 8: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

8

Performance – SPECVirt (April 2012)● Top RHEL/KVM score beats the top VMware ESX score by a

factor of 2

● KVM bests VMware ESX wherever head-to-head comparison is possible

● Key enablers of KVM's leadership virtualization performance include: SR-IOV, Huge Pages, NUMA, Node Binding

Page 9: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

9

Why KVM outperforms the rest?

● Linux, Linux, Linux● Hardware enablement : drivers, partners, ecosystem● Scheduler, MMU, IO stack● Hybrid mode● OSS – best minds in the world● More

● We own the guest and the host● Paravirt clock, steal time● Paravirt GPU (spice)● Paravirt interrupt controller (x2apic)● Paravirt page faults● Paravirt spinlocks● Vmchannel (virtio-serial)

Page 10: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

10

What we're doing?

● Up to 160 virtual CPUs

● Up to 2TB Ram

● MMU and guest page fault handling performance improvements

● Dirty logging performance improvements

● PCID/INVPCID for guests with EPT – tlb tagging for reducing the need for tlb flush

● Paravirt spinlocks (ticketlock)

Performance

Page 11: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

11

● Autonuma/schednuma - Automatic page migrationfor better NUMA localization● Kernel implementation

● Numad- Non-Uniform Memory Access Daemon● User space implementation● http://fedoraproject.org/wiki/Features/nu

mad

Performance

Page 12: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

12

RAM 0 RAM 1

Thread 1 Thread 2 Thread 2Thread 1

RAM RAM

Performance – before autonuma

Page 13: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

13

RAM 0 RAM 1

Thread 1 Thread 2 Thread 2Thread 1

RAM RAM

Performance – after autonuma

Page 14: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

14

autonuma benchmark

Page 15: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

15

What we're doing?

● Hyper-V enlightened guest interfacesupport in KVM:● increases performance of MS

guests on KVM. (per Microsoft Hypervisor Functional Specification)

● Feature and interface discovery● Scheduling/spinlocks● Virtual APIC & Others

Performance

Page 16: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

16

Page 17: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

17

KVM Network Architecture

Page 18: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

18

KVM virtio network architecture

Page 19: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

19

virtio-net TX

GuestGuest

KVMKVM VhostVhost

NICNIC

macvtapmacvtap

Page 20: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

20

virtio-net TX w/ zero copy macvtap

GuestGuest

KVMKVM VhostVhost

NICNIC

macvtapmacvtap

Page 21: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

21

vhost_net performance

Page 22: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

22

vhost_net performance

Page 23: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

23

Virtio over macvtap with SR-IOV

● Guest only knows virtio

● Migration friendly

● Good performance

● Zero copy

Page 24: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

24

Networking

● Paravirt EOI (End of Interrupt) – reduces the number of EOI exits

● Zero copy tx bridge support – zero copy without macvtap

Page 25: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

25

block

Page 26: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

26

KVM Block Architecture

Page 27: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

27

Virtio-scsi

● New KVM storage architecture based on SCSI

● Allows the usage of hundreds of devices per guest

● Supports SCSI pass-through and SCSI reservations

● Rich features - Feature set depends on the target, not on virtio-scsi

● Multipath: one virtio-scsi device = one SCSI host

● Multiple target choices: QEMU, lio

● Drop-in physical disk replacement

● True SCSI devices, good p2v/v2v migration

Page 28: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

28

Live Block Copy● Live block copy - copies guest image while the

guest is running . You can use it to move aguest image to another location online.

● Image streaming – starts running the guest on a new location while the image is being copied to it.

● Live storage migration – migrates a guest with its image, a new implementation based on live block copy

● More today at 16:30 https://events.linuxfoundation.org/events/linuxcon-japan/bonzini

Page 29: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

29

Block● Coroutines – makes synchronous

code asynchronous

● Qcow2 performance improvements● Zero/copy read/write● Introduces writeback meta data cache● Improves cluster allocation with writeback

cache

Page 30: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

30

QCOW2 performance

8k blocks

256k blocks

Page 31: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

31

RAS

Page 32: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

32

RAS● Power management for guests

● Suspend to RAM (S3) and suspend to Disk (hibernate/S4)

● USB 2.0 support and SPICE improvements,● Remote wake up support which allows a

suspended guest to resume from USB 2.0 devices

● Live migration improvements for boosting live migration convergence● Page delta compression● Migration thread● Post Copy

● New CPU models (Sandy/IvyBridge)

Page 33: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

33

RAS● Virtual CPU hot-plug

● Host admin can dynamically adjust resources in the guests

● vPMU● Enable PMU on the guest for better guest

profiling● Secure● Shareable● Model independent

● I/O throttling - Either through QEMU or cgroup.

Page 34: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

34

VFIO – Virtual Function I/O for improved pci device assignment

● VFIO – Virtual Function I/O● Enhanced interrupt support● Virtualized PCI config space● Supports virtualization and

userspace● VFIO is a device driver in the

host

● KVM device assignment (existing)

● PCI stub, PCI sysfs● Security● Depends on KVM● X86 only KVM is not a device

driver (and should not be)

vfio0

Host

QEMU

Guest

vfio1

QEMU

Guest

kvm

Page 35: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

35

PCI Bus Enhancements● New virtual platform chipset – q35

● PCI-express bus support

● PCI Bridge Support● Allows more than 32 PCI devices, each hot-pluggable

Page 36: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

36

Security● Sandbox virtual machines

● Use new “seccomp” library to only allow certain syscalls to be executed

Page 37: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

37

● Boxes – application for managing virtual machines targeted towards typical desktop end-users https://live.gnome.org/Boxes

● Spice (Virtual Desktop Interface protocol) ● New spice agent using GTK

called spice-gtk.● Usbredir – Protocol for sending

usb device traffic over a network connection

Desktop

Page 38: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

38

Cloud

Page 39: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

39

● Nested virtualization on Intel nVMX

● Nested TDP (Two Dimensional Page table) on AMD

● Open stack supports KVM

Cloud

Page 40: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

40

● Open source Linux-based KVM virtualization project

● Provides a feature-rich server virtualization management system and advanced capabilities for hosts and guests.

● Includes high availability, live migration, storage management, system scheduler, and more.

● Come to the oVirt workshop on June 8th

oVirt

Page 41: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

41

Coming soon● Virtio-net multiqueue (queue per guest

virtual CPU)

● Guest memory hot plug

● EPT Access and Dirty bit ● Important for KSM scanning

mechanism● Needed to choose which guest pages

are candidate for swap out

Page 42: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

42

Coming soon● QCOW2 format extensions

● Qemu 1.1 has some basic support ● zero clusters for keeping images

sparse with copy-on-read/image streaming

● It must be enabled explicitly during image creation (-o compat=1.1)

● Images that use this new version cannot be read by older Qemu versions.

Page 43: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

43

Weather isCloudy

with a chance oftotal world domination

Page 44: Weather Report...Weather Report June 2012 2 Agenda What is KVM Performance Networking Block RAS Desktop Cloud 3 KVM Architecture userspace kernel 4 Why reinvent the wheel? Focus on

44