+ All Categories
Home > Documents > The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt...

The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt...

Date post: 30-Mar-2018
Category:
Upload: dinhdat
View: 229 times
Download: 2 times
Share this document with a friend
39
1 The KVM Weather Report Jes Sorensen <[email protected]> LinuxCon Japan, June 1 st 2011
Transcript
Page 1: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

1

The KVM Weather Report

Jes Sorensen <[email protected]>LinuxCon Japan, June 1st 2011

Page 2: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

2

Agenda

Foundation for Cloud

Future

Virtualization Overview

Page 3: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

3

Virtualization Overview: History

1967 IBM CP-40 1972 Goldberg Arch Principles for VCS

2006 libvirt launched 2007 KVM integrated into Linux 2.6.20

2011 KVM goes to 110

2

4

6

8

10

12

KVM goes to 11

Page 4: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

4

Virtualization Overview: History

Page 5: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

5

Virtualization Overview: KVM TodayNative vs. Virtualized: 1% Overhead in KVM

SAP Linux Certification SuiteCPU intensive reports phaseRHEL 6 + KVM and Intel E7-8800

Page 6: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

6

KVM: The Kernel-based Virtual Machine

Page 7: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

7

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

sVirtSVVP & WHQL

PCI Device Assignment

Live snapshot

TransparentHuge Pages

Native Windowsdrivers

Page 8: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

8

Why reinvent the wheel?

Focus on virtualization.

Page 9: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

9

KVM Architecture

Page 10: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

10

KVM Architecture

Page 11: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

11

KVM Architecture

Page 12: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

12

KVM in the Real World

● RAS

● Security Isolation

● Resource management

● Performance improvements● CPU, Block, Net, Memory

● SPECvirt

Page 13: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

13

RAS

● timekeeping

● QMP, qdev, VMState, SeaBIOS

● vmchannel

● stable guest HW ABI● machine type● stable PCI topology

● PCI Device Assignment improvements

● Live migration with large memory guests

Page 14: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

14

Isolation: sVirt Security (or similar w/ AppArmour)

● Applying security labels to individual guest virtual machines and their resources

● Guest Isolation achieved withSELinux Mandatory AccessControls (MAC)

● Protect against untrustedGuest VM

● Protect against Hostmisconfiguration

● Prevents unauthorizedaccess of Guests/Host

● Builds on existing, provensecurity mechanisms & controls

Page 15: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

15

Isolation: Resource Management

Virt Guest A50% CPU50% Mem

Virt Guest B25% CPU25% Mem

Application Z25% CPU25% Mem

Network40% net 40% net 20% net

60% 20%20% I/O

Storage

● Control Group (Cgroups) for CPU/Memory/Network/Disk

● Benefit: guarantee Quality of Service

● Ideal for: Virtualization/Cloud deployments

Page 16: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

16

● Scale to 64 vcpus! And same pcpu scaling as Linux

● Guest spin lock-holder preemption sol'n

● KVM efficiency● User return notifiers...get lazier

● x2apic● Use MSR access to limit mmio accesses to the irq chip

KVM: CPU Performance

Page 17: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

17

Performance: SMP Scalability

1-cpu 4-cpu 8-cpu 16-cpu 32-cpu 64-cpu0

10000

20000

30000

40000

50000

60000

70000

80000

64 CPU Scalability - Stream BenchmarkIntel EX 64-cpu, 128GB, FC

RHEL 6 PhysicalRHEL 6 Virtual

Mem

ory

BW

(M

B/s

ec)

Excellent, linear scalability; minimal virtualization overhead

Note: With this h/w, at 32 CPUs socket bandwidth is saturated

Page 18: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

18

KVM Block Architecture

Page 19: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

19

KVM: Block Performance

● qemu vectored I/O (preadv/pwritev) and native AIO

● virtio● flush + fua● MSI support● ioeventfd

● qcow2 cache

Page 20: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

20

KVM Performance – RHEL6 aio=native Win2k8 Intel 24cpu, 64GB, FC IOmeter

2k 4k 8K 16K 32K 64K0

50

100

150

200

250

300

350

400

450

IO - Sequential Reads

r5kvm r6aio_native metal

MB

/se

c

2k 4k 8K 16K 32K 64K0

10

20

30

40

50

60

70

80

90

100

CPU - Sequential Reads

r5kvm r6aio_native metal

%C

PU

Page 21: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

21

KVM Performance – RHEL6 aio=native Win2k8 Intel 24cpu, 64GB, FC IOmeter

2k 4k 8K 16K 32K 64K0

10

20

30

40

50

60

70

80

90

100

CPU - Sequential Writes

r5kvm r6aio_native metal

%C

PU

2k 4k 8K 16K 32K 64K0

50

100

150

200

250

300

350

400

