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



Similar documents
Real-Time Virtualization How Crazy Are We?

Real-time KVM from the ground up

Enhancing Hypervisor and Cloud Solutions Using Embedded Linux Iisko Lappalainen MontaVista

KVM in Embedded Requirements, Experiences, Open Challenges

Architecture of the Kernel-based Virtual Machine (KVM)

KVM Architecture Overview

2972 Linux Options and Best Practices for Scaleup Virtualization

The QEMU/KVM Hypervisor

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

Advanced Computer Networks. Network I/O Virtualization

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

How Linux kernel enables MidoNet s overlay networks for virtualized environments. LinuxTag Berlin, May 2014

Network Virtualization Technologies and their Effect on Performance

State of the Art Cloud Infrastructure

What s new in Hyper-V 2012 R2

Enabling Technologies for Distributed Computing

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

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

KVM, OpenStack, and the Open Cloud

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

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

Enterprise-Class Virtualization with Open Source Technologies

RCL: Design and Open Specification

virtio-vsock Zero-configuration host/guest communication Stefan Hajnoczi KVM Forum 2015 KVM FORUM 2015 STEFAN HAJNOCZI

Technical Paper. Moving SAS Applications from a Physical to a Virtual VMware Environment

Developing tests for the KVM autotest framework

Exploiting The Latest KVM Features For Optimized Virtualized Enterprise Storage Performance

Simplifying Big Data Deployments in Cloud Environments with Mellanox Interconnects and QualiSystems Orchestration Solutions

Beyond the Hypervisor

KVM, OpenStack, and the Open Cloud

Benchmarking Virtual Switches in OPNFV draft-vsperf-bmwg-vswitch-opnfv-00. Maryam Tahhan Al Morton

RCL: Software Prototype

Virtualization Technologies and Blackboard: The Future of Blackboard Software on Multi-Core Technologies

Enabling Technologies for Distributed and Cloud Computing

Best Practices for Monitoring Databases on VMware. Dean Richards Senior DBA, Confio Software

OpenStack Enhancements to Support NFV Use Cases Steve Gordon, Red Hat Adrian Hoban, Intel Alan Kavanagh, Ericsson

Ubuntu OpenStack on VMware vsphere: A reference architecture for deploying OpenStack while limiting changes to existing infrastructure

Masters Project Proposal

Scaling in a Hypervisor Environment

KVM Virtualized I/O Performance

Deploying Extremely Latency-Sensitive Applications in VMware vsphere 5.5

Operating Systems Virtualization mechanisms

Virtualised MikroTik

KVM & Memory Management Updates

Virtualization and Performance NSRC

SUSE Linux Enterprise 10 SP2: Virtualization Technology Support

CON9577 Performance Optimizations for Cloud Infrastructure as a Service

Hypervisor Competitive Differences: Beyond the Data Sheet. Chris Wolf Senior Analyst, Burton Group

Chapter 14 Virtual Machines

Developing a dynamic, real-time IT infrastructure with Red Hat integrated virtualization

RED HAT ENTERPRISE VIRTUALIZATION

Intro to Virtualization

Hyper-V Networking. Aidan Finn

With Red Hat Enterprise Virtualization, you can: Take advantage of existing people skills and investments

Performance tuning Xen

International Journal of Computer & Organization Trends Volume20 Number1 May 2015

Windows Server 2008 R2 Hyper-V Live Migration

Developing Linux inside QEMU/KVM Virtual Machines

Cloud Operating Systems for Servers

PERFORMANCE ANALYSIS OF KERNEL-BASED VIRTUAL MACHINE

Introduction to Virtualization & KVM

MODULE 3 VIRTUALIZED DATA CENTER COMPUTE

Deploying Baremetal Instances with OpenStack

Virtualization possibilities in MikroTik RouterOS

Cloud Server. Parallels. An Introduction to Operating System Virtualization and Parallels Cloud Server. White Paper.

Nested Virtualization

Solution Brief Availability and Recovery Options: Microsoft Exchange Solutions on VMware

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

OpenStack, OpenDaylight, and OPNFV. Chris Wright Chief Technologist Red Hat Feb 3, CHRIS WRIGHT OpenStack, SDN and NFV

ZEN LOAD BALANCER EE v3.04 DATASHEET The Load Balancing made easy

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

KVM KERNEL BASED VIRTUAL MACHINE

