virtualization, resource management and autonomous systems

64
 Virtualization, resource management and autonomous systems Gastón Keller PhD Candidate The University of Western Ontario ICAS 2010

Upload: cameroon45

Post on 17-May-2015

455 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Virtualization, resource management and autonomous systems

   

Virtualization, resource management and autonomous

systems

Gastón KellerPhD Candidate

The University of Western Ontario

ICAS 2010

Page 2: Virtualization, resource management and autonomous systems

   

Overview

● Virtualization

● Uses of virtualization

● Virtualization in data centers

● VM replication

● VM memory management

Page 3: Virtualization, resource management and autonomous systems

   

Overview

● Virtualization● Uses of virtualization

● Virtualization in data centers

● VM replication

● VM memory management

Page 4: Virtualization, resource management and autonomous systems

   

Old Concept

1960s: IBM designed the operating system CP-40/CMS.

Provided VMs that were indistinguishable from real machines by user programs.

Page 5: Virtualization, resource management and autonomous systems

   

Role in Industry

Level of adoption around 20 to 30% (expected to grow another 20%). *

Principal motivations:● cost-cutting● business continuity● server manageability

* Frank Gillett, Forrester Research. Keynote talk at VMware Virtualization Forum 2008.

Page 6: Virtualization, resource management and autonomous systems

   

Taxonomy of VMs

Source: Smith, J. E.; Nair, R.; The Architectures of Virtual Machines.

Page 7: Virtualization, resource management and autonomous systems

   

"(System) Virtualization is a software

technique that enables the

simultaneous execution of multiple

computer systems in one physical

machine."

Definition

Page 8: Virtualization, resource management and autonomous systems

   

Type 1 Hypervisor

Type 2 Hypervisor

Hypervisor

Hardware

Guest OS

Host OSHypervisor

Hardware

Guest OS

Guest OS

Hypervisor-based Virtualization

Page 9: Virtualization, resource management and autonomous systems

   

Interpretsthe code of the guest OSand its applications.

Type 2 Hypervisor

Hypervisor

Hardware

Guest OS

Host OS

Type 2 Hypervisor

Page 10: Virtualization, resource management and autonomous systems

   

It can interpret the code of the guest OS as a Type 2 Hypervisor or use paravirtualization.

Type 1 Hypervisor

Hypervisor

Hardware

Guest OS

Guest OS

Type 1 Hypervisor

Page 11: Virtualization, resource management and autonomous systems

   

Paravirtualization

Hypervisor

Kernel

Application

Ring 0

Ring 1

Ring 2

Ring 3

System call

The guest OS source code is modified to enable communication with the hypervisor.

Hypercall

Page 12: Virtualization, resource management and autonomous systems

   

In 2006, Intel and AMD released CPUs with support for virtualization.

Full-virtualization enables unmodified guest OSes to run in VMs.

However, paravirtualization still offers better performance.

Full-virtualization

Page 13: Virtualization, resource management and autonomous systems

   

Hardware

Guest OS

HW interface lib.

Hypervisor

Hardware

Guest OS

Hypervisor lib.

Evolution of paravirtualization

* Check out paravirt_ops in Linux.

Page 14: Virtualization, resource management and autonomous systems

   

Started as a research project at the University of Cambridge (2003).

Is Open Source Software (which contributed to its success).

Supported by big companies such as IBM, Intel, and Oracle (among others).

Xen

Page 15: Virtualization, resource management and autonomous systems

   

(CPU) Credit Scheduler:● weight value● cap value

Memory:● reservation value● maximum value● minimum value (Dom0)

Resource Management

Page 16: Virtualization, resource management and autonomous systems

   

Resource Management...

Networking:● bridging● routing

To reduce CPU overhead:● dedicated NICs● optimized inter-domain communication channel (Dom0-DomU)

● virtualization aware NICs

Page 17: Virtualization, resource management and autonomous systems

   

Container

OS kernel

Hardware

Privileged Container Container...

Management SW

ApplicationsApplicationsUSER

SPACE

OS-level Virtualization

Page 18: Virtualization, resource management and autonomous systems

   

Provides operating system-level virtualization.

Modified Linux to run multiple, isolated containers.

Basis of Parallels Virtuozzo Containers.

OpenVZ

Page 19: Virtualization, resource management and autonomous systems

   

Advantages:● simple deployment● close to native performance● great scalability

Disadvantage:● only GNU/Linux-based virtual environments

OpenVZ

Page 20: Virtualization, resource management and autonomous systems

   

Organized in two levels:● storage subsystem● CPU scheduler● I/O scheduler

Memory:● User Beancounters (per container)

Resource Management

Page 21: Virtualization, resource management and autonomous systems

   

