VM Migration, Containers (Lecture 12, cs262a)

Similar documents
Virtual Machines Disco and Xen (Lecture 10, cs262a) Ion Stoica & Ali Ghodsi UC Berkeley February 26, 2018

Live Migration of Virtual Machines

Live Virtual Machine Migration with Efficient Working Set Prediction

Chapter 5 C. Virtual machines

Live Migration of Virtualized Edge Networks: Analytical Modeling and Performance Evaluation

Spring 2017 :: CSE 506. Introduction to. Virtual Machines. Nima Honarmand

24-vm.txt Mon Nov 21 22:13: Notes on Virtual Machines , Fall 2011 Carnegie Mellon University Randal E. Bryant.

COMPUTER ARCHITECTURE. Virtualization and Memory Hierarchy

Live Migration of Direct-Access Devices. Live Migration

Virtual machine architecture and KVM analysis D 陳彥霖 B 郭宗倫

Performance Evaluation of Virtualization Technologies

University of Alberta. Zhu Pang. Master of Science. Department of Computing Science

CS370 Operating Systems

references Virtualization services Topics Virtualization

Enhanced Live Migration of Virtual Machine Using Comparison of Modified and Unmodified Pages

Lecture 5: February 3

Module 1: Virtualization. Types of Interfaces

Preserving I/O Prioritization in Virtualized OSes

Background. IBM sold expensive mainframes to large organizations. Monitor sits between one or more OSes and HW

Virtualization. Pradipta De

Unify Virtual and Physical Networking with Cisco Virtual Interface Card

Dirty Memory Tracking for Performant Checkpointing Solutions

OS Virtualization. Linux Containers (LXC)

Transparent Throughput Elas0city for IaaS Cloud Storage Using Guest- Side Block- Level Caching

Virtual Memory. Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University

Operating Systems 4/27/2015

Lecture 7. Xen and the Art of Virtualization. Paul Braham, Boris Dragovic, Keir Fraser et al. 16 November, Advanced Operating Systems

Advanced Operating Systems (CS 202) Virtualization

What s New in VMware vsphere 4.1 Performance. VMware vsphere 4.1

Xen and the Art of Virtualization

An Integration and Load Balancing in Data Centers Using Virtualization

Live Migration: Even faster, now with a dedicated thread!

Dynamic Translator-Based Virtualization

CS 326: Operating Systems. CPU Scheduling. Lecture 6

CloudAP: Improving the QoS of Mobile Applications with Efficient VM Migration

1 Virtualization Recap

Virtualization. Starting Point: A Physical Machine. What is a Virtual Machine? Virtualization Properties. Types of Virtualization

Containerizing GPU Applications with Docker for Scaling to the Cloud

[Docker] Containerization

Virtualization. ! Physical Hardware Processors, memory, chipset, I/O devices, etc. Resources often grossly underutilized

Server Virtualization Approaches

What is KVM? KVM patch. Modern hypervisors must do many things that are already done by OSs Scheduler, Memory management, I/O stacks

Power Efficiency of Hypervisor and Container-based Virtualization

CSC 5930/9010 Cloud S & P: Virtualization

ReVirt: Enabling Intrusion Analysis through Virtual Machine Logging and Replay

MultiLanes: Providing Virtualized Storage for OS-level Virtualization on Many Cores

Virtualization and memory hierarchy

Chapter 5 (Part II) Large and Fast: Exploiting Memory Hierarchy. Baback Izadi Division of Engineering Programs

Virtual Virtual Memory

Virtual Machine Systems

Real-Time Cache Management for Multi-Core Virtualization

Comparative Analysis on Docker and Virtual Machine in Cloud Computing

CS533 Concepts of Operating Systems. Jonathan Walpole

Multiprocessor Scheduling. Multiprocessor Scheduling

Container Adoption for NFV Challenges & Opportunities. Sriram Natarajan, T-Labs Silicon Valley Innovation Center

Bacula Systems Virtual Machine Performance Backup Suite

Research Article TSMC: A Novel Approach for Live Virtual Machine Migration

Virtualization Overview NSRC

CS370 Operating Systems

CLOUD COMPUTING IT0530. G.JEYA BHARATHI Asst.Prof.(O.G) Department of IT SRM University

Virtualization. Dr. Yingwu Zhu

LINUX Virtualization. Running other code under LINUX

PAGE REPLACEMENT. Operating Systems 2015 Spring by Euiseong Seo

Virtualization. Michael Tsai 2018/4/16

CHAPTER 16 - VIRTUAL MACHINES

Multi-Hypervisor Virtual Machines: Enabling An Ecosystem of Hypervisor-level Services