QuickSpecs. HP Integrity Virtual Machines (Integrity VM) Overview. Currently shipping versions:

Performance Testing of a Cloud Service

PARALLELS CLOUD SERVER

PARALLELS CLOUD SERVER

VMware vsphere-6.0 Administration Training

Version 3.7 Technical Whitepaper

Copyright 1

ovirt self-hosted engine seamless deployment

Dynamic Load Balancing of Virtual Machines using QEMU-KVM

Virtualization Performance on SGI UV 2000 using Red Hat Enterprise Linux 6.3 KVM

Nutanix NOS 4.0 vs. Scale Computing HC3

Virtualization: Know your options on Ubuntu. Nick Barcet. Ubuntu Server Product Manager

KVM: Kernel-based Virtualization Driver

VMWARE WHITE PAPER 1

A quantitative comparison between xen and kvm

An Introduction to OpenStack and its use of KVM. Daniel P. Berrangé

VIRTUALIZATION 101. Brainstorm Conference 2013 PRESENTER INTRODUCTIONS

Programmable Networking with Open vswitch

Cloud Computing with Red Hat Solutions. Sivaram Shunmugam Red Hat Asia Pacific Pte Ltd.

evm Virtualization Platform for Windows

Parallels Virtuozzo Containers

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

Security Overview of the Integrity Virtual Machines Architecture

Rackspace Cloud Databases and Container-based Virtualization

Google

Transcription:

Siemens Corporate Technology August 2015 Real-Time KVM for the Masses Unrestricted Siemens AG 2015. All rights reserved

Real-Time KVM for the Masses Agenda Motivation & requirements Reference architecture Compute node setup Open Stack adaptions Summary & outlook Page 2 August 2015 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2015. All rights reserved

Real-Time Virtualization Drivers Communication systems (media streaming & switching, etc.) Trading systems (stocks, goods, etc.) Control systems (industry, healthcare, transportation, etc.) => Consolidation => Hardware standardization => Simpler maintenance => Fast fail-over Images: Ethernet switch by Ben Stanfield, licensed under CC BY-SA 2.0, stock market by Katrina.Tuliao, licensed under CC BY 2.0 Page 3 August 2015 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2015. All rights reserved

Real-Time KVM is working! Can I have it in the cloud? Page 4 August 2015 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2015. All rights reserved

Real-Time Clouds? No Problem! Oh, you wanna do I/O as well... Page 5 August 2015 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2015. All rights reserved

Real-Time Connectivity Required Page 6 August 2015 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2015. All rights reserved

Realistic Deployments Requirement: Fast enough links to close loops in time Data acquisition (physical world input) Transfer to VM Data processing ( in VM on RT-KVM) Transfer back Data application (physical world output) That means Private cloud / data center / server cluster close to physical process RT VMs will require access to special networks Isolated standard networks Real-time Ethernets Field buses Page 7 August 2015 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2015. All rights reserved

Confining the Real-Time Scope No QEMU in the loop (feasible but much harder) No RT disks (no use case yet, non-deterministic backends) I/O via Ethernet (common denominator) No device pass-through (feasible but complex) No live migration while RT-operational (out of reach so far) The reduced RT bill of material RT CPUs RT network Page 8 August 2015 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2015. All rights reserved

Management Layers Moving from the lab... Hand-crafted deployments & starter scripts Individual hosts Some dozen VMs per host...into the data center Hundreds of VMs, both RT and non-rt Many networks, also both RT and non-rt Flexible management and accounting models Cloud-grade, RT-capable managements stack required => OpenStack Broadly used for private clouds Good integration with KVM Page 9 August 2015 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2015. All rights reserved

Reference Architecture RT Guest Nova EMU Controller Services PREEMPT-RT with KVM Real-time CPUs (isolated) Compute Node Hardware Best-effort CPUs Separate HW or in VM Page 10 August 2015 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2015. All rights reserved

Real-Time Network Access Options Emulation Pass-through Para-virtual devices => virtio Need for RT data plane vhost-net: in host kernel vhost-user: in separate userspace process vhost-user enables more RT tuning DPDK-based switch/router Aggressive polling on interfaces, less event signaling Only irqfd (eventfd) from vhost process to vcpu thread Page 11 August 2015 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2015. All rights reserved

