Virtualization Architecture & KVM

Post on 21-Feb-2017

684 views 3 download

Transcript of Virtualization Architecture & KVM

devconf.cz 2014

Virtualization Architecture & KVM

Pradeep Kumar Surisetty < psuriset@redhat.com>

Principal Software Engineer

Why we believe KVM is the best virtualization platform

PerformanceKVM holds the Top 6/11 virtual machine consolidation scores on SPECvirt (1)

SecurityEAL4+ Certification (3)

plus SE Linux enabling Mandatory Access Control between virtual machines

Lower Costcustomers report up to

70% savings by using KVM (2)

Cloud & Virtualization ManagementRed Hat Open Stack for Cloud Virtualization and Red Hat Enterprise Virtualization for data-center Virtualization

(1) Source: SpecVirt_sc2010 results: http://www.spec.org/virt_sc2010/results/specvirt_sc2010_perf.html (2) Source: Case study on Canary Islands Government migration from VMware to RHEV:

http://www.redhat.com/resourcelibrary/case-studies/canary-islands-government-migrates-telecommunications-platform-from-vmware-to-red-hat

(3) Source: http://www.redhat.com/solutions/industry/government/certifications.html(4) Source: http://www.redhat.com/resourcelibrary/articles/enterprise-linux-virtualization-support

Cross PlatformSupport and certification for leading x86_64 operating systems

including RHEL and

Microsoft Windows (4)

VMware ESX 4.1 HP DL380 G7 (12 Cores, 78 VMs)

RHEL 6 (KVM) IBM HS22V (12 Cores, 84 VMs)

VMware ESXi 5.0 HP DL385 G7 (16 Cores, 102 VMs)

RHEV 3.1 HP DL380p gen8 (16 Cores,150 VMs)

VMware ESXi 4.1 HP BL620c G7 (20 Cores, 120 VMs)

RHEL 6 (KVM) IBM HX5 w/ MAX5 (20 Cores, 132 VMs)

VMware ESXi 4.1 HP DL380 G7 (12 Cores, 168 Vms)

VMware ESXi 4.1 IBM x3850 X5 (40 Cores, 234 VMs)

RHEL 6 (KVM) HP DL580 G7 (40 Cores, 288 VMs)

RHEL 6 (KVM) IBM x3850 X5 (64 Cores,336 VMs)

RHEL 6 (KVM) HP DL980 G7 (80 Cores, 552 VMs)

0

1,000

2,000

3,000

4,000

5,000

6,000

7,000

8,000

9,000

10,000

1,221 1,367 1,570

2,4421,878

2,144

2,742

3,824

4,682

5,467

8,956

Best SPECvirt_sc2010 Scores by CPU Cores

(As of May 30, 2013)

System

SP

EC

virt

_sc

20

10

sco

re

Comparison based on best performing Red Hat and VMware solutions by cpu core count published at www.spec.org as of May 17, 2013. SPEC® and the benchmark name SPECvir_sct® are registered trademarks of the Standard Performance Evaluation Corporation. For more information about SPECvirt_sc2010, see www.spec.org/virt_sc2010/.

2-socket 162-socket 12

2-socket 20

4-socket 40

8-socket 64/80

Introducing KVM virtualizationKVM hypervisor runs virtual machines on Linux hosts

➢ Mature on x86, recent progress on ARM and ppc

Most popular and best supported hypervisor on OpenStack

➢ https://wiki.openstack.org/wiki/HypervisorSupportMatrix

Built in to Red Hat Enterprise Linux➢ Qumranet startup created KVM, joined Red Hat in 2008

Virtualization goals

How to Virtualize CPU? How to Virutalize Memory? How to Virtualize IO?

KVM I/O Architecture

KernelKernel

rxtx

QEMUQEMU

Virtual MachineVirtual Machine

Tap

Bridge

KernelKernel

QEMUQEMU

Virtual MachineVirtual Machine

Bridge

Tap

tx rx

vhost

KernelKernel

tx rx

Virtual MachineVirtual Machine

QEMUQEMU

Physical NIC

Emulated Devices

● Native drivers

● Compatibility over performance

Virtio Devices

● Paravirtualized

● Performance over compatibility

Device Assignment

● Native drivers

● Compatibility and Performance

Full virtualization Para-virtualization

Storage transport choices in KVM

devconf.cz 2016

Storage transport choices in KVM

● Full virtualization : IDE, SATA, SCSI● Good guest compatibility● Lots of trap-and-emulate, bad performance

● Para virtualization: virtio-blk, virtio-scsi ● Efficient guest ↔ host communication through virtio ring buffer

(virtqueue)● Good performance● Provide more virtualization friendly interface, higher

performance.● In AIO case, io_submit() is under the global mutex

devconf.cz 2016

Storage transport choices in KVM

● Device assignment (Passthrough)● Pass hardware to guest, high-end usage, high performance● Limited Number of PCI Devices● Hard for Live Migration

devconf.cz 2016

Virt-Manager

Special Thanksto

Andrew TheurerStefan Hajnoczj

Thanks

Irc: #psuriset

Blog: psuriset.com

● Handles all management and interaction with QEMU

● (VMs) are defined in Libvirt via XML; referred to a “domain”

● Translates XML to command line options for calling QEMU

● Become comfortable with ‘virsh’

● Libvirt XML reference: http://tinyurl.com/libvirt-xml

Libvirt API

KVM I/O Architecture

KernelKernel

rxtx

QEMUQEMU

Virtual MachineVirtual Machine

Tap

Bridge

KernelKernel

QEMUQEMU

Virtual MachineVirtual Machine

Bridge

Tap

tx rx

vhost

KernelKernel

tx rx

Virtual MachineVirtual Machine

QEMUQEMU

Physical NIC

Emulated Devices

● Native drivers

● Compatibility over performance

Virtio Devices

● Paravirtualized

● Performance over compatibility

Device Assignment

● Native drivers

● Compatibility and Performance