IO - Sequential Writes

r5kvm r6aio_native metal

MB

/se

c

Page 22: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

22

KVM Network Architecture

Page 23: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

23

Performance: Networking● vhost-net

● virtio backend in kernel● transparent to guest● reduce latency● better throughput● lower CPU consumption

● SR-IOV for near native performance

● VEPA/VNLink

Page 24: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

24

virtio network architecture – detail

Page 25: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

25

vhost_net Efficiency

32 64128

256512

10242048

40928192

1638432768

655070

50

100

150

200

250

300

350

400

8 Guest Scale Out RX Vhost vs Virtio - % Host CPU

Mbit per % CPU netperf TCP_STREAM

VhostVirtio

Message Size (Bytes)

Mb

it /

% C

PU

(b

igge

r is

be

tte

r)

Page 26: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

26

Latency comparison – RHEL 6

1 64765

61478 21 35125

195384

10272048

409312288

2457332771

655360

50

100

150

200

250

300

350

400

Network Latency by guest interface method

Guest Receive (Lower is better)

host RX virtio RX vhost RX SR-IOV RXMessage Size (Bytes)

La

ten

cy (

use

cs)

Page 27: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

27

Performance: Memory

● Transparent Huge Pages● Benefit for bare metal apps (4.2%)● Huge benefit for KVM VMs (25%)

● KSM working with THP

Page 28: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

28

Performance

What does it add up to?

Page 29: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

29

SPECvirt

Page 30: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

30

SPECvirt_sc2010 results*

RHEL 5.5 (KVM) IBM X3650 M3 (12 cores, 144GB, 12 tiles)

VMware ESX 4.1 HP DL380 G7 (12 cores, 192GB, 13 tiles)

RHEL 6 (KVM) IBM HS22V (12 cores, 288GB, 14 tiles)

RHEL 5.5 (KVM) IBM x3690 X5 (16 cores, 512GB, 14 tiles)

RHEL 6 (KVM) IBM x3690 X5 (16 cores, 1TB, 18 tiles)

VMware ESX 4.1 U1 HP BL620c G7 (20 cores, 512GB, 19 tiles)

RHEL 6.1 (KVM) HP BL620c G7 (20 cores, 512GB, 19 tiles)

VMware ESXi 4.1 Bull SAS (32 cores, 512GB, 28 tiles)

VMware ESXi 4.1 IBM x3850 x5 (32 cores, 1TB, 28 tiles)

VMware ESX 4.1 HP DL580 G7 (40 cores, 1TB, 38 tiles)

RHEL 6 (KVM) IBM x3850 X5 (64 cores, 2TB, 56 tiles)

RHEL 6 (KVM) IBM x3850 X5 (80 cores, 2TB, 72 tiles)

0

1000

2000

3000

4000

5000

6000

7000

8000

1169 1221 1367 13691763 1811 1820

2721 2742

3723

5466

7067

*As of May 4, 2011. See http://www.spec.org/virt_sc2010 for details

Page 31: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

31

Agenda

Foundation for Cloud

Future

Virtualization Overview

Page 32: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

32

Cloud

● Computing as a Service (Anything as a Service)

● Utility model

● Self provisioning

● Dynamic resources

Page 33: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

33

KVM in Cloud

● Increase density

● Improve efficiency

● Multi-tenancy (security, isolation)

Page 34: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

34

KVM Is The Cloud

Page 35: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

35

Agenda

Foundation for Cloud

Future

Virtualization Overview

Page 36: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

36

Roadmap

● Scaling and performance

● NUMA

● Lock holder preemption

● Zero copy networking

● Multiqueue virtio-net

● Debugging and profiling

● Further cgroup integration

● virt-agent (guest agents)

● QCOW2 performance

● Multi-tenant network isolation

● Memory management (async page faults, hinting, compcache)

● USB 2.0 support

● Performance Monitoring Unit (PMU) support

Weather forecast...

Page 37: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

37

KVM development activity

2.6.20 2.6.21 2.6.22 2.6.23 2.6.24 2.6.25 2.6.26 2.6.27 2.6.28 2.6.29 2.6.30 2.6.31 2.6.32 2.6.33 2.6.34 2.6.35 2.6.36 2.6.37 2.6.38 2.6.390

50

100

150

200

250

300

350

KVM commits per release

Release

Co

mm

its

Page 38: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

38

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 240

100

200

300

400

500

600

QEMU commits per month

Months since start

Co

mm

its

QEMU development activity

Page 39: The KVM Weather Report - · PDF fileThe KVM Weather Report ... Principles for VCS 2006 libvirt launched 2007 KVM integrated into Linux 2.6.20 ... RHEL 6 + KVM and Intel E7-8800. 6

39

Cloudy with a chance of

total world domination


Recommended