Reference Architecture (with Networking) RT Switch/ Router vhostuser vnic RT Guest EMU Nova Controller Services PREEMPT-RT with KVM pnic Real-time CPUs (isolated) Compute Node Hardware Best-effort CPUs Separate HW or in VM Page 12 August 2015 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2015. All rights reserved

Compute Node Setup PREEMPT-RT as host kernel Configuration and tuning according to https://rt.wiki.kernel.org Tune power management at kernel and also BIOS-level Set up isolcpus for 2 sets vcpu threads RT switch data plane threads Sufficient non-isolated CPUs required Management processes & threads QEMU event threads We use rcu_nocbs == isolcpus so far (but not nohz_full found no relevant impact on worst-case latency) Page 13 August 2015 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2015. All rights reserved

Compute Node Setup (2) Think about RT thread throttling /proc/sys/kernel/sched_rt_period_us /proc/sys/kernel/sched_rt_runtime_us May suspend busy RT guests But infinitely looping RT guests can starve the host! isolcpus does not affect IRQ affinities Needs fine tuning via script and/or irqbalanced Even more tuning feasible... But... do your guests need really this? Page 14 August 2015 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2015. All rights reserved

Simplifying the Setup Bad news: Good news: Still lots of tuning... Can be replicated to similar hosts Better news: There is a tooling framework! https://github.com/openenealinux/rt-tools.git partrt - Create real time CPU partitions on SMP Linux Usage: partrt [options] <cmd> partrt [options] create [cmd-options] [cpumask] partrt [options] undo [cmd-options] partrt [options] run [cmd-options] <partition> <command> partrt [options] move [cmd-options] <pid> <partition> partrt [options] list [cmd-options] Uses cgroups + various tricks, avoids isolcpus (=> no reboot) Pending full evaluation, seems reusable so far Page 15 August 2015 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2015. All rights reserved

RT-KVM Control via libvirt libvirt only executing higher layers' commands, no own policies All required controls upstream since 1.2.13 For RT-vCPUs Pinning Scheduling parameters setting (policy, priority) Memory locking For RT networks QEMU settings to allow sharing of guest RAM with vhost-user process Connecting VM NICs to specific vhost-user ports (identification via socket path) Page 16 August 2015 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2015. All rights reserved

OpenStack Support for Real-Time Nova Compute Several pieces already available vcpu pinning pcpu dedication RT Blueprint under discussion (https://review.openstack.org/#/c/139688 ) Introduces flavor property hw:cpu_realtime Allows tagging of instances and images Requires hw:cpu_policy = dedicated Selects QEMU memory locking vcpu thread policy & priority tuning Deficits Hard-coded and inappropriate policy/priority (RR, prio 1) 2 nd CPU mask required to differentiate between RT and non-rt pcpus Page 17 August 2015 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2015. All rights reserved

Real-Time Nova Compute Status Patches by Sahid Ferdjaoui, Red Hat https://review.openstack.org/#/q/status:open+project:openstack/ nova+branch:master+topic:bp/libvirt-real-time,n,z Implements current blueprint over git master Not accepted for Liberty Blueprint needs to be merged first but window already closed New target: Mitaka Currently integrating Sahid's patches into our deployment Plan to come up with extensions to blueprint and code Page 18 August 2015 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2015. All rights reserved

OpenStack Support for Real-Time Neutron Networking If Neutron shall manage IP assignment for RT networks all done But RT networks tend to be special Network addresses managed by guests or externally Possibly no TCP/IP at all => new network type required Neutron patches work in progress @Siemens Introduce unmanaged networks (IP-free, no DHCP,... ) Agents on compute nodes will report connectivity (availability of specific physical networks) Page 19 August 2015 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2015. All rights reserved

Results? void get_measurements(void); Page 20 August 2015 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2015. All rights reserved

Summary & Outlook Simplify real-time for data centers & similar setups Standardize setup of basic RT scenarios Make RT VMs manageable and accountable Full RT stack of KVM & OpenStack feasible Baseline: PREEMPT-RT Standard QEMU & libvirt Patches for Nova and Neutron required Compute node tuning remains improvable Future work RT PCI device assignment (challenge: IRQ management) Compute node setup using rt-tools/partrt RT device emulation (requires reworked QEMU patches) Page 21 August 2015 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2015. All rights reserved

Any Questions? Thank you! Jan Kiszka <jan.kiszka@siemens.com> Page 22 August 2015 Jan Kiszka, Corporate Technology Unrestricted Siemens AG 2015. All rights reserved