Overview

● Virtualization

● Uses of virtualization● Virtualization in data centers

● VM replication

● VM memory management

Page 22: Virtualization, resource management and autonomous systems

   

A software image containing a software stack (OS + app.) designed to run inside a virtual machine.

Makes software deployment easier and faster.

BitNami - http://bitnami.org/

VMware - http://www.vmware.com/appliances/

Virtual Appliances

Page 23: Virtualization, resource management and autonomous systems

   

Potential benefits:● resiliency● scaling● system-level portability● observability

Snowflock - http://sysweb.cs.toronto.edu/snowflock

Palacios - http://www.v3vee.org/palacios/

HPC

Page 24: Virtualization, resource management and autonomous systems

   

Virtualization provides Grid Computing with isolated, customized environments.

In addition:● legacy systems● security● flexible resource allocation

Grid Computing

Page 25: Virtualization, resource management and autonomous systems

   

Krsul et al. developed VMPlant Grid service: flexible and efficient resource sharing through virtualization.

Components:● VMShop (front-end)● VMPlants (hosts)

Grid Computing...

Page 26: Virtualization, resource management and autonomous systems

   

Emeneker and Stanzione developedDynamic Virtual Clustering: leverage an institution's clusters computing power through job forwarding and spanning.

VMs provided independence from the platform and encapsulation.

Grid Computing...

Page 27: Virtualization, resource management and autonomous systems

   

Overview

● Virtualization

● Uses of virtualization

● Virtualization in data centers● VM replication

● VM memory management

Page 28: Virtualization, resource management and autonomous systems

   

"A data center is a collection of

computing resources shared by

multiple applications concurrently in

return for payment by the application

providers, on a per-usage basis, to the

data center provider."

Definition

Page 29: Virtualization, resource management and autonomous systems

   

Data Centers

(*) http://scienceblogs.com/goodmath/2009/05/cloud_computing.php

Page 30: Virtualization, resource management and autonomous systems

   

Server Consolidation

(*) http://www.visualpharm.com/

Page 31: Virtualization, resource management and autonomous systems

   

Resource Stress Situations

Page 32: Virtualization, resource management and autonomous systems

   

Virtualization brings benefits to the

data center, but also challenges.

The research literature shows that

unsolved issues are abound...

Challenges

Page 33: Virtualization, resource management and autonomous systems

   

● Resource monitoring

● Algorithms and policies

● Resource management systems

● VM migration process

● Management tools

Challenges...

Page 34: Virtualization, resource management and autonomous systems

   

Wood et al. studied two approaches to monitoring:

● black-box, and● grey-box.

Sandpiper used the data to detect hotspots and migrate VMs.

Resource Monitoring

Page 35: Virtualization, resource management and autonomous systems

   

Gmach et al. studied workload consolidation through VM migration.

Developed:● placement controller, and

➢ (multiple policies)● migration controller.

➢ (multiple thresholds)

Algorithms and Policies

Page 36: Virtualization, resource management and autonomous systems

   

Zhu et al. developed a hierarchy of controllers:

● node controller,● pod controller, and● pod set controller.

Enable client and system admins to focus on policy setting.

Resource Mgmt. Systems

Page 37: Virtualization, resource management and autonomous systems

   

Zhao and Figueiredo analyzed the VM migration process:

● in parallel,● in sequence,● cpu-intensive app.,● mem-intensive app.

Predict time and performance of the VM migration process.

VM migration process

Page 38: Virtualization, resource management and autonomous systems

   

Vallée et al. extended OSCAR, a toolkit for cluster installation, configuration and management.

OSCAR-V enabled deployment and management of host OSes and VMs.

Management Tools

Page 39: Virtualization, resource management and autonomous systems

   

These were just a few research

challenges that came with

virtualization.

There are many more to be studied.

Challenges...

Page 40: Virtualization, resource management and autonomous systems

   

Overview

● Virtualization

● Uses of virtualization

● Virtualization in data centers

● VM replication● VM memory management

Page 41: Virtualization, resource management and autonomous systems

   

Migration: moving a VM from one host node to another.

Replication: instantiating a copy of a VM in a different host node:

● copy of current VM, or● instance of a stored image.

VM Replication

Page 42: Virtualization, resource management and autonomous systems

   

● Built Golondrina, a resource management system for OS-level virtualized environments.

● Implemented replication mechanism to deal with resource stress situations

● Compared replication mechanism with migration mechanism

Our Work

Page 43: Virtualization, resource management and autonomous systems

   

Container

OS kernel

Hardware

Privileged Container Container...

Management SW

ApplicationsApplicationsUSER

SPACE

OS-level Virtualization