The Architecture of Virtual Machines Lecture for the Embedded Systems Course CSD, University of Crete (April 29, 2014)

LINUX CONTAINERS. Where Enterprise Meets Embedded Operating Environments WHEN IT MATTERS, IT RUNS ON WIND RIVER

CHAPTER 16 - VIRTUAL MACHINES

How Container Runtimes matter in Kubernetes?

Virtualizaton: One Size Does Not Fit All. Nedeljko Miljevic Product Manager, Automotive Solutions MontaVista Software

OS Virtualization. Why Virtualize? Introduction. Virtualization Basics 12/10/2012. Motivation. Types of Virtualization.

Parallels Virtuozzo Containers

CS162 Operating Systems and Systems Programming Lecture 11 Page Allocation and Replacement"

Parallels Virtuozzo Containers

A three phase optimization method for precopy based VM live migration

HY225 Lecture 12: DRAM and Virtual Memory

Performance Evaluation of Live Migration based on Xen ARM PVH for Energy-efficient ARM Server

Knut Omang Ifi/Oracle 6 Nov, 2017

IBM Bluemix compute capabilities IBM Corporation

The Continuity of Out-of-band Remote Management Across Virtual Machine Migration in Clouds

CS 350 Winter 2011 Current Topics: Virtual Machines + Solid State Drives

QuartzV: Bringing Quality of Time to Virtual Machines

NIC TEAMING IEEE 802.3ad

Virtualizing the Locomotive: Ready, Set, Go!

The Challenges of X86 Hardware Virtualization. GCC- Virtualization: Rajeev Wankar 36

for Kerrighed? February 1 st 2008 Kerrighed Summit, Paris Erich Focht NEC

2012 Seventh International Conference on P2P, Parallel, Grid, Cloud and Internet Computing

Xen and the Art of Virtualization. Nikola Gvozdiev Georgian Mihaila

Virtual Leverage: Server Consolidation in Open Source Environments. Margaret Lewis Commercial Software Strategist AMD

An introduction to Docker

Nested Virtualization and Server Consolidation

Πποχωπημένη Κατανεμημένη Υπολογιστική

Agenda. What are we looking at? Introduction. Aim of the project. IP Routing

Deployment Patterns using Docker and Chef

A Fast and Iterative Migration for GPU Applications

Dr. Song Fu 3/22/2010

Keywords: disk throughput, virtual machine, I/O scheduling, performance evaluation

Cloud Computing Virtualization

Deploying Application and OS Virtualization Together: Citrix and Virtuozzo

Transcription:

VM Migration, Containers (Lecture 12, cs262a) Ali Ghodsi and Ion Stoica, UC Berkeley February 28, 2018 (Based in part on http://web.eecs.umich.edu/~mosharaf/slides/eecs582/w16/021516-junchenglivemigration.pptx)

Today s Paper Live Migration of Virtual Machines, C. Clark, K. Fraser, S. Hand, J. Hansen, E. Jul, C. Limpach, I. Pratt, A. Warfield, NSDI 05 An Updated Performance Comparison of Virtual Machines and Linux Containers, Wes Felter, Alexandre Ferreira, Ram Rajamony, Juan Rubio

VMWare history Started by creators of Disco Mendel Rosemblum (Stanford University) Initial product: provide VMs for developers to aid with development and testing Can develop & test for multiple OSes on the same box Actual, killer product: server consolidation Enable enterprises to consolidate many lightly used services/systems Cost reduction, easier to manage Eventually over 90% of VMWare s revenue

Migration Motivation Server becomes overloaded Multiple VMs on same server are heavily used Load balance the load (e.g., multiple web servers running in VMs) Maintenance: update the configuration of a machine Change/upgrade HDD Upgrade guest OS (e.g., Xen) Thus, need to migrate VMs on a different machine

Why VM instead of Process migration? Avoid complex dependencies between processes and local services Separation of concerns between users and operators Users can fully control the software within their VMs Operators don t care about what s inside the VM

Live VM Migration Move VMs across distinct physical hosts transparently Little or no downtime for running services Services unaware about migration, e.g., Maintain network connectivity of the guest OS VM is treated as a black box

Challenges Minimize service downtime Minimize migration duration Avoid disrupting running service Source Host.V.BI.V.X SV N H M D L Destination Host Storage

Handling Resources during Migration Open network connections Keep IP addresses while migrating VM Use ARP (Address Resolution Protocol) to map IP to new host MAC Broadcast ARP new routing information Some routers might ignore to prevent spoofing Local storage However, guest OS aware of migration can avoid this problem Assume Network Attached Storage

Handling Resources during Migration Virtual Machine Virtual Machine Source Destination

Migration Techniques Phase service downtime migration duration push - - stop-and-copy longest shortest pull (demand) shortest longest Pre-copy: bounded iterative push phase, plus very short stop-and-copy phase Careful to avoid service degradation

Design Overview

Migrate Writable Working Sets Transfer memory pages that are subsequently modified Good candidates for push phase: pages seldom or never modified. Writeable working set (WWS): Pages are written often, and should best be transferred via stop-and-copy WWS behavior WWS varies significantly between different sub-benchmarks Migration results depend on workload and when migration happens

Challenge: Migrate Writable Working Sets Transfer memory pages that are subsequently modified Good candidates for push phase: Pages seldom or never modified. Writeable working set (WWS): Pages are written often, and should best be transferred via stop-and-copy WWS behavior WWS varies significantly between different sub-benchmarks Migration results depend on workload and when migration happens

Managed & Self migration Managed migration Performed by a migration daemon running in management VM Self migration Within migratee OS; a small stub required on destination host Difference Managed Self Track WWS Stop-and-copy shadow page table + bitmap suspend OS to obtain a consistent checkpoint bitmap + a spare bit in PTE two-stage stop-and-copy, ignore page updates in last transfer

Managed Migration (1/2) Use shadow page table to track dirty pages in each push round 1. Xen inserts shadow pages under guest OS 2. Shadow pages are marked read-only 3. If OS tries to write to a page, resulting page fault is trapped by Xen. 4. Xen checks OS's original page table and forwards appropriate write permission 5. Simultaneously, Xen marks page as dirty in bitmap.

Managed Migration (2/2) At the beginning of next push round Last round s bitmap is copied, Xen s bitmap is cleared Shadow pages are destroyed and recreated, all write permissions lost

Self Migration Most implementation within OS being migrated (source machine) Migration stub must run on destination machine Listen for incoming migration requests, create an app Pre-copying scheme similar Challenge: transfer a consistent OS checkpoint Cannot suspend migratee (as it is doing migration!)

Logically OS Checkpointing 1. Disables all OS activity except for migration Final scan of dirty bitmap; clear bit as each page is transferred. Pages dirtied during final scan, copied to a shadow buffer 2. Transfer the contents of the shadow buffer Page updates are ignored during this transfer.

Dynamic Rate Limiting downtime Performance Tradeoff: More network bandwidth less downtime Less network bandwidth more impact on running services Dynamically adapt bandwidth limit during each push round - Set a min and a max bandwidth limit, begin with the min limit bandwidth )*+, = dirty rate 67889:; + constant increment dirty rate BCDD*), = dirty pages/duration When terminate push, and switch to stop-and-copy? dirty rate 67889:; > bandwidth LM+ dirty pages < threshold (e.g., 256 KB)

Evaluation-simple web server Migration starts A highly loaded server with relative small WWS Controlled impact on live services Short downtime

Evaluation-rapid page dirtying Stop-and-copy In the third round, the transfer rate is scaled up to 500Mbit/s (max) Switch to stop-and-copy, resulting in 3.5s downtime Diabolical workload may suffer considerable service downtime

Conclusion OS-level live migration Pre-copy: iterative push and short stop-and-copy Dynamically adapting network-bandwidth - Balance service downtime and service performance degradation Minimize service downtime and impact on running service

VMs vs Containers

Linux Containers (LXC) Linux kernel provides the control groups (cgroups) functionality Allows limitation and prioritization of resources (CPU, memory, block I/O, network, etc) namespace isolation functionality Allows complete isolation of an applications' view of the OS, e.g., Process trees Networking User IDs Mounted file systems.

LXC Features Runs in the user space Own process space Own network interface Own /sbin/init (coordinates the rest of the boot process and configures the environment for the user) Run stuff as root Share kernel with the host No device emulation

Near-zero overhead Processes are isolated, but run straight on host CPU performance = native performance Memory performance = a few % for (optional) accounting Network performance = small overhead; can be reduced to zero

Docker Standard format for containers Allows to create and share images Standard, reproducible way to easily build trusted images (Dockerfile) Public repository of Docker images https://hub.docker.com/

Kernel-based VM Hypervisor embedded in the Linux kernel itself Every VM is a regular Linux process, scheduled by Linux scheduler KVM makes use of hardware virtualization to virtualize processor states KVM supports live migration

Network Configuration

TCP bulk transfer efficiency

Random I/O Throughput

Random read latency CDF

MySQL Throughput vs. Concurrency

MySQL Throughput vs. Concurrency

Summary KVM performance has improved considerably since its creation Leverage virtualization support in modern processors Docker not without overhead E.g., NAT introduces overhead for workloads with high packet rates Bad news for containers? Containers started with near-zero overhead so no room to improve!