Page 44: Virtualization, resource management and autonomous systems

   

● Why use migration and replication to do resource management?

● Are both mechanisms needed? Why compared them?

Our Work...

Page 45: Virtualization, resource management and autonomous systems

   

Golondrina

Page 46: Virtualization, resource management and autonomous systems

   

OS: CentOS 5.2 / OpenVZ

Prog. Lang.: Python

Communications: Twisted (event-driven networking engine)

Load Balancer: Pound

Implementation

Page 47: Virtualization, resource management and autonomous systems

   

Basic Responsibilities

(C) Gather CPU statistics

(S) Process Clients' statistics

(S) Search for resource stress situations

(S) Determine sequence of relocations

(C) Execute migration/replication

Page 48: Virtualization, resource management and autonomous systems

   

Basic Responsibilities

(C) Gather CPU statistics

(S) Process Clients' statistics

(S) Search for resource stress situations

(S) Determine sequence of relocations

(C) Execute migration/replication

Page 49: Virtualization, resource management and autonomous systems

   

Resource Stress Check

K out of the previous N

checks were in excess

next predicted CPU utilization is

in excess

● periodic check on (almost) every hardware node

Page 50: Virtualization, resource management and autonomous systems

   

1. decreasingLoadSort(stressed_HNs)

2. increasingLoadSort(non-stressed_HNs)

3. for each HN in stressed_HNs:

4. decreasingLoadPolicy(containers)

5. While HN is stressed:

6. pick a CT and cycle through

7. non-stressed_HNs until finding a HN_2

8. that can host the CT

Relocation Algorithm

Page 51: Virtualization, resource management and autonomous systems

   

Replication Algorithm

1. generate CTID for the replica

2. bring CT image from central repository

3. process image

4. edit image configuration file

5. start replica

Page 52: Virtualization, resource management and autonomous systems

   

● Cause resource stress situations (httperf – load generator)

● Configure Golondrina to react:➢  doing nothing➢  using replication➢  using migration

● Measure lost requests and throughput (Apache web servers)

Experiments

Page 53: Virtualization, resource management and autonomous systems

   

● 2 hardware nodes (bravo02, bravo03)

● 2 containers (A, B)

● A receives a load of around 70%

● B receives a load of around 105%

● bravo02 experiences a load of 175%

Experiment 1

Page 54: Virtualization, resource management and autonomous systems

   

Web Server's Effectiveness

Servers Nothing Replication Migration

one.com 100.00% 99.11% 100.00%

two.com 100.00% 98.44% 100.00%

Throughput provided no conclusive results.

Results Exp. 1Results Exp. 1Results Exp. 1

Page 55: Virtualization, resource management and autonomous systems

   

● 2 hardware nodes (bravo02, bravo03)

● 2 containers (A, B)

● A and B receive a load of around 105%

● bravo02 experiences a load of 200%

Experiment 2

Page 56: Virtualization, resource management and autonomous systems

   

Web Server's Effectiveness

Servers Nothing Replication Migration

one.com 77.55% 87.55% 78.00%

two.com 62.44% 88.00% 84.44%

Throughput provided no conclusive results.

Results Exp. 2

Page 57: Virtualization, resource management and autonomous systems

   

● 2 hardware nodes (bravo02,bravo03)

● 4 containers (A, B, C, D)

● each container receives a load of around 51%

● bravo02 experiences a load of 200%

Experiment 3

Page 58: Virtualization, resource management and autonomous systems

   

Web Server's Effectiveness

Servers Nothing Replication Migration

one.com 88.00% 97.00% 94.00%

two.com 92.00% 96.33% 94.00%

three.com 87.00% 96.33% 95.33%

four.com 98.00% 96.33% 93.66%

Throughput provided no conclusive results.

Results Exp. 3

Page 59: Virtualization, resource management and autonomous systems

   

Analysis of Results

● Both replication and migration offer an improvement over taking no action upon detection of a resource stress situation.

● Replication offers a better improvement over migration.

Page 60: Virtualization, resource management and autonomous systems

   

Overview

● Virtualization

● Uses of virtualization

● Virtualization in data centers

● VM replication

● VM memory management

Page 61: Virtualization, resource management and autonomous systems

   

VMs are allocated min and max amounts of memory.

We want more dynamism.

We are extending Golondrina to allocate memory as needed.(Work in progress.)

VM Memory Management

Page 62: Virtualization, resource management and autonomous systems

   

Virtualization is finding its way into

many environments:

industry, academia, government,

HPC, Grid, Data Center...

Research topics are abound...

Remark

Page 63: Virtualization, resource management and autonomous systems

   

Page 64: Virtualization, resource management and autonomous systems

   

THANKS